Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F163222435
D21378.id61165.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D21378.id61165.diff
View Options
Index: share/mk/bsd.sys.mk
===================================================================
--- share/mk/bsd.sys.mk
+++ share/mk/bsd.sys.mk
@@ -29,6 +29,15 @@
CXXFLAGS+= -std=${CXXSTD}
.endif
+#
+# Turn off -Werror for gcc 4.2.1. The compiler is on the glide path out of the
+# system, and any warnings specific to it are no longer relevant as there are
+# too many false positives.
+#
+.if ${COMPILER_VERSION} < 50000
+NO_WERROR.gcc= yes
+.endif
+
# -pedantic is problematic because it also imposes namespace restrictions
#CFLAGS+= -pedantic
.if defined(WARNS)
Index: sys/conf/kern.pre.mk
===================================================================
--- sys/conf/kern.pre.mk
+++ sys/conf/kern.pre.mk
@@ -93,7 +93,11 @@
.if defined(CFLAGS_ARCH_PARAMS)
CFLAGS.gcc+=${CFLAGS_ARCH_PARAMS}
.endif
-WERROR?= -Werror
+.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} < 50000
+WERROR?= -Wno-error
+.else
+WERROR?= -Werror
+.endif
# XXX LOCORE means "don't declare C stuff" not "for locore.s".
ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS} ${ASM_CFLAGS.${.IMPSRC:T}}
Index: sys/conf/kmod.mk
===================================================================
--- sys/conf/kmod.mk
+++ sys/conf/kmod.mk
@@ -107,7 +107,12 @@
.if !empty(CFLAGS:M-O[23s]) && empty(CFLAGS:M-fno-strict-aliasing)
CFLAGS+= -fno-strict-aliasing
.endif
+.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} < 50000
+WERROR?= -Wno-error
+.else
WERROR?= -Werror
+.endif
+
CFLAGS+= ${WERROR}
CFLAGS+= -D_KERNEL
CFLAGS+= -DKLD_MODULE
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jul 22, 5:00 AM (9 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35348153
Default Alt Text
D21378.id61165.diff (1 KB)
Attached To
Mode
D21378: Turn off -Werror for gcc 4.2.1
Attached
Detach File
Event Timeline
Log In to Comment