summaryrefslogtreecommitdiffstats
path: root/sys/conf/kern.pre.mk
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2014-01-09 22:40:51 +0000
committerdim <dim@FreeBSD.org>2014-01-09 22:40:51 +0000
commit999774a8ef8eaa6132d3de64eebac307c223d29c (patch)
tree7eab0649e94714452b9f2ba7ce6a23907c0a0b3e /sys/conf/kern.pre.mk
parent837513035e696dea0a4ef7dc0fe5418f89bea6e1 (diff)
downloadFreeBSD-src-999774a8ef8eaa6132d3de64eebac307c223d29c.zip
FreeBSD-src-999774a8ef8eaa6132d3de64eebac307c223d29c.tar.gz
MFC r260102:
Similar to r260020, only use -fms-extensions with gcc, for all other modules which require this flag to compile. Use a GCC_MS_EXTENSIONS variable, defined in kern.pre.mk, which can be used to easily supply the flag (or not), depending on the compiler type. MFC r260322: In addition to r260102, also define GCC_MS_EXTENSIONS in bsd.sys.mk, since kernel module builds do not use kern.pre.mk.
Diffstat (limited to 'sys/conf/kern.pre.mk')
-rw-r--r--sys/conf/kern.pre.mk4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk
index b01d506..966a9e8 100644
--- a/sys/conf/kern.pre.mk
+++ b/sys/conf/kern.pre.mk
@@ -99,6 +99,8 @@ ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS}
.if ${COMPILER_TYPE} == "clang"
CLANG_NO_IAS= -no-integrated-as
+.else
+GCC_MS_EXTENSIONS= -fms-extensions
.endif
.if defined(PROFLEVEL) && ${PROFLEVEL} >= 1
@@ -157,7 +159,7 @@ NORMAL_LINT= ${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.IMPSRC}
# Infiniband C flags. Correct include paths and omit errors that linux
# does not honor.
OFEDINCLUDES= -I$S/ofed/include/
-OFEDNOERR= -Wno-cast-qual -Wno-pointer-arith -fms-extensions
+OFEDNOERR= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS}
OFEDCFLAGS= ${CFLAGS:N-I*} ${OFEDINCLUDES} ${CFLAGS:M-I*} ${OFEDNOERR}
OFED_C_NOIMP= ${CC} -c -o ${.TARGET} ${OFEDCFLAGS} ${WERROR} ${PROF}
OFED_C= ${OFED_C_NOIMP} ${.IMPSRC}
OpenPOWER on IntegriCloud