Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151662378
D34408.id103374.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
5 KB
Referenced Files
None
Subscribers
None
D34408.id103374.diff
View Options
Index: sys/conf/kern.mk
===================================================================
--- sys/conf/kern.mk
+++ 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
Index: sys/conf/kern.pre.mk
===================================================================
--- sys/conf/kern.pre.mk
+++ 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
Index: sys/modules/ath/Makefile
===================================================================
--- sys/modules/ath/Makefile
+++ sys/modules/ath/Makefile
@@ -42,4 +42,4 @@
.include <bsd.kmod.mk>
-CWARNFLAGS+= -Wno-unused-but-set-variable
+CWARNFLAGS+= ${NO_WUNUSED_BUT_SET_VARIABLE}
Index: sys/modules/ath_ahb/Makefile
===================================================================
--- sys/modules/ath_ahb/Makefile
+++ 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}
Index: sys/modules/ath_dfs/Makefile
===================================================================
--- sys/modules/ath_dfs/Makefile
+++ 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}
Index: sys/modules/ath_hal/Makefile
===================================================================
--- sys/modules/ath_hal/Makefile
+++ 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}
Index: sys/modules/ath_hal_ar5210/Makefile
===================================================================
--- sys/modules/ath_hal_ar5210/Makefile
+++ 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}
Index: sys/modules/ath_hal_ar5211/Makefile
===================================================================
--- sys/modules/ath_hal_ar5211/Makefile
+++ 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}
Index: sys/modules/ath_hal_ar5212/Makefile
===================================================================
--- sys/modules/ath_hal_ar5212/Makefile
+++ 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}
Index: sys/modules/ath_hal_ar5416/Makefile
===================================================================
--- sys/modules/ath_hal_ar5416/Makefile
+++ 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}
Index: sys/modules/ath_hal_ar9300/Makefile
===================================================================
--- sys/modules/ath_hal_ar9300/Makefile
+++ 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}
Index: sys/modules/ath_main/Makefile
===================================================================
--- sys/modules/ath_main/Makefile
+++ 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}
Index: sys/modules/ath_pci/Makefile
===================================================================
--- sys/modules/ath_pci/Makefile
+++ 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}
Index: sys/modules/ath_rate/Makefile
===================================================================
--- sys/modules/ath_rate/Makefile
+++ 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
Fri, Apr 10, 8:44 PM (4 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31244565
Default Alt Text
D34408.id103374.diff (5 KB)
Attached To
Mode
D34408: ath: fix older clang build.
Attached
Detach File
Event Timeline
Log In to Comment