aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/conf/Makefile.mips3
-rw-r--r--sys/conf/Makefile.powerpc1
-rw-r--r--sys/conf/kern.post.mk3
3 files changed, 1 insertions, 6 deletions
diff --git a/sys/conf/Makefile.mips b/sys/conf/Makefile.mips
index 0d486ed683d7..0060ad7f03d3 100644
--- a/sys/conf/Makefile.mips
+++ b/sys/conf/Makefile.mips
@@ -50,12 +50,9 @@ ARCH_FLAGS+=-mabi=${MIPS_ABI}
EXTRA_FLAGS=-fno-pic -mno-abicalls -G0 -DKERNLOADADDR=${KERNLOADADDR}
EXTRA_FLAGS+=-${MIPS_ENDIAN}
-HACK_EXTRA_FLAGS=-shared
-
# We add the -fno-pic flag to kernels because otherwise performance
# is extremely poor, as well as -mno-abicalls to force no ABI usage.
CFLAGS+=${EXTRA_FLAGS} $(ARCH_FLAGS)
-HACK_EXTRA_FLAGS+=${EXTRA_FLAGS} $(ARCH_FLAGS)
TRAMP_ARCH_FLAGS?=$(ARCH_FLAGS)
TRAMP_EXTRA_FLAGS=${EXTRA_FLAGS} ${TRAMP_ARCH_FLAGS}
# Kernel code is always compiled with soft-float on MIPS
diff --git a/sys/conf/Makefile.powerpc b/sys/conf/Makefile.powerpc
index 907f64dca62e..f8b5bd6b0547 100644
--- a/sys/conf/Makefile.powerpc
+++ b/sys/conf/Makefile.powerpc
@@ -39,7 +39,6 @@ INCLUDES+= -I$S/contrib/libfdt
# Force __SPE__, since the builtin will be removed later with -mno-spe
CFLAGS.gcc+= -mabi=spe -D__SPE__
CFLAGS.clang+= -mspe -D__SPE__ -m32
-HACK_EXTRA_FLAGS= -shared -m32 -mspe -D__SPE__
.endif
CFLAGS+= -msoft-float
CFLAGS.gcc+= -Wa,-many
diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk
index 3f6e26429481..acbfc6638fa7 100644
--- a/sys/conf/kern.post.mk
+++ b/sys/conf/kern.post.mk
@@ -226,10 +226,9 @@ kernel-clean:
# This is a hack. BFD "optimizes" away dynamic mode if there are no
# dynamic references. We could probably do a '-Bforcedynamic' mode like
# in the a.out ld. For now, this works.
-HACK_EXTRA_FLAGS?= -shared
hack.pico: Makefile
:> hack.c
- ${CC} ${HACK_EXTRA_FLAGS} -nostdlib hack.c -o hack.pico
+ ${CC} -shared ${CFLAGS} -nostdlib hack.c -o hack.pico
rm -f hack.c
offset.inc: $S/kern/genoffset.sh genoffset.o