Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if ...
details: https://anonhg.NetBSD.org/src/rev/60a1e988e338
branches: trunk
changeset: 789897:60a1e988e338
user: joerg <joerg%NetBSD.org@localhost>
date: Thu Sep 12 15:36:14 2013 +0000
description:
Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if it is small
vs big PIC mode. Retire -DPIC and -DBIGPIC.
diffstat:
common/lib/libc/arch/arm/gen/divsi3.S | 4 +-
common/lib/libc/arch/arm/gen/udivsi3.S | 4 +-
common/lib/libc/arch/sparc/atomic/atomic_cas.S | 6 +-
common/lib/libc/arch/sparc/string/ffs.S | 6 +-
common/lib/libc/arch/sparc64/string/ffs.S | 6 +-
external/gpl3/gcc/lib/libgcc/libgcc/Makefile | 4 +-
external/mit/xorg/server/xorg-server/Xext/Xextmodule/Makefile | 4 +-
lib/csu/arch/sh3/crtbegin.S | 30 +++---
lib/csu/common/Makefile.inc | 10 +-
lib/libc/arch/arm/gen/_setjmp.S | 4 +-
lib/libc/arch/arm/gen/setjmp.S | 4 +-
lib/libc/arch/arm/sys/brk.S | 6 +-
lib/libc/arch/arm/sys/cerror.S | 10 +-
lib/libc/arch/arm/sys/ptrace.S | 10 +-
lib/libc/arch/arm/sys/sbrk.S | 4 +-
lib/libc/arch/hppa/gen/_resumecontext.S | 6 +-
lib/libc/arch/hppa/sys/brk.S | 16 +-
lib/libc/arch/hppa/sys/cerror.S | 4 +-
lib/libc/arch/hppa/sys/sbrk.S | 16 +-
lib/libc/arch/i386/SYS.h | 4 +-
lib/libc/arch/i386/gen/fixunsdfsi.S | 8 +-
lib/libc/arch/i386/gen/resumecontext.S | 10 +-
lib/libc/arch/i386/gen/setjmp.S | 8 +-
lib/libc/arch/i386/gen/sigsetjmp.S | 8 +-
lib/libc/arch/i386/gen/swapcontext.S | 10 +-
lib/libc/arch/i386/sys/__clone.S | 4 +-
lib/libc/arch/i386/sys/brk.S | 6 +-
lib/libc/arch/i386/sys/cerror.S | 8 +-
lib/libc/arch/i386/sys/ptrace.S | 8 +-
lib/libc/arch/i386/sys/sbrk.S | 6 +-
lib/libc/arch/m68k/sys/__vfork14.S | 8 +-
lib/libc/arch/m68k/sys/brk.S | 8 +-
lib/libc/arch/m68k/sys/cerror.S | 6 +-
lib/libc/arch/m68k/sys/ptrace.S | 8 +-
lib/libc/arch/mips/sys/cerror.S | 6 +-
lib/libc/arch/powerpc/gen/swapcontext.S | 8 +-
lib/libc/arch/powerpc/string/bzero.S | 6 +-
lib/libc/arch/powerpc/sys/__clone.S | 6 +-
lib/libc/arch/powerpc/sys/brk.S | 8 +-
lib/libc/arch/powerpc/sys/cerror.S | 14 +-
lib/libc/arch/powerpc/sys/ptrace.S | 12 +-
lib/libc/arch/powerpc/sys/sbrk.S | 6 +-
lib/libc/arch/powerpc64/sys/cerror.S | 8 +-
lib/libc/arch/powerpc64/sys/ptrace.S | 6 +-
lib/libc/arch/sh3/SYS.h | 8 +-
lib/libc/arch/sh3/gen/swapcontext.S | 6 +-
lib/libc/arch/sh3/sys/__clone.S | 4 +-
lib/libc/arch/sh3/sys/brk.S | 10 +-
lib/libc/arch/sh3/sys/cerror.S | 8 +-
lib/libc/arch/sh3/sys/ptrace.S | 8 +-
lib/libc/arch/sh3/sys/sbrk.S | 10 +-
lib/libc/arch/sparc/SYS.h | 4 +-
lib/libc/arch/sparc/gen/fixunsdfsi.S | 6 +-
lib/libc/arch/sparc/gen/modf.S | 8 +-
lib/libc/arch/sparc/gen/sigsetjmp.S | 8 +-
lib/libc/arch/sparc/gen/swapcontext.S | 6 +-
lib/libc/arch/sparc/sys/brk.S | 6 +-
lib/libc/arch/sparc/sys/cerror.S | 6 +-
lib/libc/arch/sparc/sys/ptrace.S | 6 +-
lib/libc/arch/sparc/sys/sbrk.S | 6 +-
lib/libc/arch/sparc64/SYS.h | 8 +-
lib/libc/arch/sparc64/gen/fixunsdfsi.S | 6 +-
lib/libc/arch/sparc64/gen/modf.S | 8 +-
lib/libc/arch/sparc64/gen/setjmp.S | 20 +--
lib/libc/arch/sparc64/gen/sigsetjmp.S | 14 +-
lib/libc/arch/sparc64/gen/swapcontext.S | 13 +-
lib/libc/arch/sparc64/sys/brk.S | 18 ++-
lib/libc/arch/sparc64/sys/cerror.S | 20 ++-
lib/libc/arch/sparc64/sys/sbrk.S | 20 ++-
lib/libc/arch/x86_64/gen/__setjmp14.S | 8 +-
lib/libc/arch/x86_64/gen/__sigsetjmp14.S | 8 +-
lib/libc/arch/x86_64/gen/resumecontext.S | 10 +-
lib/libc/arch/x86_64/gen/swapcontext.S | 8 +-
lib/libc/arch/x86_64/sys/__clone.S | 4 +-
lib/libc/arch/x86_64/sys/brk.S | 6 +-
lib/libc/arch/x86_64/sys/cerror.S | 8 +-
lib/libc/arch/x86_64/sys/ptrace.S | 8 +-
lib/libc/arch/x86_64/sys/sbrk.S | 6 +-
lib/libc/compat/arch/i386/gen/compat_setjmp.S | 8 +-
lib/libc/compat/arch/i386/gen/compat_sigsetjmp.S | 8 +-
lib/libc/compat/arch/i386/sys/compat_Ovfork.S | 6 +-
lib/libc/compat/arch/i386/sys/compat_sigprocmask.S | 6 +-
lib/libc/compat/arch/i386/sys/compat_sigsuspend.S | 6 +-
lib/libc/compat/arch/m68k/sys/compat_Ovfork.S | 8 +-
lib/libc/compat/arch/sparc/gen/compat_sigsetjmp.S | 8 +-
lib/libc/compat/arch/sparc64/gen/compat_sigsetjmp.S | 16 +-
lib/libc/compat/arch/x86_64/sys/compat_Ovfork.S | 6 +-
lib/libc/compat/arch/x86_64/sys/compat_sigprocmask.S | 6 +-
lib/libc/compat/arch/x86_64/sys/compat_sigsuspend.S | 6 +-
lib/libm/arch/i387/abi.h | 4 +-
share/mk/bsd.lib.mk | 51 +---------
share/mk/bsd.lua.mk | 4 +-
share/mk/bsd.sys.mk | 6 +-
sys/arch/amd64/include/asm.h | 4 +-
sys/arch/amd64/include/profile.h | 4 +-
sys/arch/arm/include/asm.h | 6 +-
sys/arch/arm/include/profile.h | 4 +-
sys/arch/hppa/include/asm.h | 4 +-
sys/arch/i386/include/asm.h | 4 +-
sys/arch/m68k/include/asm.h | 4 +-
sys/arch/powerpc/include/asm.h | 8 +-
sys/arch/powerpc/include/profile.h | 4 +-
sys/arch/sh3/include/asm.h | 8 +-
sys/arch/sparc/include/asm.h | 4 +-
sys/arch/sparc/include/profile.h | 4 +-
sys/lib/libkern/arch/hppa/prefix.h | 4 +-
sys/lib/libkern/arch/sparc/random.S | 8 +-
sys/lib/libkern/arch/sparc64/random.S | 8 +-
108 files changed, 425 insertions(+), 449 deletions(-)
diffs (truncated from 3520 to 300 lines):
diff -r 96a0a8e0f08a -r 60a1e988e338 common/lib/libc/arch/arm/gen/divsi3.S
--- a/common/lib/libc/arch/arm/gen/divsi3.S Thu Sep 12 15:35:15 2013 +0000
+++ b/common/lib/libc/arch/arm/gen/divsi3.S Thu Sep 12 15:36:14 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: divsi3.S,v 1.12 2013/09/09 07:33:54 matt Exp $ */
+/* $NetBSD: divsi3.S,v 1.13 2013/09/12 15:36:14 joerg Exp $ */
/*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
@@ -34,7 +34,7 @@
cmp r1, #0 @ dividing by 0?
beq .Ldiv0 @ call __aeabi_idiv0
ldr r2, .Lhwdiv_present
-# ifdef PIC
+#ifdef __PIC__
add r2, r2, pc @ pc = &.LPIC0
# endif
ldr r2, [r2]
diff -r 96a0a8e0f08a -r 60a1e988e338 common/lib/libc/arch/arm/gen/udivsi3.S
--- a/common/lib/libc/arch/arm/gen/udivsi3.S Thu Sep 12 15:35:15 2013 +0000
+++ b/common/lib/libc/arch/arm/gen/udivsi3.S Thu Sep 12 15:36:14 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: udivsi3.S,v 1.8 2013/09/09 07:33:54 matt Exp $ */
+/* $NetBSD: udivsi3.S,v 1.9 2013/09/12 15:36:14 joerg Exp $ */
/*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
@@ -34,7 +34,7 @@
cmp r1, #0
beq .Ldiv0
ldr r2, .Lhwdiv_present
-# ifdef PIC
+#ifdef __PIC__
add r2, r2, pc /* pc = &.LPIC0 */
# endif
ldr r2, [r2]
diff -r 96a0a8e0f08a -r 60a1e988e338 common/lib/libc/arch/sparc/atomic/atomic_cas.S
--- a/common/lib/libc/arch/sparc/atomic/atomic_cas.S Thu Sep 12 15:35:15 2013 +0000
+++ b/common/lib/libc/arch/sparc/atomic/atomic_cas.S Thu Sep 12 15:36:14 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: atomic_cas.S,v 1.11 2011/02/22 18:45:10 pooka Exp $ */
+/* $NetBSD: atomic_cas.S,v 1.12 2013/09/12 15:36:14 joerg Exp $ */
/*-
* Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
@@ -63,14 +63,14 @@
#if defined(MULTIPROCESSOR)
.section .bss
.align 1024
-#ifdef PIC
+#ifdef __PIC__
.globl _C_LABEL(_atomic_cas_locktab)
#endif
OTYPE(_C_LABEL(_atomic_cas_locktab))
_C_LABEL(_atomic_cas_locktab):
.space 1024
-#ifdef PIC
+#ifdef __PIC__
/* o4 is not used for PSR in PIC cases, so we can use it here */
#define GETLOCKTAB \
PIC_PROLOGUE(%o3,%o4) ;\
diff -r 96a0a8e0f08a -r 60a1e988e338 common/lib/libc/arch/sparc/string/ffs.S
--- a/common/lib/libc/arch/sparc/string/ffs.S Thu Sep 12 15:35:15 2013 +0000
+++ b/common/lib/libc/arch/sparc/string/ffs.S Thu Sep 12 15:36:14 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs.S,v 1.3 2011/07/04 11:18:23 mrg Exp $ */
+/* $NetBSD: ffs.S,v 1.4 2013/09/12 15:36:14 joerg Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -40,7 +40,7 @@
#if 0
.asciz "@(#)ffs.s 8.1 (Berkeley) 6/4/93"
#else
- RCSID("$NetBSD: ffs.S,v 1.3 2011/07/04 11:18:23 mrg Exp $")
+ RCSID("$NetBSD: ffs.S,v 1.4 2013/09/12 15:36:14 joerg Exp $")
#endif
#endif /* LIBC_SCCS and not lint */
@@ -60,7 +60,7 @@
*/
WEAK_ALIAS(__ffssi2,ffs)
ENTRY(ffs)
-#ifdef PIC
+#ifdef __PIC__
PICCY_SET(ffstab, %o2, %o3)
#else
set ffstab, %o2
diff -r 96a0a8e0f08a -r 60a1e988e338 common/lib/libc/arch/sparc64/string/ffs.S
--- a/common/lib/libc/arch/sparc64/string/ffs.S Thu Sep 12 15:35:15 2013 +0000
+++ b/common/lib/libc/arch/sparc64/string/ffs.S Thu Sep 12 15:36:14 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs.S,v 1.2 2009/12/19 19:09:48 pooka Exp $ */
+/* $NetBSD: ffs.S,v 1.3 2013/09/12 15:36:14 joerg Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -40,7 +40,7 @@
#if 0
.asciz "@(#)ffs.s 8.1 (Berkeley) 6/4/93"
#else
- RCSID("$NetBSD: ffs.S,v 1.2 2009/12/19 19:09:48 pooka Exp $")
+ RCSID("$NetBSD: ffs.S,v 1.3 2013/09/12 15:36:14 joerg Exp $")
#endif
#endif /* LIBC_SCCS and not lint */
@@ -81,7 +81,7 @@
* that ffstab[0] must be -24 so that ffs(0) will return 0.
*/
ENTRY(ffs)
-#ifdef PIC
+#ifdef __PIC__
PICCY_SET(ffstab, %o2, %o3)
#else
set ffstab, %o2
diff -r 96a0a8e0f08a -r 60a1e988e338 external/gpl3/gcc/lib/libgcc/libgcc/Makefile
--- a/external/gpl3/gcc/lib/libgcc/libgcc/Makefile Thu Sep 12 15:35:15 2013 +0000
+++ b/external/gpl3/gcc/lib/libgcc/libgcc/Makefile Thu Sep 12 15:36:14 2013 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.14 2013/08/22 00:16:54 matt Exp $
+# $NetBSD: Makefile,v 1.15 2013/09/12 15:36:14 joerg Exp $
REQUIRETOOLS= yes
NOLINT= # defined
@@ -69,7 +69,7 @@
.S.o .s.o:
${_MKTARGET_COMPILE}
- ${COMPILE.S} ${CAPICFLAGS} ${CFLAGS:M-[ID]*} ${.IMPSRC} -o ${.TARGET}.tmp1
+ ${COMPILE.S} ${PICFLAGS} ${CFLAGS:M-[ID]*} ${.IMPSRC} -o ${.TARGET}.tmp1
${NM} -pg ${.TARGET}.tmp1 | \
${TOOL_AWK} 'NF == 3 { print "\t.hidden", $$3 }' | \
${CC} ${COPTS} -Wl,-x -r -nostdinc -nostdlib -o ${.TARGET}.tmp2 ${.TARGET}.tmp1 -xassembler -
diff -r 96a0a8e0f08a -r 60a1e988e338 external/mit/xorg/server/xorg-server/Xext/Xextmodule/Makefile
--- a/external/mit/xorg/server/xorg-server/Xext/Xextmodule/Makefile Thu Sep 12 15:35:15 2013 +0000
+++ b/external/mit/xorg/server/xorg-server/Xext/Xextmodule/Makefile Thu Sep 12 15:36:14 2013 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.6 2008/08/28 07:33:22 mrg Exp $
+# $NetBSD: Makefile,v 1.7 2013/09/12 15:36:14 joerg Exp $
LIBISPRIVATE= yes
LIB= Xextmodule
-COPTS+= ${CPICFLAGS}
+COPTS+= ${PICFLAGS}
.include "../../Makefile.serverlib"
.include "../Makefile.Xextmodule"
diff -r 96a0a8e0f08a -r 60a1e988e338 lib/csu/arch/sh3/crtbegin.S
--- a/lib/csu/arch/sh3/crtbegin.S Thu Sep 12 15:35:15 2013 +0000
+++ b/lib/csu/arch/sh3/crtbegin.S Thu Sep 12 15:36:14 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: crtbegin.S,v 1.2 2012/06/02 22:15:15 uwe Exp $ */
+/* $NetBSD: crtbegin.S,v 1.3 2013/09/12 15:36:14 joerg Exp $ */
/*-
* Copyright (c) 2012 Valeriy E. Ushakov
* All rights reserved.
@@ -30,7 +30,7 @@
#include <machine/asm.h>
-RCSID("$NetBSD: crtbegin.S,v 1.2 2012/06/02 22:15:15 uwe Exp $")
+RCSID("$NetBSD: crtbegin.S,v 1.3 2013/09/12 15:36:14 joerg Exp $")
.section .ctors, "aw", @progbits
.p2align 2
@@ -84,7 +84,7 @@
* address and only r0 can be used in @(r0, Rm) addressing mode, so we
* always load variable address to r0.
*/
-#ifdef PIC
+#ifdef __PIC__
#define VAR_DATUM(var) var@GOTOFF
#define FUNC_DATUM(f) f@GOT
#define R0VAR (r0, r12)
@@ -98,7 +98,7 @@
__do_global_ctors_aux:
mov.l r8, @-sp
mov.l r9, @-sp
-#ifdef PIC
+#ifdef __PIC__
mov.l r12, @-sp
mov.l .Lc_got, r12
mova .Lc_got, r0
@@ -121,7 +121,7 @@
!! if (__register_frame_info)
!! __register_frame_info(&__EH_FRAME_LIST__[0], &__dwarf_eh_object)
-#ifdef PIC
+#ifdef __PIC__
mov.l .Lc___register_frame_info_GOT, r0
mov.l @R0VAR, r1
tst r1, r1
@@ -146,7 +146,7 @@
!! if (_Jv_RegisterClasses && __JCR_LIST__[0])
!! _Jv_RegisterClasses(&__JCR_LIST__[0]);
-#ifdef PIC
+#ifdef __PIC__
mov.l .Lc__Jv_RegisterClasses_GOT, r0
mov.l @R0VAR, r1
tst r1, r1
@@ -183,7 +183,7 @@
!! call all constructors on __CTOR_LIST__ in reverse order
mov.l .Lc___CTOR_LIST_END__, r8
-#ifdef PIC
+#ifdef __PIC__
add r12, r8
#endif
add #-4, r8
@@ -203,7 +203,7 @@
mov r14, sp
lds.l @sp+, pr
mov.l @sp+, r14
-#ifdef PIC
+#ifdef __PIC__
mov.l @sp+, r12
#endif
mov.l @sp+, r9
@@ -215,7 +215,7 @@
PIC_GOT_DATUM
.Lc___initialized:
.long VAR_DATUM(__initialized)
-#ifdef PIC
+#ifdef __PIC__
.Lc___register_frame_info_GOT:
.long __register_frame_info@GOT
#endif
@@ -225,7 +225,7 @@
.long VAR_DATUM(__EH_FRAME_LIST__)
.Lc___dwarf_eh_object:
.long VAR_DATUM(__dwarf_eh_object)
-#ifdef PIC
+#ifdef __PIC__
.Lc__Jv_RegisterClasses_GOT:
.long _Jv_RegisterClasses@GOT
#endif
@@ -240,7 +240,7 @@
__do_global_dtors_aux:
mov.l r8, @-sp
mov.l r9, @-sp
-#ifdef PIC
+#ifdef __PIC__
mov.l r12, @-sp
mov.l .Ld_got, r12
mova .Ld_got, r0
@@ -277,7 +277,7 @@
!! call all destructors on __DTOR_LIST__
mov.l .Ld___DTOR_LIST__, r8
-#ifdef PIC
+#ifdef __PIC__
add r12, r8
#endif
add #4, r8 ! skip first entry that we know to be -1
@@ -293,7 +293,7 @@
!! if (__deregister_frame_info)
!! __deregister_frame_info(&__EH_FRAME_LIST__[0]);
-#ifdef PIC
+#ifdef __PIC__
mov.l .Ld___deregister_frame_info_GOT, r0
mov.l @R0VAR, r1
tst r1, r1
@@ -317,7 +317,7 @@
mov r14, sp
lds.l @sp+, pr
mov.l @sp+, r14
-#ifdef PIC
+#ifdef __PIC__
mov.l @sp+, r12
#endif
mov.l @sp+, r9
@@ -339,7 +339,7 @@
#endif
.Ld___DTOR_LIST__:
.long VAR_DATUM(__DTOR_LIST__)
-#ifdef PIC
+#ifdef __PIC__
.Ld___deregister_frame_info_GOT:
.long __deregister_frame_info@GOT
#endif
diff -r 96a0a8e0f08a -r 60a1e988e338 lib/csu/common/Makefile.inc
--- a/lib/csu/common/Makefile.inc Thu Sep 12 15:35:15 2013 +0000
+++ b/lib/csu/common/Makefile.inc Thu Sep 12 15:36:14 2013 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.17 2013/09/10 16:45:33 matt Exp $
+# $NetBSD: Makefile.inc,v 1.18 2013/09/12 15:36:15 joerg Exp $
.include <bsd.own.mk>
@@ -60,15 +60,15 @@
.endif
.if ${MKPIC} != "no"
-PICFLAGS= -fPIC
+MY_PICFLAGS= ${PICFLAGS}
.else
Home |
Main Index |
Thread Index |
Old Index