Browse Source

build: Get rids of PIC macro using compiler flag __PIC__ instead

Based on Peter Mazinger's comments on a recent commit, I decided
to get rids of all occurrences of PIC changing them to __PIC__

Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Carmelo Amoroso 14 years ago
parent
commit
5418c5ea2a
31 changed files with 71 additions and 71 deletions
  1. 1 1
      libc/string/x86_64/memcpy.S
  2. 2 2
      libc/string/x86_64/memset.S
  3. 1 1
      libc/sysdeps/linux/xtensa/sysdep.h
  4. 1 1
      libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h
  5. 2 2
      libpthread/linuxthreads/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
  6. 4 4
      libpthread/linuxthreads/sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h
  7. 3 3
      libpthread/linuxthreads/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
  8. 4 4
      libpthread/linuxthreads/sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h
  9. 1 1
      libpthread/linuxthreads/sysdeps/unix/sysv/linux/m68k/vfork.S
  10. 2 2
      libpthread/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
  11. 3 3
      libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
  12. 1 1
      libpthread/nptl/sysdeps/i386/sysdep.h
  13. 1 1
      libpthread/nptl/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h
  14. 2 2
      libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S
  15. 1 1
      libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S
  16. 2 2
      libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S
  17. 1 1
      libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S
  18. 1 1
      libpthread/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h
  19. 3 3
      libpthread/nptl/sysdeps/unix/sysv/linux/i386/pthread_once.S
  20. 3 3
      libpthread/nptl/sysdeps/unix/sysv/linux/i386/sysdep.h
  21. 1 1
      libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
  22. 4 4
      libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
  23. 4 4
      libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
  24. 2 2
      libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_once.S
  25. 2 2
      libpthread/nptl/sysdeps/unix/sysv/linux/sh/sysdep.h
  26. 1 1
      libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
  27. 1 1
      libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
  28. 1 1
      libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
  29. 3 3
      libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sysdep.h
  30. 1 1
      libpthread/nptl/sysdeps/x86_64/sysdep.h
  31. 12 12
      test/tls/tls-macros.h

+ 1 - 1
libc/string/x86_64/memcpy.S

@@ -26,7 +26,7 @@
 #define MEMPCPY_P (defined memcpy)
 #define MEMPCPY_P (defined memcpy)
 
 
         .text
         .text
-#if defined PIC && !defined NOT_IN_libc
+#if defined __PIC__ && !defined NOT_IN_libc
 ENTRY (__memcpy_chk)
 ENTRY (__memcpy_chk)
 	cmpq	%rdx, %rcx
 	cmpq	%rdx, %rcx
 	jb	HIDDEN_JUMPTARGET (__chk_fail)
 	jb	HIDDEN_JUMPTARGET (__chk_fail)

+ 2 - 2
libc/string/x86_64/memset.S

@@ -29,7 +29,7 @@
 #define LARGE $120000
 #define LARGE $120000
 
 
         .text
         .text
-#if !BZERO_P && defined PIC && !defined NOT_IN_libc
+#if !BZERO_P && defined __PIC__ && !defined NOT_IN_libc
 ENTRY (__memset_chk)
 ENTRY (__memset_chk)
 	cmpq	%rdx, %rcx
 	cmpq	%rdx, %rcx
 	jb	HIDDEN_JUMPTARGET (__chk_fail)
 	jb	HIDDEN_JUMPTARGET (__chk_fail)
@@ -142,6 +142,6 @@ END (memset)
 libc_hidden_def(memset)
 libc_hidden_def(memset)
 #endif
 #endif
 
 
-#if !BZERO_P && defined PIC && !defined NOT_IN_libc
+#if !BZERO_P && defined __PIC__ && !defined NOT_IN_libc
 strong_alias (__memset_chk, __memset_zero_constant_len_parameter)
 strong_alias (__memset_chk, __memset_zero_constant_len_parameter)
 #endif
 #endif

+ 1 - 1
libc/sysdeps/linux/xtensa/sysdep.h

@@ -45,7 +45,7 @@
 #define LITERAL_POSITION .literal_position
 #define LITERAL_POSITION .literal_position
 
 
 #undef JUMPTARGET
 #undef JUMPTARGET
-#ifdef PIC
+#ifdef __PIC__
 /* The "@PLT" suffix is currently a no-op for non-shared linking, but
 /* The "@PLT" suffix is currently a no-op for non-shared linking, but
    it doesn't hurt to use it conditionally for PIC code in case that
    it doesn't hurt to use it conditionally for PIC code in case that
    changes someday.  */
    changes someday.  */

+ 1 - 1
libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h

@@ -118,7 +118,7 @@ __LABEL($syscall_error)						\
 #  define __local_multiple_threads	__libc_multiple_threads
 #  define __local_multiple_threads	__libc_multiple_threads
 # endif
 # endif
 
 
-# ifdef PIC
+# ifdef __PIC__
 #  define CENABLE	bsr ra, __local_enable_asynccancel !samegp
 #  define CENABLE	bsr ra, __local_enable_asynccancel !samegp
 #  define CDISABLE	bsr ra, __local_disable_asynccancel !samegp
 #  define CDISABLE	bsr ra, __local_disable_asynccancel !samegp
 # else
 # else

+ 2 - 2
libpthread/linuxthreads/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h

@@ -27,7 +27,7 @@
 
 
 /* We push lr onto the stack, so we have to use ldmib instead of ldmia
 /* We push lr onto the stack, so we have to use ldmib instead of ldmia
    to find the saved arguments.  */
    to find the saved arguments.  */
-# ifdef PIC
+# ifdef __PIC__
 #  undef DOARGS_5
 #  undef DOARGS_5
 #  undef DOARGS_6
 #  undef DOARGS_6
 #  undef DOARGS_7
 #  undef DOARGS_7
@@ -105,7 +105,7 @@
 extern int __local_multiple_threads attribute_hidden;
 extern int __local_multiple_threads attribute_hidden;
 #  define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1)
 #  define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1)
 # else
 # else
-#  if !defined PIC
+#  if !defined __PIC__
 #   define SINGLE_THREAD_P						\
 #   define SINGLE_THREAD_P						\
   ldr ip, =__local_multiple_threads;					\
   ldr ip, =__local_multiple_threads;					\
   ldr ip, [ip];								\
   ldr ip, [ip];								\

+ 4 - 4
libpthread/linuxthreads/sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h

@@ -104,7 +104,7 @@
 # define POPARGS_6	POPARGS_5 ldw -54(%sr0,%sp), %r21	ASM_LINE_SEP
 # define POPARGS_6	POPARGS_5 ldw -54(%sr0,%sp), %r21	ASM_LINE_SEP
 
 
 # ifdef IS_IN_libpthread
 # ifdef IS_IN_libpthread
-#  ifdef PIC
+#  ifdef __PIC__
 #   define CENABLE .import __pthread_enable_asynccancel,code ASM_LINE_SEP \
 #   define CENABLE .import __pthread_enable_asynccancel,code ASM_LINE_SEP \
 			bl __pthread_enable_asynccancel,%r2 ASM_LINE_SEP
 			bl __pthread_enable_asynccancel,%r2 ASM_LINE_SEP
 #   define CDISABLE .import __pthread_disable_asynccancel,code ASM_LINE_SEP \
 #   define CDISABLE .import __pthread_disable_asynccancel,code ASM_LINE_SEP \
@@ -116,7 +116,7 @@
 			bl __pthread_disable_asynccancel,%r2 ASM_LINE_SEP
 			bl __pthread_disable_asynccancel,%r2 ASM_LINE_SEP
 #  endif
 #  endif
 # elif !defined NOT_IN_libc
 # elif !defined NOT_IN_libc
-#  ifdef PIC
+#  ifdef __PIC__
 #   define CENABLE .import __libc_enable_asynccancel,code ASM_LINE_SEP \
 #   define CENABLE .import __libc_enable_asynccancel,code ASM_LINE_SEP \
 			bl __libc_enable_asynccancel,%r2 ASM_LINE_SEP
 			bl __libc_enable_asynccancel,%r2 ASM_LINE_SEP
 #   define CDISABLE	.import __libc_disable_asynccancel,code ASM_LINE_SEP \
 #   define CDISABLE	.import __libc_disable_asynccancel,code ASM_LINE_SEP \
@@ -128,7 +128,7 @@
 			bl __libc_disable_asynccancel,%r2 ASM_LINE_SEP
 			bl __libc_disable_asynccancel,%r2 ASM_LINE_SEP
 #  endif
 #  endif
 # else
 # else
-#  ifdef PIC
+#  ifdef __PIC__
 #   define CENABLE .import __librt_enable_asynccancel,code ASM_LINE_SEP \
 #   define CENABLE .import __librt_enable_asynccancel,code ASM_LINE_SEP \
 			bl __librt_enable_asynccancel,%r2 ASM_LINE_SEP
 			bl __librt_enable_asynccancel,%r2 ASM_LINE_SEP
 #   define CDISABLE .import __librt_disable_asynccancel,code ASM_LINE_SEP \
 #   define CDISABLE .import __librt_disable_asynccancel,code ASM_LINE_SEP \
@@ -167,7 +167,7 @@
 	nop							ASM_LINE_SEP	\
 	nop							ASM_LINE_SEP	\
 	ldw MULTIPLE_THREADS_OFFSET(%sr0,%ret0),%ret0		ASM_LINE_SEP	\
 	ldw MULTIPLE_THREADS_OFFSET(%sr0,%ret0),%ret0		ASM_LINE_SEP	\
  Lstp:								ASM_LINE_SEP
  Lstp:								ASM_LINE_SEP
-#  ifdef PIC
+#  ifdef __PIC__
 /* Slower version uses GOT to get value of __local_multiple_threads */
 /* Slower version uses GOT to get value of __local_multiple_threads */
 #   define SINGLE_THREAD_P							\
 #   define SINGLE_THREAD_P							\
 	addil LT%__local_multiple_threads, %r19			ASM_LINE_SEP	\
 	addil LT%__local_multiple_threads, %r19			ASM_LINE_SEP	\

+ 3 - 3
libpthread/linuxthreads/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h

@@ -101,7 +101,7 @@
 #  define CENABLE	call __pthread_enable_asynccancel;
 #  define CENABLE	call __pthread_enable_asynccancel;
 #  define CDISABLE	call __pthread_disable_asynccancel
 #  define CDISABLE	call __pthread_disable_asynccancel
 # elif defined IS_IN_librt
 # elif defined IS_IN_librt
-#  ifdef PIC
+#  ifdef __PIC__
 #   define CENABLE	pushl %ebx; \
 #   define CENABLE	pushl %ebx; \
 			call __i686.get_pc_thunk.bx; \
 			call __i686.get_pc_thunk.bx; \
 			addl     $_GLOBAL_OFFSET_TABLE_, %ebx; \
 			addl     $_GLOBAL_OFFSET_TABLE_, %ebx; \
@@ -139,7 +139,7 @@
 #endif
 #endif
 
 
 # ifndef __ASSEMBLER__
 # ifndef __ASSEMBLER__
-#  if defined FLOATING_STACKS && USE___THREAD && defined PIC
+#  if defined FLOATING_STACKS && USE___THREAD && defined __PIC__
 #   define SINGLE_THREAD_P \
 #   define SINGLE_THREAD_P \
   __builtin_expect (THREAD_GETMEM (THREAD_SELF,				      \
   __builtin_expect (THREAD_GETMEM (THREAD_SELF,				      \
 				   p_header.data.multiple_threads) == 0, 1)
 				   p_header.data.multiple_threads) == 0, 1)
@@ -153,7 +153,7 @@ extern int __local_multiple_threads
 #   define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1)
 #   define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1)
 #  endif
 #  endif
 # else
 # else
-#  if !defined PIC
+#  if !defined __PIC__
 #   define SINGLE_THREAD_P cmpl $0, __local_multiple_threads
 #   define SINGLE_THREAD_P cmpl $0, __local_multiple_threads
 #  elif defined FLOATING_STACKS && USE___THREAD
 #  elif defined FLOATING_STACKS && USE___THREAD
 #   define SINGLE_THREAD_P cmpl $0, %gs:MULTIPLE_THREADS_OFFSET
 #   define SINGLE_THREAD_P cmpl $0, %gs:MULTIPLE_THREADS_OFFSET

+ 4 - 4
libpthread/linuxthreads/sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h

@@ -77,7 +77,7 @@
 # define UNDOCARGS_5	UNDOCARGS_4; move.l (%sp)+, %d5;
 # define UNDOCARGS_5	UNDOCARGS_4; move.l (%sp)+, %d5;
 
 
 # ifdef IS_IN_libpthread
 # ifdef IS_IN_libpthread
-#  ifdef PIC
+#  ifdef __PIC__
 #   define CENABLE	jbsr __pthread_enable_asynccancel@PLTPC
 #   define CENABLE	jbsr __pthread_enable_asynccancel@PLTPC
 #   define CDISABLE	jbsr __pthread_disable_asynccancel@PLTPC
 #   define CDISABLE	jbsr __pthread_disable_asynccancel@PLTPC
 #  else
 #  else
@@ -85,7 +85,7 @@
 #   define CDISABLE	jbsr __pthread_disable_asynccancel
 #   define CDISABLE	jbsr __pthread_disable_asynccancel
 #  endif
 #  endif
 # elif !defined NOT_IN_libc
 # elif !defined NOT_IN_libc
-#  ifdef PIC
+#  ifdef __PIC__
 #   define CENABLE	jbsr __libc_enable_asynccancel@PLTPC
 #   define CENABLE	jbsr __libc_enable_asynccancel@PLTPC
 #   define CDISABLE	jbsr __libc_disable_asynccancel@PLTPC
 #   define CDISABLE	jbsr __libc_disable_asynccancel@PLTPC
 #  else
 #  else
@@ -93,7 +93,7 @@
 #   define CDISABLE	jbsr __libc_disable_asynccancel
 #   define CDISABLE	jbsr __libc_disable_asynccancel
 #  endif
 #  endif
 # else
 # else
-#  ifdef PIC
+#  ifdef __PIC__
 #   define CENABLE	jbsr __librt_enable_asynccancel@PLTPC
 #   define CENABLE	jbsr __librt_enable_asynccancel@PLTPC
 #   define CDISABLE	jbsr __librt_disable_asynccancel@PLTPC
 #   define CDISABLE	jbsr __librt_disable_asynccancel@PLTPC
 #  else
 #  else
@@ -114,7 +114,7 @@
 extern int __local_multiple_threads attribute_hidden;
 extern int __local_multiple_threads attribute_hidden;
 #  define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1)
 #  define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1)
 # else
 # else
-#  if !defined PIC
+#  if !defined __PIC__
 #   define SINGLE_THREAD_P tst.l __local_multiple_threads
 #   define SINGLE_THREAD_P tst.l __local_multiple_threads
 #  else
 #  else
 #   define SINGLE_THREAD_P tst.l (__local_multiple_threads, %pc)
 #   define SINGLE_THREAD_P tst.l (__local_multiple_threads, %pc)

+ 1 - 1
libpthread/linuxthreads/sysdeps/unix/sysv/linux/m68k/vfork.S

@@ -56,7 +56,7 @@ ENTRY (__vfork)
 	movel	%a0,%sp@-
 	movel	%a0,%sp@-
 
 
 # ifdef __ASSUME_VFORK_SYSCALL
 # ifdef __ASSUME_VFORK_SYSCALL
-#  ifndef PIC
+#  ifndef __PIC__
 	jbra	SYSCALL_ERROR_LABEL
 	jbra	SYSCALL_ERROR_LABEL
 #  endif
 #  endif
 # else
 # else

+ 2 - 2
libpthread/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h

@@ -89,7 +89,7 @@
 # else
 # else
 #  define CENABLE	bl JUMPTARGET(__librt_enable_asynccancel)
 #  define CENABLE	bl JUMPTARGET(__librt_enable_asynccancel)
 #  define CDISABLE	bl JUMPTARGET(__librt_disable_asynccancel)
 #  define CDISABLE	bl JUMPTARGET(__librt_disable_asynccancel)
-#  if defined HAVE_AS_REL16 && defined PIC
+#  if defined HAVE_AS_REL16 && defined __PIC__
 #   undef CGOTSETUP
 #   undef CGOTSETUP
 #   define CGOTSETUP							\
 #   define CGOTSETUP							\
     bcl 20,31,1f;							\
     bcl 20,31,1f;							\
@@ -122,7 +122,7 @@
 extern int __local_multiple_threads attribute_hidden;
 extern int __local_multiple_threads attribute_hidden;
 #   define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1)
 #   define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1)
 #  else
 #  else
-#   if !defined PIC
+#   if !defined __PIC__
 #    define SINGLE_THREAD_P						\
 #    define SINGLE_THREAD_P						\
   lis 10,__local_multiple_threads@ha;					\
   lis 10,__local_multiple_threads@ha;					\
   lwz 10,__local_multiple_threads@l(10);				\
   lwz 10,__local_multiple_threads@l(10);				\

+ 3 - 3
libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h

@@ -102,7 +102,7 @@
 #  define __local_multiple_threads	__librt_multiple_threads
 #  define __local_multiple_threads	__librt_multiple_threads
 # endif
 # endif
 
 
-# if defined IS_IN_librt && defined PIC
+# if defined IS_IN_librt && defined __PIC__
 #  define CENABLE \
 #  define CENABLE \
 	mov.l r12,@-r15; \
 	mov.l r12,@-r15; \
 	mov.l 1f,r12; \
 	mov.l 1f,r12; \
@@ -155,7 +155,7 @@
 # endif
 # endif
 
 
 # ifndef __ASSEMBLER__
 # ifndef __ASSEMBLER__
-#  if defined FLOATING_STACKS && USE___THREAD && defined PIC
+#  if defined FLOATING_STACKS && USE___THREAD && defined __PIC__
 #   define SINGLE_THREAD_P \
 #   define SINGLE_THREAD_P \
   __builtin_expect (THREAD_GETMEM (THREAD_SELF, p_multiple_threads) == 0, 1)
   __builtin_expect (THREAD_GETMEM (THREAD_SELF, p_multiple_threads) == 0, 1)
 #  else
 #  else
@@ -163,7 +163,7 @@ extern int __local_multiple_threads attribute_hidden;
 #   define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1)
 #   define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1)
 #  endif
 #  endif
 # else
 # else
-#  if !defined PIC
+#  if !defined __PIC__
 #   define SINGLE_THREAD_P \
 #   define SINGLE_THREAD_P \
 	mov.l 1f,r0; \
 	mov.l 1f,r0; \
 	mov.l @r0,r0; \
 	mov.l @r0,r0; \

+ 1 - 1
libpthread/nptl/sysdeps/i386/sysdep.h

@@ -112,7 +112,7 @@ lose: SYSCALL_PIC_SETUP							      \
   END (name)
   END (name)
 
 
 #undef JUMPTARGET
 #undef JUMPTARGET
-#ifdef PIC
+#ifdef __PIC__
 #define JUMPTARGET(name)	name##@PLT
 #define JUMPTARGET(name)	name##@PLT
 #define SYSCALL_PIC_SETUP \
 #define SYSCALL_PIC_SETUP \
     pushl %ebx;								      \
     pushl %ebx;								      \

+ 1 - 1
libpthread/nptl/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h

@@ -129,7 +129,7 @@ __LABEL($syscall_error)						\
 #  error Unsupported library
 #  error Unsupported library
 # endif
 # endif
 
 
-# ifdef PIC
+# ifdef __PIC__
 #  define CENABLE	bsr ra, __local_enable_asynccancel !samegp
 #  define CENABLE	bsr ra, __local_enable_asynccancel !samegp
 #  define CDISABLE	bsr ra, __local_disable_asynccancel !samegp
 #  define CDISABLE	bsr ra, __local_disable_asynccancel !samegp
 # else
 # else

+ 2 - 2
libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S

@@ -56,7 +56,7 @@ __new_sem_post:
 	ret
 	ret
 
 
 1:
 1:
-#ifdef PIC
+#ifdef __PIC__
 	call	__x86.get_pc_thunk.bx
 	call	__x86.get_pc_thunk.bx
 #else
 #else
 	movl	$4f, %ebx
 	movl	$4f, %ebx
@@ -84,7 +84,7 @@ __new_sem_post:
 weak_alias(__new_sem_post, sem_post)
 weak_alias(__new_sem_post, sem_post)
 
 
 
 
-#ifdef PIC
+#ifdef __PIC__
 	.section .gnu.linkonce.t.__x86.get_pc_thunk.bx,"ax",@progbits
 	.section .gnu.linkonce.t.__x86.get_pc_thunk.bx,"ax",@progbits
 	.globl	__x86.get_pc_thunk.bx
 	.globl	__x86.get_pc_thunk.bx
 	.hidden	__x86.get_pc_thunk.bx
 	.hidden	__x86.get_pc_thunk.bx

+ 1 - 1
libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S

@@ -148,7 +148,7 @@ sem_timedwait:
 	cfi_offset(3, -16)		/* %ebx */
 	cfi_offset(3, -16)		/* %ebx */
 3:	negl	%esi
 3:	negl	%esi
 6:
 6:
-#ifdef PIC
+#ifdef __PIC__
 	call	__x86.get_pc_thunk.bx
 	call	__x86.get_pc_thunk.bx
 #else
 #else
 	movl	$4f, %ebx
 	movl	$4f, %ebx

+ 2 - 2
libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S

@@ -47,7 +47,7 @@ __new_sem_trywait:
 	ret
 	ret
 
 
 1:
 1:
-#ifdef PIC
+#ifdef __PIC__
 	call	__x86.get_pc_thunk.cx
 	call	__x86.get_pc_thunk.cx
 #else
 #else
 	movl	$3f, %ecx
 	movl	$3f, %ecx
@@ -73,7 +73,7 @@ __new_sem_trywait:
 weak_alias(__new_sem_trywait, sem_trywait)
 weak_alias(__new_sem_trywait, sem_trywait)
 
 
 
 
-#ifdef PIC
+#ifdef __PIC__
 	.section .gnu.linkonce.t.__x86.get_pc_thunk.cx,"ax",@progbits
 	.section .gnu.linkonce.t.__x86.get_pc_thunk.cx,"ax",@progbits
 	.globl	__x86.get_pc_thunk.cx
 	.globl	__x86.get_pc_thunk.cx
 	.hidden	__x86.get_pc_thunk.cx
 	.hidden	__x86.get_pc_thunk.cx

+ 1 - 1
libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S

@@ -94,7 +94,7 @@ __new_sem_wait:
 	cmpl	$-EWOULDBLOCK, %esi
 	cmpl	$-EWOULDBLOCK, %esi
 	je	3b
 	je	3b
 	negl	%esi
 	negl	%esi
-#ifdef PIC
+#ifdef __PIC__
 	call	__x86.get_pc_thunk.bx
 	call	__x86.get_pc_thunk.bx
 #else
 #else
 	movl	$4f, %ebx
 	movl	$4f, %ebx

+ 1 - 1
libpthread/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h

@@ -52,7 +52,7 @@ typedef int lll_lock_t;
 #define LLL_MUTEX_LOCK_INITIALIZER_WAITERS	(2)
 #define LLL_MUTEX_LOCK_INITIALIZER_WAITERS	(2)
 
 
 
 
-#ifdef PIC
+#ifdef __PIC__
 # define LLL_EBX_LOAD	"xchgl %2, %%ebx\n"
 # define LLL_EBX_LOAD	"xchgl %2, %%ebx\n"
 # define LLL_EBX_REG	"D"
 # define LLL_EBX_REG	"D"
 #else
 #else

+ 3 - 3
libpthread/nptl/sysdeps/unix/sysv/linux/i386/pthread_once.S

@@ -56,7 +56,7 @@ __pthread_once:
 	/* Not yet initialized or initialization in progress.
 	/* Not yet initialized or initialization in progress.
 	   Get the fork generation counter now.  */
 	   Get the fork generation counter now.  */
 6:	movl	(%ebx), %eax
 6:	movl	(%ebx), %eax
-#ifdef PIC
+#ifdef __PIC__
 	call	__x86.get_pc_thunk.cx
 	call	__x86.get_pc_thunk.cx
 	addl	$_GLOBAL_OFFSET_TABLE_, %ecx
 	addl	$_GLOBAL_OFFSET_TABLE_, %ecx
 #endif
 #endif
@@ -67,7 +67,7 @@ __pthread_once:
 	jnz	4f
 	jnz	4f
 
 
 	andl	$3, %edx
 	andl	$3, %edx
-#ifdef PIC
+#ifdef __PIC__
 	orl	__fork_generation@GOTOFF(%ecx), %edx
 	orl	__fork_generation@GOTOFF(%ecx), %edx
 #else
 #else
 	orl	__fork_generation, %edx
 	orl	__fork_generation, %edx
@@ -169,7 +169,7 @@ __pthread_once_internal = __pthread_once
 pthread_once = __pthread_once
 pthread_once = __pthread_once
 
 
 
 
-#ifdef PIC
+#ifdef __PIC__
 	.section .gnu.linkonce.t.__x86.get_pc_thunk.cx,"ax",@progbits
 	.section .gnu.linkonce.t.__x86.get_pc_thunk.cx,"ax",@progbits
 	.globl	__x86.get_pc_thunk.cx
 	.globl	__x86.get_pc_thunk.cx
 	.hidden	__x86.get_pc_thunk.cx
 	.hidden	__x86.get_pc_thunk.cx

+ 3 - 3
libpthread/nptl/sysdeps/unix/sysv/linux/i386/sysdep.h

@@ -57,7 +57,7 @@
 
 
 /* We don't want the label for the error handle to be global when we define
 /* We don't want the label for the error handle to be global when we define
    it here.  */
    it here.  */
-#ifdef PIC
+#ifdef __PIC__
 # define SYSCALL_ERROR_LABEL 0f
 # define SYSCALL_ERROR_LABEL 0f
 #else
 #else
 # define SYSCALL_ERROR_LABEL syscall_error
 # define SYSCALL_ERROR_LABEL syscall_error
@@ -103,7 +103,7 @@
 
 
 #define ret_ERRVAL ret
 #define ret_ERRVAL ret
 
 
-#ifndef PIC
+#ifndef __PIC__
 # define SYSCALL_ERROR_HANDLER	/* Nothing here; code in sysdep.S is used.  */
 # define SYSCALL_ERROR_HANDLER	/* Nothing here; code in sysdep.S is used.  */
 #else
 #else
 
 
@@ -177,7 +177,7 @@
   orl $-1, %eax;							      \
   orl $-1, %eax;							      \
   jmp L(pseudo_end);
   jmp L(pseudo_end);
 # endif	/* _LIBC_REENTRANT */
 # endif	/* _LIBC_REENTRANT */
-#endif	/* PIC */
+#endif	/* __PIC__ */
 
 
 
 
 /* The original calling convention for system calls on Linux/i386 is
 /* The original calling convention for system calls on Linux/i386 is

+ 1 - 1
libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h

@@ -98,7 +98,7 @@
 # elif defined IS_IN_librt
 # elif defined IS_IN_librt
 #  define CENABLE	bl JUMPTARGET(__librt_enable_asynccancel)
 #  define CENABLE	bl JUMPTARGET(__librt_enable_asynccancel)
 #  define CDISABLE	bl JUMPTARGET(__librt_disable_asynccancel)
 #  define CDISABLE	bl JUMPTARGET(__librt_disable_asynccancel)
-#  if defined HAVE_AS_REL16 && defined PIC
+#  if defined HAVE_AS_REL16 && defined __PIC__
 #   undef CGOTSETUP
 #   undef CGOTSETUP
 #   define CGOTSETUP							\
 #   define CGOTSETUP							\
     bcl 20,31,1f;							\
     bcl 20,31,1f;							\

+ 4 - 4
libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S

@@ -55,7 +55,7 @@ __pthread_cond_timedwait:
 	mov	r4, r8
 	mov	r4, r8
 	mov	r5, r9
 	mov	r5, r9
 	mov	r6, r13
 	mov	r6, r13
-#ifdef PIC
+#ifdef __PIC__
 	mova	.Lgot0, r0
 	mova	.Lgot0, r0
 	mov.l	.Lgot0, r12
 	mov.l	.Lgot0, r12
 	add	r0, r12
 	add	r0, r12
@@ -79,7 +79,7 @@ __pthread_cond_timedwait:
 	bt	2f
 	bt	2f
 	bra	1f
 	bra	1f
 	 nop
 	 nop
-#ifdef PIC
+#ifdef __PIC__
 	.align	2
 	.align	2
 .Lgot0:
 .Lgot0:
 	.long	_GLOBAL_OFFSET_TABLE_
 	.long	_GLOBAL_OFFSET_TABLE_
@@ -610,7 +610,7 @@ __condvar_tw_cleanup:
 
 
 .LcallUR:
 .LcallUR:
 	mov.l	.Lresume, r1
 	mov.l	.Lresume, r1
-#ifdef PIC
+#ifdef __PIC__
 	add	r12, r1
 	add	r12, r1
 #endif
 #endif
 	jsr	@r1
 	jsr	@r1
@@ -625,7 +625,7 @@ __condvar_tw_cleanup:
 .Lmlocki5:
 .Lmlocki5:
 	.long   __pthread_mutex_cond_lock-.Lmlocki5b
 	.long   __pthread_mutex_cond_lock-.Lmlocki5b
 .Lresume:
 .Lresume:
-#ifdef PIC
+#ifdef __PIC__
 	.long	_Unwind_Resume@GOTOFF
 	.long	_Unwind_Resume@GOTOFF
 #else
 #else
 	.long	_Unwind_Resume
 	.long	_Unwind_Resume

+ 4 - 4
libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S

@@ -48,7 +48,7 @@ __pthread_cond_wait:
 .Lalloc:
 .Lalloc:
 	mov	r4, r8
 	mov	r4, r8
 	mov	r5, r9
 	mov	r5, r9
-#ifdef PIC
+#ifdef __PIC__
 	mova	.Lgot0, r0
 	mova	.Lgot0, r0
 	mov.l	.Lgot0, r12
 	mov.l	.Lgot0, r12
 	add	r0, r12
 	add	r0, r12
@@ -65,7 +65,7 @@ __pthread_cond_wait:
 	bt	2f
 	bt	2f
 	bra	1f
 	bra	1f
 	 nop
 	 nop
-#ifdef PIC
+#ifdef __PIC__
 	.align	2
 	.align	2
 .Lgot0:
 .Lgot0:
 	.long	_GLOBAL_OFFSET_TABLE_
 	.long	_GLOBAL_OFFSET_TABLE_
@@ -473,7 +473,7 @@ __condvar_w_cleanup:
 
 
 .LcallUR:
 .LcallUR:
 	mov.l	.Lresume, r1
 	mov.l	.Lresume, r1
-#ifdef PIC
+#ifdef __PIC__
 	add	r12, r1
 	add	r12, r1
 #endif
 #endif
 	jsr	@r1
 	jsr	@r1
@@ -488,7 +488,7 @@ __condvar_w_cleanup:
 .Lmlocki3:
 .Lmlocki3:
 	.long   __pthread_mutex_cond_lock-.Lmlocki3b
 	.long   __pthread_mutex_cond_lock-.Lmlocki3b
 .Lresume:
 .Lresume:
-#ifdef PIC
+#ifdef __PIC__
 	.long	_Unwind_Resume@GOTOFF
 	.long	_Unwind_Resume@GOTOFF
 #else
 #else
 	.long	_Unwind_Resume
 	.long	_Unwind_Resume

+ 2 - 2
libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_once.S

@@ -69,7 +69,7 @@ __pthread_once:
 
 
 	and	#3, r0
 	and	#3, r0
 	mov.l	.Lfgen, r2
 	mov.l	.Lfgen, r2
-#ifdef PIC
+#ifdef __PIC__
 	add	r12, r2
 	add	r12, r2
 #endif
 #endif
 	mov.l	@r2, r3
 	mov.l	@r2, r3
@@ -107,7 +107,7 @@ __pthread_once:
 	.align	2
 	.align	2
 .Lgot:
 .Lgot:
 	.long	_GLOBAL_OFFSET_TABLE_
 	.long	_GLOBAL_OFFSET_TABLE_
-#ifdef PIC
+#ifdef __PIC__
 .Lfgen:
 .Lfgen:
 	.long	__fork_generation@GOTOFF
 	.long	__fork_generation@GOTOFF
 #else
 #else

+ 2 - 2
libpthread/nptl/sysdeps/unix/sysv/linux/sh/sysdep.h

@@ -89,7 +89,7 @@
 
 
 #define ret_ERRVAL ret
 #define ret_ERRVAL ret
 
 
-#ifndef PIC
+#ifndef __PIC__
 # define SYSCALL_ERROR_HANDLER	\
 # define SYSCALL_ERROR_HANDLER	\
 	mov.l 0f,r1; \
 	mov.l 0f,r1; \
 	jmp @r1; \
 	jmp @r1; \
@@ -191,7 +191,7 @@
      0: .long _GLOBAL_OFFSET_TABLE_; \
      0: .long _GLOBAL_OFFSET_TABLE_; \
      1: .long errno@GOT
      1: .long errno@GOT
 # endif	/* _LIBC_REENTRANT */
 # endif	/* _LIBC_REENTRANT */
-#endif	/* PIC */
+#endif	/* __PIC__ */
 
 
 # ifdef NEED_SYSCALL_INST_PAD
 # ifdef NEED_SYSCALL_INST_PAD
 #  define SYSCALL_INST_PAD \
 #  define SYSCALL_INST_PAD \

+ 1 - 1
libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S

@@ -117,7 +117,7 @@ __lll_robust_lock_wait:
 __lll_robust_timedlock_wait:
 __lll_robust_timedlock_wait:
 	cfi_startproc
 	cfi_startproc
 # ifndef __ASSUME_FUTEX_CLOCK_REALTIME
 # ifndef __ASSUME_FUTEX_CLOCK_REALTIME
-#  ifdef PIC
+#  ifdef __PIC__
 	cmpl	$0, __have_futex_clock_realtime(%rip)
 	cmpl	$0, __have_futex_clock_realtime(%rip)
 #  else
 #  else
 	cmpl	$0, __have_futex_clock_realtime
 	cmpl	$0, __have_futex_clock_realtime

+ 1 - 1
libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S

@@ -112,7 +112,7 @@ __pthread_cond_timedwait:
 	addl	$(1 << clock_bits), cond_nwaiters(%rdi)
 	addl	$(1 << clock_bits), cond_nwaiters(%rdi)
 
 
 	/* Install cancellation handler.  */
 	/* Install cancellation handler.  */
-#ifdef PIC
+#ifdef __PIC__
 	leaq	__condvar_cleanup(%rip), %rsi
 	leaq	__condvar_cleanup(%rip), %rsi
 #else
 #else
 	leaq	__condvar_cleanup, %rsi
 	leaq	__condvar_cleanup, %rsi

+ 1 - 1
libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S

@@ -179,7 +179,7 @@ __pthread_cond_wait:
 	addl	$(1 << clock_bits), cond_nwaiters(%rdi)
 	addl	$(1 << clock_bits), cond_nwaiters(%rdi)
 
 
 	/* Install cancellation handler.  */
 	/* Install cancellation handler.  */
-#ifdef PIC
+#ifdef __PIC__
 	leaq	__condvar_cleanup(%rip), %rsi
 	leaq	__condvar_cleanup(%rip), %rsi
 #else
 #else
 	leaq	__condvar_cleanup, %rsi
 	leaq	__condvar_cleanup, %rsi

+ 3 - 3
libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sysdep.h

@@ -66,7 +66,7 @@
 
 
 /* We don't want the label for the error handle to be global when we define
 /* We don't want the label for the error handle to be global when we define
    it here.  */
    it here.  */
-# ifdef PIC
+# ifdef __PIC__
 #  define SYSCALL_ERROR_LABEL 0f
 #  define SYSCALL_ERROR_LABEL 0f
 # else
 # else
 #  define SYSCALL_ERROR_LABEL syscall_error
 #  define SYSCALL_ERROR_LABEL syscall_error
@@ -111,7 +111,7 @@
 
 
 # define ret_ERRVAL ret
 # define ret_ERRVAL ret
 
 
-# ifndef PIC
+# ifndef __PIC__
 #  define SYSCALL_ERROR_HANDLER	/* Nothing here; code in sysdep.S is used.  */
 #  define SYSCALL_ERROR_HANDLER	/* Nothing here; code in sysdep.S is used.  */
 # elif defined(RTLD_PRIVATE_ERRNO)
 # elif defined(RTLD_PRIVATE_ERRNO)
 #  define SYSCALL_ERROR_HANDLER			\
 #  define SYSCALL_ERROR_HANDLER			\
@@ -162,7 +162,7 @@
   movl %edx, (%rcx);				\
   movl %edx, (%rcx);				\
   orq $-1, %rax;				\
   orq $-1, %rax;				\
   jmp L(pseudo_end);
   jmp L(pseudo_end);
-# endif	/* PIC */
+# endif	/* __PIC__ */
 
 
 /* The Linux/x86-64 kernel expects the system call parameters in
 /* The Linux/x86-64 kernel expects the system call parameters in
    registers according to the following table:
    registers according to the following table:

+ 1 - 1
libpthread/nptl/sysdeps/x86_64/sysdep.h

@@ -95,7 +95,7 @@ lose:									      \
   END (name)
   END (name)
 
 
 #undef JUMPTARGET
 #undef JUMPTARGET
-#ifdef PIC
+#ifdef __PIC__
 #define JUMPTARGET(name)	name##@PLT
 #define JUMPTARGET(name)	name##@PLT
 #else
 #else
 #define JUMPTARGET(name)	name
 #define JUMPTARGET(name)	name

+ 12 - 12
test/tls/tls-macros.h

@@ -37,7 +37,7 @@
 	  : "=r" (__l));						      \
 	  : "=r" (__l));						      \
      __l; })
      __l; })
 
 
-# ifdef PIC
+# ifdef __PIC__
 #  define TLS_IE(x) \
 #  define TLS_IE(x) \
   ({ int *__l;								      \
   ({ int *__l;								      \
      __asm__ ("movl %%gs:0,%0\n\t"						      \
      __asm__ ("movl %%gs:0,%0\n\t"						      \
@@ -59,7 +59,7 @@
      __l; })
      __l; })
 # endif
 # endif
 
 
-# ifdef PIC
+# ifdef __PIC__
 #  define TLS_LD(x) \
 #  define TLS_LD(x) \
   ({ int *__l, __c, __d;						      \
   ({ int *__l, __c, __d;						      \
      __asm__ ("leal " #x "@tlsldm(%%ebx),%%eax\n\t"				      \
      __asm__ ("leal " #x "@tlsldm(%%ebx),%%eax\n\t"				      \
@@ -83,7 +83,7 @@
      __l; })
      __l; })
 # endif
 # endif
 
 
-# ifdef PIC
+# ifdef __PIC__
 #  define TLS_GD(x) \
 #  define TLS_GD(x) \
   ({ int *__l, __c, __d;						      \
   ({ int *__l, __c, __d;						      \
      __asm__ ("leal " #x "@tlsgd(%%ebx),%%eax\n\t"				      \
      __asm__ ("leal " #x "@tlsgd(%%ebx),%%eax\n\t"				      \
@@ -157,7 +157,7 @@
 	  : "=r" (__l), "=r" (__tp));					      \
 	  : "=r" (__l), "=r" (__tp));					      \
      __l; })
      __l; })
 
 
-# ifdef PIC
+# ifdef __PIC__
 #  define TLS_IE(x) \
 #  define TLS_IE(x) \
   ({ int *__l; void *__tp;						      \
   ({ int *__l; void *__tp;						      \
      register void *__gp __asm__("r12");				      \
      register void *__gp __asm__("r12");				      \
@@ -191,7 +191,7 @@
      __l; })
      __l; })
 #endif
 #endif
 
 
-# ifdef PIC
+# ifdef __PIC__
 #  define TLS_LD(x) \
 #  define TLS_LD(x) \
   ({ int *__l;								      \
   ({ int *__l;								      \
      register void *__gp __asm__("r12");				      \
      register void *__gp __asm__("r12");				      \
@@ -245,7 +245,7 @@
      __l; })
      __l; })
 #endif
 #endif
 
 
-# ifdef PIC
+# ifdef __PIC__
 #  define TLS_GD(x) \
 #  define TLS_GD(x) \
   ({ int *__l;								      \
   ({ int *__l;								      \
      register void *__gp __asm__("r12");				      \
      register void *__gp __asm__("r12");				      \
@@ -529,7 +529,7 @@ register void *__gp __asm__("$29");
 	  : "=a" (__offset) : : "cc" );					      \
 	  : "=a" (__offset) : : "cc" );					      \
      (int *) (__builtin_thread_pointer() + __offset); })
      (int *) (__builtin_thread_pointer() + __offset); })
 
 
-# ifdef PIC
+# ifdef __PIC__
 #  define TLS_IE(x) \
 #  define TLS_IE(x) \
   ({ unsigned long __offset;						      \
   ({ unsigned long __offset;						      \
      __asm__ ("bras %0,1f\n"						      \
      __asm__ ("bras %0,1f\n"						      \
@@ -549,7 +549,7 @@ register void *__gp __asm__("$29");
      (int *) (__builtin_thread_pointer() + __offset); })
      (int *) (__builtin_thread_pointer() + __offset); })
 # endif
 # endif
 
 
-# ifdef PIC
+# ifdef __PIC__
 #  define TLS_LD(x) \
 #  define TLS_LD(x) \
   ({ unsigned long __offset, __save12;					      \
   ({ unsigned long __offset, __save12;					      \
      __asm__ ("bras %0,1f\n"						      \
      __asm__ ("bras %0,1f\n"						      \
@@ -581,7 +581,7 @@ register void *__gp __asm__("$29");
      (int *) (__builtin_thread_pointer() + __offset); })
      (int *) (__builtin_thread_pointer() + __offset); })
 # endif
 # endif
 
 
-# ifdef PIC
+# ifdef __PIC__
 #  define TLS_GD(x) \
 #  define TLS_GD(x) \
   ({ unsigned long __offset, __save12;					      \
   ({ unsigned long __offset, __save12;					      \
      __asm__ ("bras %0,1f\n"						      \
      __asm__ ("bras %0,1f\n"						      \
@@ -619,7 +619,7 @@ register void *__gp __asm__("$29");
 	  : "=a" (__offset) : : "cc" );					      \
 	  : "=a" (__offset) : : "cc" );					      \
      (int *) (__builtin_thread_pointer() + __offset); })
      (int *) (__builtin_thread_pointer() + __offset); })
 
 
-# ifdef PIC
+# ifdef __PIC__
 #  define TLS_IE(x) \
 #  define TLS_IE(x) \
   ({ unsigned long __offset;						      \
   ({ unsigned long __offset;						      \
      __asm__ ("bras %0,1f\n"						      \
      __asm__ ("bras %0,1f\n"						      \
@@ -639,7 +639,7 @@ register void *__gp __asm__("$29");
      (int *) (__builtin_thread_pointer() + __offset); })
      (int *) (__builtin_thread_pointer() + __offset); })
 # endif
 # endif
 
 
-# ifdef PIC
+# ifdef __PIC__
 #  define TLS_LD(x) \
 #  define TLS_LD(x) \
   ({ unsigned long __offset, __save12;					      \
   ({ unsigned long __offset, __save12;					      \
      __asm__ ("bras %0,1f\n"						      \
      __asm__ ("bras %0,1f\n"						      \
@@ -677,7 +677,7 @@ register void *__gp __asm__("$29");
      (int *) (__builtin_thread_pointer() + __offset); })
      (int *) (__builtin_thread_pointer() + __offset); })
 # endif
 # endif
 
 
-# ifdef PIC
+# ifdef __PIC__
 #  define TLS_GD(x) \
 #  define TLS_GD(x) \
   ({ unsigned long __offset, __save12;					      \
   ({ unsigned long __offset, __save12;					      \
      __asm__ ("bras %0,1f\n"						      \
      __asm__ ("bras %0,1f\n"						      \