diff options
author | 2013-04-01 19:12:13 +0000 | |
---|---|---|
committer | 2013-04-01 19:12:13 +0000 | |
commit | 71bd7fd50d75040b96ad44308fa8a8612eea9a13 (patch) | |
tree | 3d3342392374ec6b18177e2e33d59581ab3b0565 | |
parent | Some firmware revisions on UltraSPARC T2 machines apparently insist on having (diff) | |
download | wireguard-openbsd-71bd7fd50d75040b96ad44308fa8a8612eea9a13.tar.xz wireguard-openbsd-71bd7fd50d75040b96ad44308fa8a8612eea9a13.zip |
Build mips kernels with -G 0, to disable use of so-called `small' data and
bss sections. The current kernel linker script is not gp-friendly enough for
that; and while gas 2.15 was not attempting to output gp-relative relocations
for variables which might have ended up in .sdata or .sbss, gas 2.17 will,
and the kernel will fail to link.
To be improved eventually with a better kernel ld script putting the
gp-addressable sections close enough to gp... and making sure kernel gp is
reloaded in all the userland->kernel code paths which might need gp in the
kernel.
-rw-r--r-- | sys/arch/loongson/conf/Makefile.loongson | 4 | ||||
-rw-r--r-- | sys/arch/octeon/conf/Makefile.octeon | 4 | ||||
-rw-r--r-- | sys/arch/sgi/conf/Makefile.sgi | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/sys/arch/loongson/conf/Makefile.loongson b/sys/arch/loongson/conf/Makefile.loongson index 0fa050deeea..b16508dc038 100644 --- a/sys/arch/loongson/conf/Makefile.loongson +++ b/sys/arch/loongson/conf/Makefile.loongson @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.loongson,v 1.36 2013/03/30 07:25:20 tedu Exp $ +# $OpenBSD: Makefile.loongson,v 1.37 2013/04/01 19:12:13 miod Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -34,7 +34,7 @@ CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \ -Wno-main -Wno-uninitialized -Wno-format \ -Wstack-larger-than-2047 -CMACHFLAGS= -mno-abicalls ${ABI} -msoft-float -Wa,-mfix-loongson2f-btb +CMACHFLAGS= -mno-abicalls ${ABI} -msoft-float -Wa,-mfix-loongson2f-btb -G 0 CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \ -fno-builtin-vsnprintf -fno-builtin-log \ -fno-builtin-log2 -fno-builtin-malloc ${NOPIE_FLAGS} diff --git a/sys/arch/octeon/conf/Makefile.octeon b/sys/arch/octeon/conf/Makefile.octeon index 8b016bf1114..77e5ed8bf63 100644 --- a/sys/arch/octeon/conf/Makefile.octeon +++ b/sys/arch/octeon/conf/Makefile.octeon @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.octeon,v 1.12 2013/03/30 07:25:20 tedu Exp $ +# $OpenBSD: Makefile.octeon,v 1.13 2013/04/01 19:12:14 miod Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -34,7 +34,7 @@ CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \ -Wno-main -Wno-uninitialized -Wno-format \ -Wstack-larger-than-2047 -CMACHFLAGS= -mno-abicalls ${ABI} -msoft-float +CMACHFLAGS= -mno-abicalls ${ABI} -msoft-float -G 0 CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \ -fno-builtin-vsnprintf -fno-builtin-log \ -fno-builtin-log2 -fno-builtin-malloc ${NOPIE_FLAGS} diff --git a/sys/arch/sgi/conf/Makefile.sgi b/sys/arch/sgi/conf/Makefile.sgi index 84bd80e468e..a07ee2a9b8e 100644 --- a/sys/arch/sgi/conf/Makefile.sgi +++ b/sys/arch/sgi/conf/Makefile.sgi @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.sgi,v 1.59 2013/03/30 07:25:20 tedu Exp $ +# $OpenBSD: Makefile.sgi,v 1.60 2013/04/01 19:12:14 miod Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -34,7 +34,7 @@ CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \ -Wno-main -Wno-uninitialized -Wno-format \ -Wstack-larger-than-2047 -CMACHFLAGS= -mno-abicalls ${ABI} -msoft-float +CMACHFLAGS= -mno-abicalls ${ABI} -msoft-float -G 0 CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \ -fno-builtin-vsnprintf -fno-builtin-log \ -fno-builtin-log2 -fno-builtin-malloc ${NOPIE_FLAGS} |