public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* Fix sysdeps/ia64/fpu/libm-symbols.h for inclusion in testcases
@ 2016-11-09  2:04 Joseph Myers
  2016-11-15 21:52 ` Ping " Joseph Myers
  2016-11-28 20:43 ` Florian Weimer
  0 siblings, 2 replies; 5+ messages in thread
From: Joseph Myers @ 2016-11-09  2:04 UTC (permalink / raw)
  To: libc-alpha, vapier

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.

2016-11-09  Joseph Myers  <joseph@codesourcery.com>

	* sysdeps/ia64/fpu/libm-symbols.h: Make contents conditional on
	[!__STRICT_ANSI__ && !__cplusplus].

diff --git a/sysdeps/ia64/fpu/libm-symbols.h b/sysdeps/ia64/fpu/libm-symbols.h
index 3cbc6c4..31d6f36 100644
--- a/sysdeps/ia64/fpu/libm-symbols.h
+++ b/sysdeps/ia64/fpu/libm-symbols.h
@@ -1,58 +1,60 @@
-#include <sysdep.h>
-#undef ret	/* get rid of the stupid "ret" macro; it breaks br.ret */
+#if !defined __STRICT_ANSI__ && !defined __cplusplus
+# include <sysdep.h>
+# undef ret	/* get rid of the stupid "ret" macro; it breaks br.ret */
 
 /* Support for compatible assembler handling.  */
 
-#define ASM_SIZE_DIRECTIVE(name) .size name,.-name
+# define ASM_SIZE_DIRECTIVE(name) .size name,.-name
 
-#define LOCAL_LIBM_ENTRY(name)			\
+# define LOCAL_LIBM_ENTRY(name)			\
 	.proc name;				\
  name:
 
-#define LOCAL_LIBM_END(name)			\
+# define LOCAL_LIBM_END(name)			\
 	.endp name;				\
  ASM_SIZE_DIRECTIVE(name)
 
 
-#define RODATA		.rodata
-#define LOCAL_OBJECT_START(name)		\
+# define RODATA		.rodata
+# define LOCAL_OBJECT_START(name)		\
    name:;					\
    .type name, @object
-#define LOCAL_OBJECT_END(name)			\
+# define LOCAL_OBJECT_END(name)			\
    ASM_SIZE_DIRECTIVE(name)
 
-#define GLOBAL_LIBM_ENTRY(name)			\
+# define GLOBAL_LIBM_ENTRY(name)		\
 	LOCAL_LIBM_ENTRY(name);			\
 	.global name
-#define GLOBAL_LIBM_END(name)		LOCAL_LIBM_END(name)
+# define GLOBAL_LIBM_END(name)		LOCAL_LIBM_END(name)
 
-#define INTERNAL_LIBM_ENTRY(name)		\
+# define INTERNAL_LIBM_ENTRY(name)		\
 	GLOBAL_LIBM_ENTRY(__libm_##name);	\
 	.global __libm_##name
-#define INTERNAL_LIBM_END(name)		GLOBAL_LIBM_END(__libm_##name)
+# define INTERNAL_LIBM_END(name)	GLOBAL_LIBM_END(__libm_##name)
 
-#define WEAK_LIBM_ENTRY(name)			\
+# define WEAK_LIBM_ENTRY(name)			\
 	.align 32;				\
 	LOCAL_LIBM_ENTRY(__##name);		\
 	.global __##name;			\
  __##name:
-#define WEAK_LIBM_END(name)			\
+# define WEAK_LIBM_END(name)			\
  weak_alias (__##name, name);			\
  .hidden __##name;				\
 	LOCAL_LIBM_END(__##name);		\
  ASM_SIZE_DIRECTIVE(__##name);			\
  .type __##name, @function
 
-#define GLOBAL_IEEE754_ENTRY(name)		\
+# define GLOBAL_IEEE754_ENTRY(name)		\
 	WEAK_LIBM_ENTRY(name);			\
 	.global __ieee754_##name;		\
 	.hidden __ieee754_##name;		\
  __ieee754_##name:
-#define GLOBAL_IEEE754_END(name)			\
+# define GLOBAL_IEEE754_END(name)			\
 	WEAK_LIBM_END(name);				\
  ASM_SIZE_DIRECTIVE(__ieee754_##name);			\
  .type __ieee754_##name, @function
 
-#if defined ASSEMBLER && IS_IN (libc)
-# define __libm_error_support	HIDDEN_JUMPTARGET(__libm_error_support)
+# if defined ASSEMBLER && IS_IN (libc)
+#  define __libm_error_support	HIDDEN_JUMPTARGET(__libm_error_support)
+# endif
 #endif

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Ping Re: Fix sysdeps/ia64/fpu/libm-symbols.h for inclusion in testcases
  2016-11-09  2:04 Fix sysdeps/ia64/fpu/libm-symbols.h for inclusion in testcases Joseph Myers
@ 2016-11-15 21:52 ` Joseph Myers
  2016-11-21 16:47   ` Ping^2 " Joseph Myers
  2016-11-28 20:43 ` Florian Weimer
  1 sibling, 1 reply; 5+ messages in thread
From: Joseph Myers @ 2016-11-15 21:52 UTC (permalink / raw)
  To: libc-alpha, vapier

Ping.  This patch 
<https://sourceware.org/ml/libc-alpha/2016-11/msg00313.html> is pending 
review.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Ping^2 Re: Fix sysdeps/ia64/fpu/libm-symbols.h for inclusion in testcases
  2016-11-15 21:52 ` Ping " Joseph Myers
@ 2016-11-21 16:47   ` Joseph Myers
  2016-11-28 18:09     ` Ping^3 " Joseph Myers
  0 siblings, 1 reply; 5+ messages in thread
From: Joseph Myers @ 2016-11-21 16:47 UTC (permalink / raw)
  To: libc-alpha, vapier

Ping^2.  This patch 
<https://sourceware.org/ml/libc-alpha/2016-11/msg00313.html> is still 
pending review.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Ping^3 Re: Fix sysdeps/ia64/fpu/libm-symbols.h for inclusion in testcases
  2016-11-21 16:47   ` Ping^2 " Joseph Myers
@ 2016-11-28 18:09     ` Joseph Myers
  0 siblings, 0 replies; 5+ messages in thread
From: Joseph Myers @ 2016-11-28 18:09 UTC (permalink / raw)
  To: libc-alpha, vapier

Ping^3.  This patch 
<https://sourceware.org/ml/libc-alpha/2016-11/msg00313.html> is still 
pending review.  Zack's 
<https://sourceware.org/ml/libc-alpha/2016-11/msg01011.html> would be fine 
as an alternative as well to address the same issue.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Fix sysdeps/ia64/fpu/libm-symbols.h for inclusion in testcases
  2016-11-09  2:04 Fix sysdeps/ia64/fpu/libm-symbols.h for inclusion in testcases Joseph Myers
  2016-11-15 21:52 ` Ping " Joseph Myers
@ 2016-11-28 20:43 ` Florian Weimer
  1 sibling, 0 replies; 5+ messages in thread
From: Florian Weimer @ 2016-11-28 20:43 UTC (permalink / raw)
  To: Joseph Myers, libc-alpha, vapier

On 11/09/2016 03:04 AM, Joseph Myers wrote:
> Tested (compilation only) for ia64.
>
> 2016-11-09  Joseph Myers  <joseph@codesourcery.com>
>
> 	* sysdeps/ia64/fpu/libm-symbols.h: Make contents conditional on
> 	[!__STRICT_ANSI__ && !__cplusplus].

Likewise, please commit this.

Thanks,
Florian

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-11-28 20:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-09  2:04 Fix sysdeps/ia64/fpu/libm-symbols.h for inclusion in testcases Joseph Myers
2016-11-15 21:52 ` Ping " Joseph Myers
2016-11-21 16:47   ` Ping^2 " Joseph Myers
2016-11-28 18:09     ` Ping^3 " Joseph Myers
2016-11-28 20:43 ` Florian Weimer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).