This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] sparc32/sysdep.h vs. gcc-3.4.0


On Sat, May 15, 2004 at 11:13:45AM -0700, Dan Kegel wrote:

> The error messages appear to refer to the '1 .get_pic.17', e.g.
>         .globl 1 .get_pic.l7; .hidden 1 .get_pic.l7;
> which seems to come from
> glibc-2.3.2/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h
> where it appears originally as
>         .globl __sparc.get_pic.l7;                                      \
>         .hidden __sparc.get_pic.l7;                                     \
> 
> The following patch allows the build to succeed.
> 
> --- glibc-2.3.2/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h.old      
> 2004-05-15 10:23:11.000000000 -0700
> +++ glibc-2.3.2/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h  2004-05-15 
> 10:24:12.000000000 -0700
> @@ -39,6 +39,11 @@
>  #undef END
>  #undef LOC
> 
> +/* gcc-3.4.0 seems to expand __sparc as a predefined preprocessor symbol, 
> which we don't want here */
> +#ifdef __sparc
> +#undef __sparc
> +#endif
> +
>  #define ENTRY(name) \
>         .global C_SYMBOL_NAME(name); \
>         .align 4;\

Well, the compiler doesn't use __sparc.get_pic.l7 internally, so it really
doesn't matter what name glibc uses.
So __sparc_get_pic_l7 should be fine IMHO.  Alternatively, just
#undef __sparc
would be sufficient.

2004-05-15  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h
	(SYSCALL_ERROR_HANDLER): Rename __sparc.get_pic.l7 to
	__sparc_get_pic_l7.

--- libc/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h.jj	2003-09-02 09:09:01.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h	2004-05-15 23:20:54.393701802 +0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 2002, 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Miguel de Icaza <miguel@gnu.ai.mit.edu>, January 1997.
 
@@ -70,18 +70,18 @@ handler:
 
 #if RTLD_PRIVATE_ERRNO
 # define SYSCALL_ERROR_HANDLER						\
-	.section .gnu.linkonce.t.__sparc.get_pic.l7,"ax",@progbits;	\
-	.globl __sparc.get_pic.l7;					\
-	.hidden __sparc.get_pic.l7;					\
-	.type __sparc.get_pic.l7,@function;				\
-__sparc.get_pic.l7:							\
+	.section .gnu.linkonce.t.__sparc_get_pic_l7,"ax",@progbits;	\
+	.globl __sparc_get_pic_l7;					\
+	.hidden __sparc_get_pic_l7;					\
+	.type __sparc_get_pic_l7,@function;				\
+__sparc_get_pic_l7:							\
 	retl;								\
 	 add	%o7, %l7, %l7;						\
 	.previous;							\
 SYSCALL_ERROR_HANDLER_ENTRY(__syscall_error_handler)			\
 	save	%sp,-96,%sp;						\
 	sethi	%hi(_GLOBAL_OFFSET_TABLE_-4), %l7;			\
-	call	__sparc.get_pic.l7;					\
+	call	__sparc_get_pic_l7;					\
 	 add	%l7, %lo(_GLOBAL_OFFSET_TABLE_+4), %l7;			\
 	ld	[%l7 + errno], %l0;					\
 	st	%i0, [%l0];						\
@@ -96,11 +96,11 @@ SYSCALL_ERROR_HANDLER_ENTRY(__syscall_er
 # endif
 # ifdef SHARED
 #  define SYSCALL_ERROR_HANDLER						\
-	.section .gnu.linkonce.t.__sparc.get_pic.l7,"ax",@progbits;	\
-	.globl __sparc.get_pic.l7;					\
-	.hidden __sparc.get_pic.l7;					\
-	.type __sparc.get_pic.l7,@function;				\
-__sparc.get_pic.l7:							\
+	.section .gnu.linkonce.t.__sparc_get_pic_l7,"ax",@progbits;	\
+	.globl __sparc_get_pic_l7;					\
+	.hidden __sparc_get_pic_l7;					\
+	.type __sparc_get_pic_l7,@function;				\
+__sparc_get_pic_l7:							\
 	retl;								\
 	 add	%o7, %l7, %l7;						\
 	.previous;							\
@@ -108,7 +108,7 @@ SYSCALL_ERROR_HANDLER_ENTRY(__syscall_er
 	save	%sp,-96,%sp;						\
 	sethi	%tie_hi22(SYSCALL_ERROR_ERRNO), %l1;			\
 	sethi	%hi(_GLOBAL_OFFSET_TABLE_-4), %l7;			\
-	call	__sparc.get_pic.l7;					\
+	call	__sparc_get_pic_l7;					\
 	 add	%l7, %lo(_GLOBAL_OFFSET_TABLE_+4), %l7;			\
 	add	%l1, %tie_lo10(SYSCALL_ERROR_ERRNO), %l1;		\
 	ld	[%l7 + %l1], %l1, %tie_ld(SYSCALL_ERROR_ERRNO);		\

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]