Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Mar 2009 17:55:16 +0000 (UTC)
From:      Roman Divacky <rdivacky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r189801 - in head: cddl cddl/lib/libzpool cddl/usr.bin/ztest cddl/usr.sbin/zdb share/mk tools/regression/include/tgmath
Message-ID:  <200903141755.n2EHtGj1003232@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rdivacky
Date: Sat Mar 14 17:55:16 2009
New Revision: 189801
URL: http://svn.freebsd.org/changeset/base/189801

Log:
  Switch over to gnu99 compilation on default for userland.
  
  Tested by:	make universe
  Tested by:	ports exp build (done by pav)
  Reviewed by:	ru
  Reviewed by:	silence on arch
  Approved by:	ed (mentor)

Modified:
  head/cddl/Makefile.inc
  head/cddl/lib/libzpool/Makefile
  head/cddl/usr.bin/ztest/Makefile
  head/cddl/usr.sbin/zdb/Makefile
  head/share/mk/bsd.sys.mk
  head/tools/regression/include/tgmath/Makefile

Modified: head/cddl/Makefile.inc
==============================================================================
--- head/cddl/Makefile.inc	Sat Mar 14 17:54:58 2009	(r189800)
+++ head/cddl/Makefile.inc	Sat Mar 14 17:55:16 2009	(r189801)
@@ -6,3 +6,5 @@ OPENSOLARIS_SYS_DISTDIR= ${.CURDIR}/../.
 IGNORE_PRAGMA=	YES
 
 CFLAGS+=	-DNEED_SOLARIS_BOOLEAN
+
+CSTD?=		gnu89

Modified: head/cddl/lib/libzpool/Makefile
==============================================================================
--- head/cddl/lib/libzpool/Makefile	Sat Mar 14 17:54:58 2009	(r189800)
+++ head/cddl/lib/libzpool/Makefile	Sat Mar 14 17:55:16 2009	(r189801)
@@ -33,8 +33,6 @@ SRCS=		${ZFS_COMMON_SRCS} ${ZFS_SHARED_S
 		${KERNEL_SRCS} ${LIST_SRCS} ${ATOMIC_SRCS} \
 		${UNICODE_SRCS}
 
-CFLAGS+=	-std=c99
-
 CFLAGS+=	-I${.CURDIR}/../../../sys/cddl/compat/opensolaris
 CFLAGS+=	-I${.CURDIR}/../../../cddl/compat/opensolaris/include
 CFLAGS+=	-I${.CURDIR}/../../../cddl/compat/opensolaris/lib/libumem
@@ -60,4 +58,6 @@ LDADD=		-lpthread -lz
 # atomic.S doesn't like profiling.
 NO_PROFILE=
 
+CSTD=	c99
+
 .include <bsd.lib.mk>

Modified: head/cddl/usr.bin/ztest/Makefile
==============================================================================
--- head/cddl/usr.bin/ztest/Makefile	Sat Mar 14 17:54:58 2009	(r189800)
+++ head/cddl/usr.bin/ztest/Makefile	Sat Mar 14 17:55:16 2009	(r189801)
@@ -5,8 +5,6 @@
 PROG=	ztest
 NO_MAN=
 
-CFLAGS+= -std=c99
-
 CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris
 CFLAGS+= -I${.CURDIR}/../../compat/opensolaris/include
 CFLAGS+= -I${.CURDIR}/../../compat/opensolaris/lib/libumem
@@ -21,4 +19,6 @@ DPADD=	${LIBM} ${LIBNVPAIR} ${LIBUMEM} $
 	${LIBPTHREAD} ${LIBZ} ${LIBAVL}
 LDADD=	-lm -lnvpair -lumem -lzpool -lpthread -lz -lavl
 
+CSTD=	c99
+
 .include <bsd.prog.mk>

Modified: head/cddl/usr.sbin/zdb/Makefile
==============================================================================
--- head/cddl/usr.sbin/zdb/Makefile	Sat Mar 14 17:54:58 2009	(r189800)
+++ head/cddl/usr.sbin/zdb/Makefile	Sat Mar 14 17:55:16 2009	(r189801)
@@ -6,8 +6,6 @@ PROG=	zdb
 MAN=	zdb.8
 SRCS=	zdb.c zdb_il.c
 
-CFLAGS+= -std=c99
-
 CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris
 CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/include
 CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/lib/libumem
@@ -25,4 +23,6 @@ DPADD=	${LIBAVL} ${LIBGEOM} ${LIBM} ${LI
 	${LIBUUTIL} ${LIBZ} ${LIBZFS} ${LIBZPOOL}
 LDADD=	-lavl -lgeom -lm -lnvpair -lpthread -lumem -luutil -lz -lzfs -lzpool
 
+CSTD=	c99
+
 .include <bsd.prog.mk>

Modified: head/share/mk/bsd.sys.mk
==============================================================================
--- head/share/mk/bsd.sys.mk	Sat Mar 14 17:54:58 2009	(r189800)
+++ head/share/mk/bsd.sys.mk	Sat Mar 14 17:55:16 2009	(r189801)
@@ -8,22 +8,23 @@
 
 # for GCC:  http://gcc.gnu.org/onlinedocs/gcc-3.0.4/gcc_3.html#IDX143
 
+# the default is gnu99 for now
+CSTD		?= gnu99
+
 .if !defined(NO_WARNS) && ${CC} != "icc"
-. if defined(CSTD)
-.  if ${CSTD} == "k&r"
+. if ${CSTD} == "k&r"
 CFLAGS		+= -traditional
-.  elif ${CSTD} == "c89" || ${CSTD} == "c90"
+. elif ${CSTD} == "c89" || ${CSTD} == "c90"
 CFLAGS		+= -std=iso9899:1990
-.  elif ${CSTD} == "c94" || ${CSTD} == "c95"
+. elif ${CSTD} == "c94" || ${CSTD} == "c95"
 CFLAGS		+= -std=iso9899:199409
-.  elif ${CSTD} == "c99"
+. elif ${CSTD} == "c99"
 CFLAGS		+= -std=iso9899:1999
-.  else
+. else
 CFLAGS		+= -std=${CSTD}
-.  endif
+. endif
 # -pedantic is problematic because it also imposes namespace restrictions
 #CFLAGS		+= -pedantic
-. endif
 . if defined(WARNS)
 .  if ${WARNS} >= 1
 CWARNFLAGS	+=	-Wsystem-headers

Modified: head/tools/regression/include/tgmath/Makefile
==============================================================================
--- head/tools/regression/include/tgmath/Makefile	Sat Mar 14 17:54:58 2009	(r189800)
+++ head/tools/regression/include/tgmath/Makefile	Sat Mar 14 17:55:16 2009	(r189801)
@@ -1,7 +1,8 @@
 # $FreeBSD$
 
 PROG=	tgmath
-CFLAGS+= -fno-builtin -std=c99
+CSTD=	c99
+CFLAGS+= -fno-builtin
 NO_MAN=
 
 .include <bsd.prog.mk>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903141755.n2EHtGj1003232>