On 2010-07-22 22:13, Jung-uk Kim wrote:
>>  CFLAGS=     ${COPTFLAGS} ${C_DIALECT} ${DEBUG} ${CWARNFLAGS}
>>  CFLAGS+= ${INCLUDES} -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS
>> -include opt_global.h -.if ${CC} != "icc"
>> +.if ${CC} != "icc" && ${CC} != "clang"
>>  CFLAGS+= -fno-common -finline-limit=${INLINE_LIMIT}
>>  .if ${MACHINE_CPUARCH} != "mips"
>>  CFLAGS+= --param inline-unit-growth=100
> 
> Isn't it little premature to remove -Werror from clang?

Yes, probably.  Please consider the attached patch, which only rubs out
the compilation options that clang does not support.
diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk
index 5c22abd..7642fca 100644
--- a/sys/conf/kern.pre.mk
+++ b/sys/conf/kern.pre.mk
@@ -92,7 +92,8 @@ INCLUDES+= -I$S/dev/cxgb
 
 CFLAGS=        ${COPTFLAGS} ${C_DIALECT} ${DEBUG} ${CWARNFLAGS}
 CFLAGS+= ${INCLUDES} -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include 
opt_global.h
-.if ${CC} != "icc" && ${CC} != "clang"
+.if ${CC} != "icc"
+.if ${CC} != "clang"
 CFLAGS+= -fno-common -finline-limit=${INLINE_LIMIT}
 .if ${MACHINE_CPUARCH} != "mips"
 CFLAGS+= --param inline-unit-growth=100
@@ -102,6 +103,7 @@ CFLAGS+= --param large-function-growth=1000
 CFLAGS+= --param inline-unit-growth=1000
 CFLAGS+= --param large-function-growth=100000
 .endif
+.endif
 WERROR?= -Werror
 .endif
 
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to