summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2017-05-15 14:23:53 +0000
committeremaste <emaste@FreeBSD.org>2017-05-15 14:23:53 +0000
commit054f6b7d3a6ec9d195b41c4d19935754645d676a (patch)
treeb9e2b849028ed0995648da4ec1d3f4b5dcb21565
parent8f3fff01efe66274c76ddd5c2fc5efbbe52e10a9 (diff)
downloadFreeBSD-src-054f6b7d3a6ec9d195b41c4d19935754645d676a.zip
FreeBSD-src-054f6b7d3a6ec9d195b41c4d19935754645d676a.tar.gz
MFC r314054: Exclude -flto when building *genassym.o
The build process generates *assym.h using nm from *genassym.o (which is in turn created from *genassym.c). When compiling with link-time optimization (LTO) using -flto, .o files are LLVM bitcode, not ELF objects. This is not usable by genassym.sh, so remove -flto from those ${CC} invocations. Sponsored by: The FreeBSD Foundation
-rw-r--r--sys/conf/files.amd644
-rw-r--r--sys/conf/files.i3864
-rw-r--r--sys/conf/kern.post.mk2
-rw-r--r--sys/conf/kmod.mk2
-rw-r--r--sys/modules/linux/Makefile2
-rw-r--r--sys/modules/linux64/Makefile2
-rw-r--r--sys/modules/svr4/Makefile2
-rw-r--r--sys/modules/vmm/Makefile4
8 files changed, 11 insertions, 11 deletions
diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64
index 2271e1c..2730f38 100644
--- a/sys/conf/files.amd64
+++ b/sys/conf/files.amd64
@@ -34,7 +34,7 @@ cloudabi64_vdso_blob.o optional compat_cloudabi64 \
#
linux32_genassym.o optional compat_linux32 \
dependency "$S/amd64/linux32/linux32_genassym.c" \
- compile-with "${CC} ${CFLAGS:N-fno-common} -c ${.IMPSRC}" \
+ compile-with "${CC} ${CFLAGS:N-flto:N-fno-common} -c ${.IMPSRC}" \
no-obj no-implicit-rule \
clean "linux32_genassym.o"
#
@@ -58,7 +58,7 @@ linux32_vdso.so optional compat_linux32 \
#
ia32_genassym.o standard \
dependency "$S/compat/ia32/ia32_genassym.c" \
- compile-with "${CC} ${CFLAGS:N-fno-common} -c ${.IMPSRC}" \
+ compile-with "${CC} ${CFLAGS:N-flto:N-fno-common} -c ${.IMPSRC}" \
no-obj no-implicit-rule \
clean "ia32_genassym.o"
#
diff --git a/sys/conf/files.i386 b/sys/conf/files.i386
index c25a989..58ad5fd 100644
--- a/sys/conf/files.i386
+++ b/sys/conf/files.i386
@@ -21,7 +21,7 @@ cloudabi32_vdso_blob.o optional compat_cloudabi32 \
#
linux_genassym.o optional compat_linux \
dependency "$S/i386/linux/linux_genassym.c" \
- compile-with "${CC} ${CFLAGS:N-fno-common} -c ${.IMPSRC}" \
+ compile-with "${CC} ${CFLAGS:N-flto:N-fno-common} -c ${.IMPSRC}" \
no-obj no-implicit-rule \
clean "linux_genassym.o"
#
@@ -45,7 +45,7 @@ linux_vdso.so optional compat_linux \
#
svr4_genassym.o optional compat_svr4 \
dependency "$S/i386/svr4/svr4_genassym.c" \
- compile-with "${CC} ${CFLAGS:N-fno-common} -c ${.IMPSRC}" \
+ compile-with "${CC} ${CFLAGS:N-flto:N-fno-common} -c ${.IMPSRC}" \
no-obj no-implicit-rule \
clean "svr4_genassym.o"
#
diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk
index 1891277..aa6cc60 100644
--- a/sys/conf/kern.post.mk
+++ b/sys/conf/kern.post.mk
@@ -189,7 +189,7 @@ assym.s: $S/kern/genassym.sh genassym.o
NM='${NM}' NMFLAGS='${NMFLAGS}' sh $S/kern/genassym.sh genassym.o > ${.TARGET}
genassym.o: $S/$M/$M/genassym.c
- ${CC} -c ${CFLAGS:N-fno-common} $S/$M/$M/genassym.c
+ ${CC} -c ${CFLAGS:N-flto:N-fno-common} $S/$M/$M/genassym.c
${SYSTEM_OBJS} genassym.o vers.o: opt_global.h
diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk
index 73b2626..4c3204c 100644
--- a/sys/conf/kmod.mk
+++ b/sys/conf/kmod.mk
@@ -462,7 +462,7 @@ assym.s: ${SYSDIR}/kern/genassym.sh
sh ${SYSDIR}/kern/genassym.sh genassym.o > ${.TARGET}
genassym.o: ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c
genassym.o: ${SRCS:Mopt_*.h}
- ${CC} -c ${CFLAGS:N-fno-common} \
+ ${CC} -c ${CFLAGS:N-flto:N-fno-common} \
${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c
.endif
diff --git a/sys/modules/linux/Makefile b/sys/modules/linux/Makefile
index d1707c9..d37fcf5 100644
--- a/sys/modules/linux/Makefile
+++ b/sys/modules/linux/Makefile
@@ -71,7 +71,7 @@ ${VDSO}.so: linux${SFX}_locore.o
.endif
linux${SFX}_genassym.o:
- ${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC}
+ ${CC} -c ${CFLAGS:N-flto:N-fno-common} ${.IMPSRC}
.if !defined(KERNBUILDDIR)
.if defined(KTR)
diff --git a/sys/modules/linux64/Makefile b/sys/modules/linux64/Makefile
index 1162b55..a5c8723 100644
--- a/sys/modules/linux64/Makefile
+++ b/sys/modules/linux64/Makefile
@@ -44,7 +44,7 @@ linux_support.o: assym.s linux_assym.h
${.IMPSRC} -o ${.TARGET}
linux_genassym.o:
- ${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC}
+ ${CC} -c ${CFLAGS:N-flto:N-fno-common} ${.IMPSRC}
.if !defined(KERNBUILDDIR)
.if defined(DEBUG)
diff --git a/sys/modules/svr4/Makefile b/sys/modules/svr4/Makefile
index c152b38..52fa3d7 100644
--- a/sys/modules/svr4/Makefile
+++ b/sys/modules/svr4/Makefile
@@ -22,7 +22,7 @@ svr4_locore.o: svr4_locore.s svr4_assym.h
${.IMPSRC} -o ${.TARGET}
svr4_genassym.o: svr4_genassym.c svr4.h
- ${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC}
+ ${CC} -c ${CFLAGS:N-flto:N-fno-common} ${.IMPSRC}
.if !defined(KERNBUILDDIR) && defined(DEBUG)
opt_svr4.h:
diff --git a/sys/modules/vmm/Makefile b/sys/modules/vmm/Makefile
index d94ceba..86cb58c 100644
--- a/sys/modules/vmm/Makefile
+++ b/sys/modules/vmm/Makefile
@@ -71,9 +71,9 @@ svm_support.o:
${.IMPSRC} -o ${.TARGET}
vmx_genassym.o:
- ${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC}
+ ${CC} -c ${CFLAGS:N-flto:N-fno-common} ${.IMPSRC}
svm_genassym.o:
- ${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC}
+ ${CC} -c ${CFLAGS:N-flto:N-fno-common} ${.IMPSRC}
.include <bsd.kmod.mk>
OpenPOWER on IntegriCloud