Author: dim
Date: Sat Jan  4 17:54:06 2014
New Revision: 260268
URL: http://svnweb.freebsd.org/changeset/base/260268

Log:
  MFC r260020:
  
  For sys/dev/drm2/radeon, only use -fms-extensions with gcc.  This flag
  is only to stop gcc complaining about anonymous unions, which clang does
  not do.  For clang 3.4 however, -fms-extensions enables the Microsoft
  __wchar_t type, which clashes with our own types.h.
  
  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/10/sys/conf/kern.pre.mk
  stable/10/sys/modules/drm2/radeonkms/Makefile
  stable/10/sys/modules/ibcore/Makefile
  stable/10/sys/modules/ipoib/Makefile
  stable/10/sys/modules/mlx4/Makefile
  stable/10/sys/modules/mlx4ib/Makefile
  stable/10/sys/modules/mlxen/Makefile
  stable/10/sys/modules/mthca/Makefile
  stable/10/sys/ofed/drivers/infiniband/hw/mlx4/Makefile
  stable/10/sys/ofed/drivers/net/mlx4/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/conf/kern.pre.mk
==============================================================================
--- stable/10/sys/conf/kern.pre.mk      Sat Jan  4 17:52:43 2014        
(r260267)
+++ stable/10/sys/conf/kern.pre.mk      Sat Jan  4 17:54:06 2014        
(r260268)
@@ -99,6 +99,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/10/sys/modules/drm2/radeonkms/Makefile
==============================================================================
--- stable/10/sys/modules/drm2/radeonkms/Makefile       Sat Jan  4 17:52:43 
2014        (r260267)
+++ stable/10/sys/modules/drm2/radeonkms/Makefile       Sat Jan  4 17:54:06 
2014        (r260268)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 .PATH: ${.CURDIR}/../../../dev/drm2/radeon
 
 KMOD   = radeonkms
@@ -101,7 +103,6 @@ SRCS        +=                                              
                \
        iicbus_if.h                                                     \
        pci_if.h
 
-CFLAGS  += -I${.CURDIR}/../../../dev/drm2/radeon                       \
-          -fms-extensions
+CFLAGS  += -I${.CURDIR}/../../../dev/drm2/radeon ${GCC_MS_EXTENSIONS}
 
 .include <bsd.kmod.mk>

Modified: stable/10/sys/modules/ibcore/Makefile
==============================================================================
--- stable/10/sys/modules/ibcore/Makefile       Sat Jan  4 17:52:43 2014        
(r260267)
+++ stable/10/sys/modules/ibcore/Makefile       Sat Jan  4 17:54:06 2014        
(r260268)
@@ -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: stable/10/sys/modules/ipoib/Makefile
==============================================================================
--- stable/10/sys/modules/ipoib/Makefile        Sat Jan  4 17:52:43 2014        
(r260267)
+++ stable/10/sys/modules/ipoib/Makefile        Sat Jan  4 17:54:06 2014        
(r260268)
@@ -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: stable/10/sys/modules/mlx4/Makefile
==============================================================================
--- stable/10/sys/modules/mlx4/Makefile Sat Jan  4 17:52:43 2014        
(r260267)
+++ stable/10/sys/modules/mlx4/Makefile Sat Jan  4 17:54:06 2014        
(r260268)
@@ -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/10/sys/modules/mlx4ib/Makefile
==============================================================================
--- stable/10/sys/modules/mlx4ib/Makefile       Sat Jan  4 17:52:43 2014        
(r260267)
+++ stable/10/sys/modules/mlx4ib/Makefile       Sat Jan  4 17:54:06 2014        
(r260268)
@@ -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: stable/10/sys/modules/mlxen/Makefile
==============================================================================
--- stable/10/sys/modules/mlxen/Makefile        Sat Jan  4 17:52:43 2014        
(r260267)
+++ stable/10/sys/modules/mlxen/Makefile        Sat Jan  4 17:54:06 2014        
(r260268)
@@ -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/10/sys/modules/mthca/Makefile
==============================================================================
--- stable/10/sys/modules/mthca/Makefile        Sat Jan  4 17:52:43 2014        
(r260267)
+++ stable/10/sys/modules/mthca/Makefile        Sat Jan  4 17:54:06 2014        
(r260268)
@@ -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: stable/10/sys/ofed/drivers/infiniband/hw/mlx4/Makefile
==============================================================================
--- stable/10/sys/ofed/drivers/infiniband/hw/mlx4/Makefile      Sat Jan  4 
17:52:43 2014        (r260267)
+++ stable/10/sys/ofed/drivers/infiniband/hw/mlx4/Makefile      Sat Jan  4 
17:54:06 2014        (r260268)
@@ -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: stable/10/sys/ofed/drivers/net/mlx4/Makefile
==============================================================================
--- stable/10/sys/ofed/drivers/net/mlx4/Makefile        Sat Jan  4 17:52:43 
2014        (r260267)
+++ stable/10/sys/ofed/drivers/net/mlx4/Makefile        Sat Jan  4 17:54:06 
2014        (r260268)
@@ -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-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