Fix sysdeps/ia64/fpu/libm-symbols.h for inclusion in testcases.

IA64 builds in math/ use "-include libm-symbols.h".  This breaks the
signgam tests, which rely on undefining _LIBC and feature test macros
and defining _ISOMAC before including system headers to get them to
provide only ISO C declarations (libm-symbols.h ending up indirectly
including headers which result in this breaking); similarly, it breaks
C++ tests as some headers included from libm-symbols.h are not ready
for inclusion in C++ code.  This patch disables the contents of
libm-symbols.h if __STRICT_ANSI__ or __cplusplus are defined to avoid
this problem (this header can only test symbols defined before the
source file is processed, so can't test _ISOMAC because that's defined
within the source file, after this header is included).

Tested (compilation only) for ia64.

	* sysdeps/ia64/fpu/libm-symbols.h: Make contents conditional on
	[!__STRICT_ANSI__ && !__cplusplus].
This commit is contained in:
Joseph Myers 2016-11-28 23:12:49 +00:00
parent c9070e6305
commit 547e970409
2 changed files with 25 additions and 18 deletions

View File

@ -1,3 +1,8 @@
2016-11-28 Joseph Myers <joseph@codesourcery.com>
* sysdeps/ia64/fpu/libm-symbols.h: Make contents conditional on
[!__STRICT_ANSI__ && !__cplusplus].
2016-11-28 H.J. Lu <hongjiu.lu@intel.com> 2016-11-28 H.J. Lu <hongjiu.lu@intel.com>
[BZ #20750] [BZ #20750]

View File

@ -1,3 +1,4 @@
#if !defined __STRICT_ANSI__ && !defined __cplusplus
# include <sysdep.h> # include <sysdep.h>
# undef ret /* get rid of the stupid "ret" macro; it breaks br.ret */ # undef ret /* get rid of the stupid "ret" macro; it breaks br.ret */
@ -56,3 +57,4 @@
# if defined ASSEMBLER && IS_IN (libc) # if defined ASSEMBLER && IS_IN (libc)
# define __libm_error_support HIDDEN_JUMPTARGET(__libm_error_support) # define __libm_error_support HIDDEN_JUMPTARGET(__libm_error_support)
# endif # endif
#endif