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 after:	3 days
This commit is contained in:
Dimitry Andric 2013-12-30 20:34:53 +00:00
parent 1b9906c757
commit 86390f9444
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=260102
10 changed files with 12 additions and 13 deletions

View File

@ -100,6 +100,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
@ -158,7 +160,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}

View File

@ -105,9 +105,6 @@ SRCS += \
iicbus_if.h \
pci_if.h
CFLAGS += -I${.CURDIR}/../../../dev/drm2/radeon
.if ${COMPILER_TYPE} == "gcc"
CFLAGS += -fms-extensions
.endif
CFLAGS += -I${.CURDIR}/../../../dev/drm2/radeon ${GCC_MS_EXTENSIONS}
.include <bsd.kmod.mk>

View File

@ -20,4 +20,4 @@ CFLAGS+= -DINET6 -DINET -DOFED
.include <bsd.kmod.mk>
CFLAGS+= -Wno-cast-qual -Wno-pointer-arith -fms-extensions
CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS}

View File

@ -28,4 +28,4 @@ opt_inet6.h:
.include <bsd.kmod.mk>
CFLAGS+= -Wno-cast-qual -Wno-pointer-arith -fms-extensions
CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS}

View File

@ -26,4 +26,4 @@ opt_inet6.h:
.include <bsd.kmod.mk>
CFLAGS+= -Wno-cast-qual -Wno-pointer-arith -fms-extensions
CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS}

View File

@ -31,4 +31,4 @@ opt_inet6.h:
.include <bsd.kmod.mk>
CFLAGS+= -Wno-cast-qual -Wno-pointer-arith -fms-extensions
CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS}

View File

@ -25,4 +25,4 @@ opt_inet6.h:
.include <bsd.kmod.mk>
CFLAGS+= -Wno-cast-qual -Wno-pointer-arith -fms-extensions
CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS}

View File

@ -28,4 +28,4 @@ opt_inet6.h:
.include <bsd.kmod.mk>
CFLAGS+= -Wno-cast-qual -Wno-pointer-arith -fms-extensions
CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS}

View File

@ -28,4 +28,4 @@ opt_inet6.h:
.include <bsd.kmod.mk>
CFLAGS+= -Wno-cast-qual -Wno-pointer-arith -fms-extensions
CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS}

View File

@ -30,5 +30,5 @@ opt_inet6.h:
.include <bsd.kmod.mk>
CFLAGS+= -Wno-cast-qual -Wno-pointer-arith -fms-extensions
CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS}