More fixes to build the kernel with a compiler that defaults to -fno-common

Using the same approach as the last commit for the files used by genassym.sh.

Obtained from:	CheriBSD
This commit is contained in:
Alex Richardson 2020-04-18 12:54:40 +00:00
parent a8976aec45
commit 4db3ef4c77
5 changed files with 7 additions and 7 deletions

View File

@ -38,7 +38,7 @@ cloudabi64_vdso_blob.o optional compat_cloudabi64 \
#
linux32_genassym.o optional compat_linux32 \
dependency "$S/amd64/linux32/linux32_genassym.c offset.inc" \
compile-with "${CC} ${CFLAGS:N-flto:N-fno-common} -c ${.IMPSRC}" \
compile-with "${CC} ${CFLAGS:N-flto:N-fno-common} -fcommon -c ${.IMPSRC}" \
no-obj no-implicit-rule \
clean "linux32_genassym.o"
#
@ -62,7 +62,7 @@ linux32_vdso.so optional compat_linux32 \
#
ia32_genassym.o standard \
dependency "$S/compat/ia32/ia32_genassym.c offset.inc" \
compile-with "${CC} ${CFLAGS:N-flto:N-fno-common} -c ${.IMPSRC}" \
compile-with "${CC} ${CFLAGS:N-flto:N-fno-common} -fcommon -c ${.IMPSRC}" \
no-obj no-implicit-rule \
clean "ia32_genassym.o"
#

View File

@ -25,7 +25,7 @@ cloudabi32_vdso_blob.o optional compat_cloudabi32 \
#
linux_genassym.o optional compat_linux \
dependency "$S/i386/linux/linux_genassym.c offset.inc" \
compile-with "${CC} ${CFLAGS:N-flto:N-fno-common} -c ${.IMPSRC}" \
compile-with "${CC} ${CFLAGS:N-flto:N-fno-common} -fcommon -c ${.IMPSRC}" \
no-obj no-implicit-rule \
clean "linux_genassym.o"
#

View File

@ -78,7 +78,7 @@ ${VDSO}.so: linux${SFX}_locore.o
.endif
linux${SFX}_genassym.o: offset.inc
${CC} -c ${CFLAGS:N-flto:N-fno-common} ${.IMPSRC}
${CC} -c ${CFLAGS:N-flto:N-fno-common} -fcommon ${.IMPSRC}
.if !defined(KERNBUILDDIR)
.warning Building Linuxulator outside of a kernel does not make sense

View File

@ -53,7 +53,7 @@ linux_support.o: assym.inc linux_assym.h
${.IMPSRC} -o ${.TARGET}
linux_genassym.o: offset.inc
${CC} -c ${CFLAGS:N-flto:N-fno-common} ${.IMPSRC}
${CC} -c ${CFLAGS:N-flto:N-fno-common} -fcommon ${.IMPSRC}
.if !defined(KERNBUILDDIR)
.warning Building Linuxulator outside of a kernel does not make sense

View File

@ -75,9 +75,9 @@ svm_support.o:
${.IMPSRC} -o ${.TARGET}
vmx_genassym.o: offset.inc
${CC} -c ${CFLAGS:N-flto:N-fno-common} ${.IMPSRC}
${CC} -c ${CFLAGS:N-flto:N-fno-common} -fcommon ${.IMPSRC}
svm_genassym.o: offset.inc
${CC} -c ${CFLAGS:N-flto:N-fno-common} ${.IMPSRC}
${CC} -c ${CFLAGS:N-flto:N-fno-common} -fcommon ${.IMPSRC}
.include <bsd.kmod.mk>