diff options
author | ru <ru@FreeBSD.org> | 2004-01-22 10:01:47 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2004-01-22 10:01:47 +0000 |
commit | 1e5d49c1466d42d4b4a2262fb38135f6ee9704fa (patch) | |
tree | 15008a838908dc992176a06c072227c0631b0ba5 /sys/conf | |
parent | 05d90511cf2a70c2b09a0cfa96bfee93c20d838c (diff) | |
download | FreeBSD-src-1e5d49c1466d42d4b4a2262fb38135f6ee9704fa.zip FreeBSD-src-1e5d49c1466d42d4b4a2262fb38135f6ee9704fa.tar.gz |
Only enforce -fno-strict-aliasing for optimization levels that
imply -fstrict-aliasing.
Reviewed by: bde
Diffstat (limited to 'sys/conf')
-rw-r--r-- | sys/conf/kern.pre.mk | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index 9560793..0b2b624 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -17,6 +17,9 @@ OBJCOPY?= objcopy SIZE?= size COPTFLAGS?=-O -pipe +.if ${COPTFLAGS:M-O[23s]} != "" +COPTFLAGS+= -fno-strict-aliasing +.endif .if !defined(NO_CPU_COPTFLAGS) COPTFLAGS+= ${_CPUCFLAGS} .endif @@ -37,7 +40,7 @@ INCLUDES+= -I$S/contrib/ngatm COPTS= ${INCLUDES} -D_KERNEL -include opt_global.h CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS} -CFLAGS+= -fno-common -finline-limit=${INLINE_LIMIT} -fno-strict-aliasing +CFLAGS+= -fno-common -finline-limit=${INLINE_LIMIT} WERROR?= -Werror # XXX LOCORE means "don't declare C stuff" not "for locore.s". |