summaryrefslogtreecommitdiffstats
path: root/sys/modules/linux
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2012-02-28 18:30:18 +0000
committerdim <dim@FreeBSD.org>2012-02-28 18:30:18 +0000
commit0d1f91e8e1d46e491844d983927a0fbfc1c6b414 (patch)
tree3aa885ba7c336d9e6d260c5deb1228863b043b89 /sys/modules/linux
parent86b4719ed57cc44687bc6f6b1ea3786dce60a2d1 (diff)
downloadFreeBSD-src-0d1f91e8e1d46e491844d983927a0fbfc1c6b414.zip
FreeBSD-src-0d1f91e8e1d46e491844d983927a0fbfc1c6b414.tar.gz
Define several extra macros in bsd.sys.mk and sys/conf/kern.pre.mk, to
get rid of testing explicitly for clang (using ${CC:T:Mclang}) in individual Makefiles. Instead, use the following extra macros, for use with clang: - NO_WERROR.clang (disables -Werror) - NO_WCAST_ALIGN.clang (disables -Wcast-align) - NO_WFORMAT.clang (disables -Wformat and friends) - CLANG_NO_IAS (disables integrated assembler) - CLANG_OPT_SMALL (adds flags for extra small size optimizations) As a side effect, this enables setting CC/CXX/CPP in src.conf instead of make.conf! For clang, use the following: CC=clang CXX=clang++ CPP=clang-cpp MFC after: 2 weeks
Diffstat (limited to 'sys/modules/linux')
-rw-r--r--sys/modules/linux/Makefile9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/modules/linux/Makefile b/sys/modules/linux/Makefile
index 568ee2a..891d8a8 100644
--- a/sys/modules/linux/Makefile
+++ b/sys/modules/linux/Makefile
@@ -5,11 +5,6 @@ SFX= 32
CFLAGS+=-DCOMPAT_FREEBSD32 -DCOMPAT_LINUX32
.endif
-.if ${CC:T:Mclang} == "clang"
-# XXX: clang integrated-as doesn't grok .codeNN directives yet
-CFLAGS+= ${.IMPSRC:T:Mlinux32_locore.s:C/^.+$/-no-integrated-as/}
-.endif
-
.PATH: ${.CURDIR}/../../compat/linux ${.CURDIR}/../../${MACHINE_CPUARCH}/linux${SFX}
KMOD= linux
@@ -69,3 +64,7 @@ CFLAGS+= -DKTR
.endif
.include <bsd.kmod.mk>
+
+# XXX: clang integrated-as doesn't grok .codeNN directives yet
+CFLAGS.linux32_locore.s= ${CLANG_NO_IAS}
+CFLAGS+= ${CFLAGS.${.IMPSRC:T}}
OpenPOWER on IntegriCloud