makelib/config-linux-gnu.make
author Jan Vrany <jan.vrany@fit.cvut.cz>
Thu, 21 Jun 2018 08:07:41 +0000
changeset 244 8de3e1d78d6a
parent 237 69ab924b97bf
child 246 687c4889e2e6
permissions -rw-r--r--
Makefiles: cleanup / simplification various compiler and flags ...to use a common definition on both i686 and x86_64.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
122
6fcb351d23a7 Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     1
#------------------ start of linux-elf/COMMON/defines ---------------------
6fcb351d23a7 Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     2
#
6fcb351d23a7 Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     3
# $Header: /cvs/stx/stx/configurations/linux-elf/COMMON/defines,v 1.92 2016-07-19 19:56:46 stefan Exp $
135
0325651d2b43 Makefiles: use our own makefiles rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 126
diff changeset
     4
include $(MAKELIB)/config.make
122
6fcb351d23a7 Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     5
6fcb351d23a7 Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     6
CCARCHCOMMONOPT=-DELF
6fcb351d23a7 Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     7
#RELOCINSTVARS=+relocInstvars
6fcb351d23a7 Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     8
6fcb351d23a7 Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     9
INTERN_H=linuxIntern.h
6fcb351d23a7 Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    10
CPUINTERN_H=$(INCLUDE)/linuxIntern.h
193
099cc5f9ff8e Makefiles: refactored flags for X11 to use `pkg-config`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 192
diff changeset
    11
OS=-DLINUX
122
6fcb351d23a7 Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    12
6fcb351d23a7 Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    13
MAKEFILE_EXTENSION=linux-elf
6fcb351d23a7 Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    14
SETUP_RULE=setup_linux
6fcb351d23a7 Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    15
182
f3d06fad7606 Makefiles: (temporarily) use GCC 4.x, 5.x or 6.x
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
    16
# We need to use at most GCC 6.x, some code may fail to compile
f3d06fad7606 Makefiles: (temporarily) use GCC 4.x, 5.x or 6.x
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
    17
# with GCC 7 due to -Werror (`send.c` for instance). We won't fix
f3d06fad7606 Makefiles: (temporarily) use GCC 4.x, 5.x or 6.x
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
    18
# that for Smalltalk/X 6.x.x, will be fixed only for Smalltalk/X 8.0.0
232
85c422506875 Makefiles: allow to specify C compiler on a command line
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 226
diff changeset
    19
ifeq ($(CC),cc)
85c422506875 Makefiles: allow to specify C compiler on a command line
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 226
diff changeset
    20
  ifneq ($(shell which gcc-6),)
85c422506875 Makefiles: allow to specify C compiler on a command line
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 226
diff changeset
    21
    CC = gcc-6
85c422506875 Makefiles: allow to specify C compiler on a command line
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 226
diff changeset
    22
  else ifneq ($(shell which gcc-5),)
85c422506875 Makefiles: allow to specify C compiler on a command line
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 226
diff changeset
    23
    CC = gcc-5
85c422506875 Makefiles: allow to specify C compiler on a command line
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 226
diff changeset
    24
  else ifneq ($(shell which gcc-4),)
85c422506875 Makefiles: allow to specify C compiler on a command line
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 226
diff changeset
    25
    CC = gcc-4
85c422506875 Makefiles: allow to specify C compiler on a command line
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 226
diff changeset
    26
  endif
182
f3d06fad7606 Makefiles: (temporarily) use GCC 4.x, 5.x or 6.x
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
    27
endif