chiark / gitweb /
@@ -18,6 +18,8 @@
[chiark-tcl.git] / base / common.make
index 6e3852a88ea180a4a6e063400dda7c31bf162305..b736610bf3a99445fbc7fe8cd708abfe6cd40c15 100644 (file)
@@ -29,12 +29,17 @@ TCMDIFGEN ?=        $(BASE_DIR)/tcmdifgen
 BASE_TCT ?=    $(BASE_DIR)/base.tct
 BASE_SHLIB ?=  lib$(FAMILY)-$(VERSION)
 
+CFLAGS +=      -g -Wall -Wmissing-prototypes -Wstrict-prototypes -Werror \
+               $(OPTIMISE)
+
 ifeq ($(shell $(CC) -Wno-pointer-sign -E -x c /dev/null >/dev/null || echo x),)
 CFLAGS +=      -Wno-pointer-sign
 endif
 
-CFLAGS +=      -g -Wall -Wmissing-prototypes -Wstrict-prototypes -Werror \
-               $(OPTIMISE)
+ifeq ($(shell $(CC) -fno-strict-aliasing -E -x c /dev/null >/dev/null || echo x),)
+CFLAGS +=      -fno-strict-aliasing
+endif
+
 CPPFLAGS +=    -I$(TCL_INCLUDEDIR) -I$(BASE_DIR)
 CPPFLAGS +=    $(TCL_MEM_DEBUG)