diff options
author | John Baldwin <jhb@FreeBSD.org> | 2020-01-26 14:19:08 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2020-01-26 14:19:08 +0000 |
commit | 1207cda9614c0efa314f5bef902cd12d77cf4d97 (patch) | |
tree | b0b0d590c87ab69bbefb274a15371202524ad063 /sys/dev/ste | |
parent | 75831a1c95e7bcaab9a70bc321f5e7bdde5b989f (diff) | |
download | src-1207cda9614c0efa314f5bef902cd12d77cf4d97.tar.gz src-1207cda9614c0efa314f5bef902cd12d77cf4d97.zip |
Compile hack.c with normal CFLAGS + -shared -nostdlib.
Originally, hack.c was compiled into a shard object with just -shared
-nostdlib. This assumed that ${CC} did not require any additional
flags for ABIs, cross-building, etc.
When kern.post.mk was created in r89509 by reducing duplication in
kernel Makefile.<arch> files, the -shared flag was moved into a
HACK_EXTRA_FLAGS variable so that sparc64 could override it with
-Wl,-shared. The sparc64 hack was removed in r111650, but
HACK_EXTRA_FLAGS was left in place. Over time, we have started
support toolchains that require flags to support alternate ABIs on
MIPS and PowerPC and started (ab)using HACK_EXTRA_FLAGS to set only
those flags.
I need to fix risc-v to pass -mno-relax to the hack.c build for lld in
llvm 10, and the patches to support cross-build from non-FreeBSD hosts
need to include -target for clang in CFLAGS for hack.c. Rather than
adding more hacks into HACK_EXTRA_FLAGS, just use the full set of
CFLAGS with hack.c.
Reviewed by: kib, arichardson
MFC after: 1 month
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D23362
Notes
Notes:
svn path=/head/; revision=357145
Diffstat (limited to 'sys/dev/ste')
0 files changed, 0 insertions, 0 deletions