Index: head/lib/libc/gen/errlst.c =================================================================== --- head/lib/libc/gen/errlst.c +++ head/lib/libc/gen/errlst.c @@ -158,7 +158,7 @@ }; const int sys_nerr = sizeof(sys_errlist) / sizeof(sys_errlist[0]); -#ifdef PIC +#ifdef __PIC__ __strong_reference(sys_errlist, __hidden_sys_errlist); __strong_reference(sys_nerr, __hidden_sys_nerr); #endif Index: head/lib/libc/gen/isnan.c =================================================================== --- head/lib/libc/gen/isnan.c +++ head/lib/libc/gen/isnan.c @@ -40,7 +40,7 @@ * time, when calling both functions. */ -#ifdef PIC +#ifdef __PIC__ __weak_reference(__isnan, isnan); __weak_reference(__isnanf, isnanf); @@ -61,4 +61,4 @@ u.f = f; return (u.bits.exp == 255 && u.bits.man != 0); } -#endif /* PIC */ +#endif /* __PIC__ */ Index: head/lib/libc/gen/tls.c =================================================================== --- head/lib/libc/gen/tls.c +++ head/lib/libc/gen/tls.c @@ -78,7 +78,7 @@ #define TLS_VARIANT_II #endif -#ifndef PIC +#ifndef __PIC__ #define round(size, align) \ (((size) + (align) - 1) & ~((align) - 1)) @@ -107,7 +107,7 @@ return (0); } -#ifndef PIC +#ifndef __PIC__ #ifdef TLS_VARIANT_I @@ -264,14 +264,14 @@ { } -#endif /* PIC */ +#endif /* __PIC__ */ extern char **environ; void _init_tls() { -#ifndef PIC +#ifndef __PIC__ Elf_Addr *sp; Elf_Auxinfo *aux, *auxp; Elf_Phdr *phdr; Index: head/lib/libc/include/errlst.h =================================================================== --- head/lib/libc/include/errlst.h +++ head/lib/libc/include/errlst.h @@ -31,7 +31,7 @@ #include -#ifdef PIC +#ifdef __PIC__ /* If the main executable imports these, do not use its copy from libc.so. */ extern const char *const __hidden_sys_errlist[] __hidden; extern const int __hidden_sys_nerr __hidden; Index: head/lib/libc/sys/stack_protector.c =================================================================== --- head/lib/libc/sys/stack_protector.c +++ head/lib/libc/sys/stack_protector.c @@ -115,6 +115,6 @@ __fail("buffer overflow detected; terminated"); } -#ifndef PIC +#ifndef __PIC__ __weak_reference(__stack_chk_fail, __stack_chk_fail_local); #endif Index: head/lib/libc/sys/stack_protector_compat.c =================================================================== --- head/lib/libc/sys/stack_protector_compat.c +++ head/lib/libc/sys/stack_protector_compat.c @@ -8,7 +8,7 @@ void __stack_chk_fail(void); -#ifdef PIC +#ifdef __PIC__ void __stack_chk_fail_local_hidden(void) { Index: head/lib/libkiconv/quirks.c =================================================================== --- head/lib/libkiconv/quirks.c +++ head/lib/libkiconv/quirks.c @@ -31,7 +31,7 @@ * when statically linked. */ -#ifdef PIC +#ifdef __PIC__ /* * Why do we need quirks? @@ -193,4 +193,4 @@ return (base); } -#endif /* PIC */ +#endif /* __PIC__ */ Index: head/lib/libkiconv/xlat16_iconv.c =================================================================== --- head/lib/libkiconv/xlat16_iconv.c +++ head/lib/libkiconv/xlat16_iconv.c @@ -31,7 +31,7 @@ * when statically linked. */ -#ifdef PIC +#ifdef __PIC__ #include #include @@ -462,4 +462,4 @@ return (-1); } -#endif /* PIC */ +#endif /* __PIC__ */ Index: head/lib/libkiconv/xlat16_sysctl.c =================================================================== --- head/lib/libkiconv/xlat16_sysctl.c +++ head/lib/libkiconv/xlat16_sysctl.c @@ -37,7 +37,7 @@ * when statically linked. */ -#ifdef PIC +#ifdef __PIC__ #include #include @@ -82,4 +82,4 @@ return (EINVAL); } -#endif /* PIC */ +#endif /* __PIC__ */ Index: head/lib/libmd/rmd160c.c =================================================================== --- head/lib/libmd/rmd160c.c +++ head/lib/libmd/rmd160c.c @@ -75,7 +75,7 @@ * The assembly-language code is not position-independent, so don't * try to use it in a shared library. */ -#ifdef PIC +#ifdef __PIC__ #undef RMD160_ASM #endif Index: head/lib/libmd/sha1c.c =================================================================== --- head/lib/libmd/sha1c.c +++ head/lib/libmd/sha1c.c @@ -78,7 +78,7 @@ * The assembly-language code is not position-independent, so don't * try to use it in a shared library. */ -#ifdef PIC +#ifdef __PIC__ #undef SHA1_ASM #endif Index: head/lib/libthr/thread/thr_exit.c =================================================================== --- head/lib/libthr/thread/thr_exit.c +++ head/lib/libthr/thread/thr_exit.c @@ -54,7 +54,7 @@ static int message_printed; static void thread_unwind(void) __dead2; -#ifdef PIC +#ifdef __PIC__ static void thread_uw_init(void); static _Unwind_Reason_Code thread_unwind_stop(int version, _Unwind_Action actions, @@ -114,7 +114,7 @@ #else #pragma weak _Unwind_GetCFA #pragma weak _Unwind_ForcedUnwind -#endif /* PIC */ +#endif /* __PIC__ */ static void thread_unwind_cleanup(_Unwind_Reason_Code code, struct _Unwind_Exception *e) @@ -222,11 +222,11 @@ curthread->ret = status; #ifdef _PTHREAD_FORCED_UNWIND -#ifdef PIC +#ifdef __PIC__ thread_uw_init(); -#endif /* PIC */ +#endif /* __PIC__ */ -#ifdef PIC +#ifdef __PIC__ if (uwl_forcedunwind != NULL) { #else if (_Unwind_ForcedUnwind != NULL) { Index: head/lib/libthr/thread/thr_private.h =================================================================== --- head/lib/libthr/thread/thr_private.h +++ head/lib/libthr/thread/thr_private.h @@ -100,7 +100,7 @@ #define THR_ASSERT(cond, msg) #endif -#ifdef PIC +#ifdef __PIC__ # define STATIC_LIB_REQUIRE(name) #else # define STATIC_LIB_REQUIRE(name) __asm (".globl " #name) Index: head/lib/msun/src/s_isnan.c =================================================================== --- head/lib/msun/src/s_isnan.c +++ head/lib/msun/src/s_isnan.c @@ -31,7 +31,7 @@ #include "fpmath.h" /* Provided by libc.so */ -#ifndef PIC +#ifndef __PIC__ #undef isnan int isnan(double d) @@ -41,7 +41,7 @@ u.d = d; return (u.bits.exp == 2047 && (u.bits.manl != 0 || u.bits.manh != 0)); } -#endif /* !PIC */ +#endif /* !__PIC__ */ int __isnanf(float f) Index: head/libexec/rtld-elf/rtld.c =================================================================== --- head/libexec/rtld-elf/rtld.c +++ head/libexec/rtld-elf/rtld.c @@ -1817,7 +1817,7 @@ objtmp.path = NULL; objtmp.rtld = true; objtmp.mapbase = mapbase; -#ifdef PIC +#ifdef __PIC__ objtmp.relocbase = mapbase; #endif if (RTLD_IS_DYNAMIC()) { Index: head/sys/amd64/include/asm.h =================================================================== --- head/sys/amd64/include/asm.h +++ head/sys/amd64/include/asm.h @@ -38,7 +38,7 @@ #include -#ifdef PIC +#ifdef __PIC__ #define PIC_PLT(x) x@PLT #define PIC_GOT(x) x@GOTPCREL(%rip) #else Index: head/sys/arm/include/asm.h =================================================================== --- head/sys/arm/include/asm.h +++ head/sys/arm/include/asm.h @@ -104,7 +104,7 @@ #define ASMSTR .asciz -#if defined(PIC) +#if defined(__PIC__) #define PLT_SYM(x) PIC_SYM(x, PLT) #define GOT_SYM(x) PIC_SYM(x, GOT) #define GOT_GET(x,got,sym) \ @@ -131,7 +131,7 @@ #define GOT_INIT(got,gotsym,pclabel) #define GOT_INITSYM(gotsym,pclabel) #define PIC_SYM(x,y) x -#endif /* PIC */ +#endif /* __PIC__ */ #undef __FBSDID #if !defined(lint) && !defined(STRIP_FBSDID) Index: head/sys/i386/include/asm.h =================================================================== --- head/sys/i386/include/asm.h +++ head/sys/i386/include/asm.h @@ -38,7 +38,7 @@ #include -#ifdef PIC +#ifdef __PIC__ #define PIC_PROLOGUE \ pushl %ebx; \ call 1f; \ Index: head/sys/powerpc/include/asm.h =================================================================== --- head/sys/powerpc/include/asm.h +++ head/sys/powerpc/include/asm.h @@ -37,7 +37,7 @@ #include -#if defined(PIC) && !defined(__powerpc64__) +#if defined(__PIC__) && !defined(__powerpc64__) #define PIC_PROLOGUE XXX #define PIC_EPILOGUE XXX #define PIC_PLT(x) x@plt Index: head/sys/powerpc/include/profile.h =================================================================== --- head/sys/powerpc/include/profile.h +++ head/sys/powerpc/include/profile.h @@ -119,7 +119,7 @@ " blr \n"); #else -#ifdef PIC +#ifdef __PIC__ #define _PLT "@plt" #else #define _PLT Index: head/sys/sparc64/include/asm.h =================================================================== --- head/sys/sparc64/include/asm.h +++ head/sys/sparc64/include/asm.h @@ -41,7 +41,7 @@ #include -#ifdef PIC +#ifdef __PIC__ #define PIC_PROLOGUE(r1, r2) \ sethi %hi(_GLOBAL_OFFSET_TABLE_-4), r1 ; \ rd %pc, r2 ; \