Makefiles: (temporarily) use GCC 4.x, 5.x or 6.x stx-8.0.0
authorJan Vrany <jan.vrany@fit.cvut.cz>
Tue, 19 Sep 2017 11:09:57 +0000
branchstx-8.0.0
changeset 182 f3d06fad7606
parent 181 3aaf65a5541c
child 183 db331712cd33
Makefiles: (temporarily) use GCC 4.x, 5.x or 6.x as some code may fail to compile with GCC 7 due to `-Werror` (`send.c` for instance). This will be fixed later and this change will be referted. (grafted from 6525662ac35fe07461f96e9d11ac29f88e51307f)
makelib/config-linux-gnu.make
--- a/makelib/config-linux-gnu.make	Thu Sep 14 12:53:47 2017 +0100
+++ b/makelib/config-linux-gnu.make	Tue Sep 19 11:09:57 2017 +0000
@@ -30,7 +30,23 @@
 COMPRESSED_FILETYPE=targz
 SETUP_RULE=setup_linux
 
-CC=gcc
+# We need to use at most GCC 6.x, some code may fail to compile
+# with GCC 7 due to -Werror (`send.c` for instance). We won't fix
+# that for Smalltalk/X 6.x.x, will be fixed only for Smalltalk/X 8.0.0
+ifeq (,$(shell which gcc-6))
+ifeq (,$(shell which gcc-5))
+ifeq (,$(shell which gcc-4))
+$(error Smalltalk/X requires GCC 4.x, GCC 5.x or GCC 6.x to compile, none found)
+else
+CC=gcc-4
+endif
+else
+CC=gcc-5
+endif
+else
+CC=gcc-6
+endif
+
 
 #
 # * `-fno-strict-aliasing` since it's almost impossible to write a memory