Only enforce -fno-strict-aliasing for optimization levels that

imply -fstrict-aliasing.

Reviewed by:	bde
This commit is contained in:
Ruslan Ermilov 2004-01-22 10:01:47 +00:00
parent a039fbbf8c
commit 95d9bfd8d6

View file

@ -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".