diff options
author | Brooks Davis <brooks@FreeBSD.org> | 2020-04-07 15:32:08 +0000 |
---|---|---|
committer | Brooks Davis <brooks@FreeBSD.org> | 2020-04-07 15:32:08 +0000 |
commit | ab2b8d671bb3764e2b00d49f82819d571572a2d2 (patch) | |
tree | c01c7dd9572cd891440b59466c19d9ce8f3e8598 /sys/conf/kern.post.mk | |
parent | cddd13a4f4f0e81a823bde57560bc3be13ffb9ad (diff) | |
download | src-ab2b8d671bb3764e2b00d49f82819d571572a2d2.tar.gz src-ab2b8d671bb3764e2b00d49f82819d571572a2d2.zip |
Allow the kernel to build with a compiler that sets -fno-common.
The mechanism that generates assym.inc and offset.inc depends on the
symbols in question being common. For now, simply force the object files
to be created with -fcommon.
-fno-common will be the default in GCC10/LLVM11.
Submitted by: arichardson
Reviewed by: kevans
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D24322
Notes
Notes:
svn path=/head/; revision=359691
Diffstat (limited to 'sys/conf/kern.post.mk')
-rw-r--r-- | sys/conf/kern.post.mk | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk index e5aeac68d8fa..529a02ac6796 100644 --- a/sys/conf/kern.post.mk +++ b/sys/conf/kern.post.mk @@ -235,20 +235,20 @@ offset.inc: $S/kern/genoffset.sh genoffset.o NM='${NM}' NMFLAGS='${NMFLAGS}' sh $S/kern/genoffset.sh genoffset.o > ${.TARGET} genoffset.o: $S/kern/genoffset.c - ${CC} -c ${CFLAGS:N-flto:N-fno-common} $S/kern/genoffset.c + ${CC} -c ${CFLAGS:N-flto:N-fno-common} -fcommon $S/kern/genoffset.c # genoffset_test.o is not actually used for anything - the point of compiling it # is to exercise the CTASSERT that checks that the offsets in the offset.inc # _lite struct(s) match those in the original(s). genoffset_test.o: $S/kern/genoffset.c offset.inc - ${CC} -c ${CFLAGS:N-flto:N-fno-common} -DOFFSET_TEST \ + ${CC} -c ${CFLAGS:N-flto:N-fno-common} -fcommon -DOFFSET_TEST \ $S/kern/genoffset.c -o ${.TARGET} assym.inc: $S/kern/genassym.sh genassym.o genoffset_test.o NM='${NM}' NMFLAGS='${NMFLAGS}' sh $S/kern/genassym.sh genassym.o > ${.TARGET} genassym.o: $S/$M/$M/genassym.c offset.inc - ${CC} -c ${CFLAGS:N-flto:N-fno-common} $S/$M/$M/genassym.c + ${CC} -c ${CFLAGS:N-flto:N-fno-common} -fcommon $S/$M/$M/genassym.c OBJS_DEPEND_GUESS+= opt_global.h genoffset.o genassym.o vers.o: opt_global.h |