Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F154280242
D34408.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
4 KB
Referenced Files
None
Subscribers
None
D34408.id.diff
View Options
diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk
--- a/sys/conf/kern.mk
+++ b/sys/conf/kern.mk
@@ -47,7 +47,7 @@
.if ${COMPILER_TYPE} == "gcc"
# Catch-all for all the things that are in our tree, but for which we're
# not yet ready for this compiler.
-NO_WUNUSED_BUT_SET_VARIABLE = -Wno-unused-but-set-variable
+NO_WUNUSED_BUT_SET_VARIABLE=-Wno-unused-but-set-variable
CWARNEXTRA?= -Wno-error=address \
-Wno-error=aggressive-loop-optimizations \
-Wno-error=array-bounds \
@@ -90,6 +90,10 @@
FORMAT_EXTENSIONS= -Wno-format
.elif ${COMPILER_TYPE} == "clang"
FORMAT_EXTENSIONS= -D__printf__=__freebsd_kprintf__
+# Only newer versions of clang have -Wno-unused-but-set-variable
+.if ${COMPILER_VERSION} >= 130000
+NO_WUNUSED_BUT_SET_VARIABLE=-Wno-unused-but-set-variable
+.endif
.else
FORMAT_EXTENSIONS= -fformat-extensions
.endif
diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk
--- a/sys/conf/kern.pre.mk
+++ b/sys/conf/kern.pre.mk
@@ -263,7 +263,7 @@
ZFS_S= ${CC} -c ${ZFS_ASM_CFLAGS} ${WERROR} ${.IMPSRC}
# ATH driver
-ATH_CFLAGS= -I${SRCTOP}/sys/dev/ath -Wno-unused-but-set-variable
+ATH_CFLAGS= -I${SRCTOP}/sys/dev/ath ${NO_WUNUSED_BUT_SET_VARIABLE}
ATH_C= ${CC} -c ${CFLAGS} ${WERROR} ${ATH_CFLAGS} ${.IMPSRC}
# Special flags for managing the compat compiles for DTrace
diff --git a/sys/modules/ath/Makefile b/sys/modules/ath/Makefile
--- a/sys/modules/ath/Makefile
+++ b/sys/modules/ath/Makefile
@@ -42,4 +42,4 @@
.include <bsd.kmod.mk>
-CWARNFLAGS+= -Wno-unused-but-set-variable
+CWARNFLAGS+= ${NO_WUNUSED_BUT_SET_VARIABLE}
diff --git a/sys/modules/ath_ahb/Makefile b/sys/modules/ath_ahb/Makefile
--- a/sys/modules/ath_ahb/Makefile
+++ b/sys/modules/ath_ahb/Makefile
@@ -40,4 +40,4 @@
.include <bsd.kmod.mk>
-CWARNFLAGS+= -Wno-unused-but-set-variable
+CWARNFLAGS+= ${NO_WUNUSED_BUT_SET_VARIABLE}
diff --git a/sys/modules/ath_dfs/Makefile b/sys/modules/ath_dfs/Makefile
--- a/sys/modules/ath_dfs/Makefile
+++ b/sys/modules/ath_dfs/Makefile
@@ -46,4 +46,4 @@
.include <bsd.kmod.mk>
-CWARNFLAGS+= -Wno-unused-but-set-variable
+CWARNFLAGS+= ${NO_WUNUSED_BUT_SET_VARIABLE}
diff --git a/sys/modules/ath_hal/Makefile b/sys/modules/ath_hal/Makefile
--- a/sys/modules/ath_hal/Makefile
+++ b/sys/modules/ath_hal/Makefile
@@ -47,4 +47,4 @@
EXPORT_SYMS= YES
CWARNFLAGS.ah_regdomain.c= ${NO_WSHIFT_COUNT_NEGATIVE} ${NO_WSHIFT_COUNT_OVERFLOW}
-CWARNFLAGS+= -Wno-unused-but-set-variable
+CWARNFLAGS+= ${NO_WUNUSED_BUT_SET_VARIABLE}
diff --git a/sys/modules/ath_hal_ar5210/Makefile b/sys/modules/ath_hal_ar5210/Makefile
--- a/sys/modules/ath_hal_ar5210/Makefile
+++ b/sys/modules/ath_hal_ar5210/Makefile
@@ -52,4 +52,4 @@
.include <bsd.kmod.mk>
-CWARNFLAGS+= -Wno-unused-but-set-variable
+CWARNFLAGS+= ${NO_WUNUSED_BUT_SET_VARIABLE}
diff --git a/sys/modules/ath_hal_ar5211/Makefile b/sys/modules/ath_hal_ar5211/Makefile
--- a/sys/modules/ath_hal_ar5211/Makefile
+++ b/sys/modules/ath_hal_ar5211/Makefile
@@ -54,4 +54,4 @@
.include <bsd.kmod.mk>
-CWARNFLAGS+= -Wno-unused-but-set-variable
+CWARNFLAGS+= ${NO_WUNUSED_BUT_SET_VARIABLE}
diff --git a/sys/modules/ath_hal_ar5212/Makefile b/sys/modules/ath_hal_ar5212/Makefile
--- a/sys/modules/ath_hal_ar5212/Makefile
+++ b/sys/modules/ath_hal_ar5212/Makefile
@@ -59,4 +59,4 @@
.include <bsd.kmod.mk>
-CWARNFLAGS+= -Wno-unused-but-set-variable
+CWARNFLAGS+= ${NO_WUNUSED_BUT_SET_VARIABLE}
diff --git a/sys/modules/ath_hal_ar5416/Makefile b/sys/modules/ath_hal_ar5416/Makefile
--- a/sys/modules/ath_hal_ar5416/Makefile
+++ b/sys/modules/ath_hal_ar5416/Makefile
@@ -90,4 +90,4 @@
.include <bsd.kmod.mk>
-CWARNFLAGS+= -Wno-unused-but-set-variable
+CWARNFLAGS+= ${NO_WUNUSED_BUT_SET_VARIABLE}
diff --git a/sys/modules/ath_hal_ar9300/Makefile b/sys/modules/ath_hal_ar9300/Makefile
--- a/sys/modules/ath_hal_ar9300/Makefile
+++ b/sys/modules/ath_hal_ar9300/Makefile
@@ -57,4 +57,4 @@
# AR9300 HAL build overrides, as there's still some code to tidy up
CWARNFLAGS.ar9300_eeprom.c= ${NO_WCONSTANT_CONVERSION}
CWARNFLAGS.ar9300_reset.c= ${NO_WSOMETIMES_UNINITIALIZED} -Wno-unused-function
-CWARNFLAGS+= -Wno-unused-but-set-variable
+CWARNFLAGS+= ${NO_WUNUSED_BUT_SET_VARIABLE}
diff --git a/sys/modules/ath_main/Makefile b/sys/modules/ath_main/Makefile
--- a/sys/modules/ath_main/Makefile
+++ b/sys/modules/ath_main/Makefile
@@ -50,4 +50,4 @@
# XXX Work around clang warnings, until maintainer approves fix.
CWARNFLAGS.if_ath.c= ${NO_WSOMETIMES_UNINITIALIZED}
-CWARNFLAGS+= -Wno-unused-but-set-variable
+CWARNFLAGS+= ${NO_WUNUSED_BUT_SET_VARIABLE}
diff --git a/sys/modules/ath_pci/Makefile b/sys/modules/ath_pci/Makefile
--- a/sys/modules/ath_pci/Makefile
+++ b/sys/modules/ath_pci/Makefile
@@ -40,4 +40,4 @@
.include <bsd.kmod.mk>
-CWARNFLAGS+= -Wno-unused-but-set-variable
+CWARNFLAGS+= ${NO_WUNUSED_BUT_SET_VARIABLE}
diff --git a/sys/modules/ath_rate/Makefile b/sys/modules/ath_rate/Makefile
--- a/sys/modules/ath_rate/Makefile
+++ b/sys/modules/ath_rate/Makefile
@@ -56,4 +56,4 @@
.include <bsd.kmod.mk>
-CWARNFLAGS+= -Wno-unused-but-set-variable
+CWARNFLAGS+= ${NO_WUNUSED_BUT_SET_VARIABLE}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Apr 28, 1:59 PM (1 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32283379
Default Alt Text
D34408.id.diff (4 KB)
Attached To
Mode
D34408: ath: fix older clang build.
Attached
Detach File
Event Timeline
Log In to Comment