makelib/config.make
branchstx-8.0.0
changeset 192 5e372c1fe64c
parent 191 92979427f3bb
child 193 099cc5f9ff8e
--- a/makelib/config.make	Fri Oct 06 09:30:38 2017 +0100
+++ b/makelib/config.make	Fri Oct 06 09:35:58 2017 +0100
@@ -18,6 +18,28 @@
 # This file sets up defaults which fit on most systems -
 # see redefinitions in vendor-define, config-define or individual Make.proto files
 
+#
+# Define C compiler "optimization: flags to use.
+#
+# * `-fno-strict-aliasing` since it's almost impossible to write a memory
+#   manager without breaking C's aliasing rules. Better be on a safe side.
+#   Nice post about these things: http://blog.regehr.org/archives/1307
+#
+# * `-Wno-strict-aliasing` to turn of warnings about breaking aliasing rules.
+#   While one would think these wanings should be turned off when
+#   `-fno-strict-aliasing` is passed, apparently some GCCs bark anyway.
+#
+# * `-fno-stack-protector` is (was) required on Ubuntu brands where it's
+#   by default on. Smalltalk/X green thread implementation does not wotk
+#   well with it.
+#
+# * `-U_FORTIFY_SOURCE` is (was) required on Gentoo as a workaround for failing
+#   longjmp check when _FORTIFY_SOURCE is defined (which is enabled by default
+#   on Gentoo. Remove when fixed.
+#
+OPT=-fPIC -O2 -fno-strict-aliasing -Wno-strict-aliasing -fno-stack-protector -ggdb3 -pipe -U_FORTIFY_SOURCE
+
+
 CONF=$(BUILD_TARGET)
 CONF_VENDOR=$(BUILD_TARGET)