Author: dim
Date: Mon Dec 30 20:34:53 2013
New Revision: 260102
URL: http://svnweb.freebsd.org/changeset/base/260102

Log:
  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

Modified:
  head/sys/conf/kern.pre.mk
  head/sys/modules/drm2/radeonkms/Makefile
  head/sys/modules/ibcore/Makefile
  head/sys/modules/ipoib/Makefile
  head/sys/modules/mlx4/Makefile
  head/sys/modules/mlx4ib/Makefile
  head/sys/modules/mlxen/Makefile
  head/sys/modules/mthca/Makefile
  head/sys/ofed/drivers/infiniband/hw/mlx4/Makefile
  head/sys/ofed/drivers/net/mlx4/Makefile

Modified: head/sys/conf/kern.pre.mk
==============================================================================
--- head/sys/conf/kern.pre.mk   Mon Dec 30 20:32:27 2013        (r260101)
+++ head/sys/conf/kern.pre.mk   Mon Dec 30 20:34:53 2013        (r260102)
@@ -100,6 +100,8 @@ ASM_CFLAGS= -x assembler-with-cpp -DLOCO
 
 .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} ${CFLA
 # 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}

Modified: head/sys/modules/drm2/radeonkms/Makefile
==============================================================================
--- head/sys/modules/drm2/radeonkms/Makefile    Mon Dec 30 20:32:27 2013        
(r260101)
+++ head/sys/modules/drm2/radeonkms/Makefile    Mon Dec 30 20:34:53 2013        
(r260102)
@@ -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>

Modified: head/sys/modules/ibcore/Makefile
==============================================================================
--- head/sys/modules/ibcore/Makefile    Mon Dec 30 20:32:27 2013        
(r260101)
+++ head/sys/modules/ibcore/Makefile    Mon Dec 30 20:34:53 2013        
(r260102)
@@ -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}

Modified: head/sys/modules/ipoib/Makefile
==============================================================================
--- head/sys/modules/ipoib/Makefile     Mon Dec 30 20:32:27 2013        
(r260101)
+++ head/sys/modules/ipoib/Makefile     Mon Dec 30 20:34:53 2013        
(r260102)
@@ -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}

Modified: head/sys/modules/mlx4/Makefile
==============================================================================
--- head/sys/modules/mlx4/Makefile      Mon Dec 30 20:32:27 2013        
(r260101)
+++ head/sys/modules/mlx4/Makefile      Mon Dec 30 20:34:53 2013        
(r260102)
@@ -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}

Modified: head/sys/modules/mlx4ib/Makefile
==============================================================================
--- head/sys/modules/mlx4ib/Makefile    Mon Dec 30 20:32:27 2013        
(r260101)
+++ head/sys/modules/mlx4ib/Makefile    Mon Dec 30 20:34:53 2013        
(r260102)
@@ -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}

Modified: head/sys/modules/mlxen/Makefile
==============================================================================
--- head/sys/modules/mlxen/Makefile     Mon Dec 30 20:32:27 2013        
(r260101)
+++ head/sys/modules/mlxen/Makefile     Mon Dec 30 20:34:53 2013        
(r260102)
@@ -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}

Modified: head/sys/modules/mthca/Makefile
==============================================================================
--- head/sys/modules/mthca/Makefile     Mon Dec 30 20:32:27 2013        
(r260101)
+++ head/sys/modules/mthca/Makefile     Mon Dec 30 20:34:53 2013        
(r260102)
@@ -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}

Modified: head/sys/ofed/drivers/infiniband/hw/mlx4/Makefile
==============================================================================
--- head/sys/ofed/drivers/infiniband/hw/mlx4/Makefile   Mon Dec 30 20:32:27 
2013        (r260101)
+++ head/sys/ofed/drivers/infiniband/hw/mlx4/Makefile   Mon Dec 30 20:34:53 
2013        (r260102)
@@ -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}

Modified: head/sys/ofed/drivers/net/mlx4/Makefile
==============================================================================
--- head/sys/ofed/drivers/net/mlx4/Makefile     Mon Dec 30 20:32:27 2013        
(r260101)
+++ head/sys/ofed/drivers/net/mlx4/Makefile     Mon Dec 30 20:34:53 2013        
(r260102)
@@ -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}
 
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to