Author: dim
Date: Sat Jan  4 17:56:19 2014
New Revision: 260269
URL: http://svnweb.freebsd.org/changeset/base/260269

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

Modified:
  stable/9/sys/conf/kern.pre.mk
  stable/9/sys/modules/mlx4/Makefile
  stable/9/sys/modules/mlx4ib/Makefile
  stable/9/sys/modules/mlxen/Makefile
  stable/9/sys/modules/mthca/Makefile
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/conf/kern.pre.mk
==============================================================================
--- stable/9/sys/conf/kern.pre.mk       Sat Jan  4 17:54:06 2014        
(r260268)
+++ stable/9/sys/conf/kern.pre.mk       Sat Jan  4 17:56:19 2014        
(r260269)
@@ -106,6 +106,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
@@ -157,7 +159,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: stable/9/sys/modules/mlx4/Makefile
==============================================================================
--- stable/9/sys/modules/mlx4/Makefile  Sat Jan  4 17:54:06 2014        
(r260268)
+++ stable/9/sys/modules/mlx4/Makefile  Sat Jan  4 17:56:19 2014        
(r260269)
@@ -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: stable/9/sys/modules/mlx4ib/Makefile
==============================================================================
--- stable/9/sys/modules/mlx4ib/Makefile        Sat Jan  4 17:54:06 2014        
(r260268)
+++ stable/9/sys/modules/mlx4ib/Makefile        Sat Jan  4 17:56:19 2014        
(r260269)
@@ -24,4 +24,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: stable/9/sys/modules/mlxen/Makefile
==============================================================================
--- stable/9/sys/modules/mlxen/Makefile Sat Jan  4 17:54:06 2014        
(r260268)
+++ stable/9/sys/modules/mlxen/Makefile Sat Jan  4 17:56:19 2014        
(r260269)
@@ -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: stable/9/sys/modules/mthca/Makefile
==============================================================================
--- stable/9/sys/modules/mthca/Makefile Sat Jan  4 17:54:06 2014        
(r260268)
+++ stable/9/sys/modules/mthca/Makefile Sat Jan  4 17:56:19 2014        
(r260269)
@@ -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}
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to