John Baldwin 1207cda961 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
2020-01-26 14:19:08 +00:00
..
2019-07-19 17:48:29 +00:00
2020-01-22 13:53:18 +00:00
2019-11-21 01:24:49 +00:00
2019-11-21 01:24:49 +00:00
2019-11-21 18:14:26 +00:00
2018-11-01 23:11:47 +00:00
2018-11-01 23:11:47 +00:00
2019-11-26 20:46:20 +00:00
2020-01-02 17:51:49 +00:00
2018-04-12 17:43:19 +00:00
2020-01-23 13:56:12 +00:00