makelib/config-linux-gnu.make
changeset 285 0cfb07f8d038
parent 246 687c4889e2e6
equal deleted inserted replaced
284:2cc4ad929665 285:0cfb07f8d038
    10 CPUINTERN_H=$(INCLUDE)/linuxIntern.h
    10 CPUINTERN_H=$(INCLUDE)/linuxIntern.h
    11 OS=-DLINUX
    11 OS=-DLINUX
    12 
    12 
    13 MAKEFILE_EXTENSION=linux-elf
    13 MAKEFILE_EXTENSION=linux-elf
    14 SETUP_RULE=setup_linux
    14 SETUP_RULE=setup_linux
    15 
       
    16 # We need to use at most GCC 6.x, some code may fail to compile
       
    17 # with GCC 7 due to -Werror (`send.c` for instance). We won't fix
       
    18 # that for Smalltalk/X 6.x.x, will be fixed only for Smalltalk/X 8.1.x 
       
    19 # series. 
       
    20 # 
       
    21 # Note, that we have to use the trick with `ifeq $(origin CC),...` rather than
       
    22 # `ifdef` since CC is one of the GNU make implicit variables. series
       
    23 #
       
    24 # See https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html
       
    25 ifeq ($(origin CC),default)
       
    26   ifneq ($(shell which gcc-6),)
       
    27     CC = gcc-6
       
    28   else ifneq ($(shell which gcc-5),)
       
    29     CC = gcc-5
       
    30   else ifneq ($(shell which gcc-4),)
       
    31     CC = gcc-4
       
    32   endif
       
    33 endif