makelib/config-x86_64.make
author Jan Vrany <jan.vrany@fit.cvut.cz>
Fri, 20 Dec 2019 22:16:22 +0000
changeset 324 980eac9a7a1d
parent 303 7276ef940aa3
permissions -rw-r--r--
RISC-V: add support for RV64 Linux
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
169
f9f519bb10b6 Use GNU target triplets to specify build targets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     1
#
f9f519bb10b6 Use GNU target triplets to specify build targets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     2
# Common definition for i686 arch
f9f519bb10b6 Use GNU target triplets to specify build targets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     3
#
f9f519bb10b6 Use GNU target triplets to specify build targets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     4
f9f519bb10b6 Use GNU target triplets to specify build targets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     5
CPU_INTERN_H = cpu_x86_64.h
f9f519bb10b6 Use GNU target triplets to specify build targets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     6
DEFS += -D__x86_64__
f9f519bb10b6 Use GNU target triplets to specify build targets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     7
CCCONFOPT = -m64 -fPIC
303
7276ef940aa3 Use at most GCC 8.x when targeting i686 and x86_64
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 169
diff changeset
     8
7276ef940aa3 Use at most GCC 8.x when targeting i686 and x86_64
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 169
diff changeset
     9
# We need to use at most GCC 8.x, for yet unknown reason with GCC 9.x and
7276ef940aa3 Use at most GCC 8.x when targeting i686 and x86_64
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 169
diff changeset
    10
# newer Smalltalk/X crashes.
7276ef940aa3 Use at most GCC 8.x when targeting i686 and x86_64
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 169
diff changeset
    11
#
7276ef940aa3 Use at most GCC 8.x when targeting i686 and x86_64
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 169
diff changeset
    12
# Note, that we have to use the trick with `ifeq $(origin CC),...` rather than
7276ef940aa3 Use at most GCC 8.x when targeting i686 and x86_64
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 169
diff changeset
    13
# `ifdef` since CC is one of the GNU make implicit variables. series
7276ef940aa3 Use at most GCC 8.x when targeting i686 and x86_64
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 169
diff changeset
    14
#
7276ef940aa3 Use at most GCC 8.x when targeting i686 and x86_64
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 169
diff changeset
    15
# See https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html
7276ef940aa3 Use at most GCC 8.x when targeting i686 and x86_64
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 169
diff changeset
    16
ifeq ($(origin CC),default)
7276ef940aa3 Use at most GCC 8.x when targeting i686 and x86_64
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 169
diff changeset
    17
  ifneq ($(shell which gcc-8),)
7276ef940aa3 Use at most GCC 8.x when targeting i686 and x86_64
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 169
diff changeset
    18
    CC = gcc-8
7276ef940aa3 Use at most GCC 8.x when targeting i686 and x86_64
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 169
diff changeset
    19
  else ifneq ($(shell which gcc-7),)
7276ef940aa3 Use at most GCC 8.x when targeting i686 and x86_64
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 169
diff changeset
    20
    CC = gcc-7
7276ef940aa3 Use at most GCC 8.x when targeting i686 and x86_64
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 169
diff changeset
    21
  else ifneq ($(shell which gcc-6),)
7276ef940aa3 Use at most GCC 8.x when targeting i686 and x86_64
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 169
diff changeset
    22
    CC = gcc-6
7276ef940aa3 Use at most GCC 8.x when targeting i686 and x86_64
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 169
diff changeset
    23
  else ifneq ($(shell which gcc-5),)
7276ef940aa3 Use at most GCC 8.x when targeting i686 and x86_64
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 169
diff changeset
    24
    CC = gcc-5
7276ef940aa3 Use at most GCC 8.x when targeting i686 and x86_64
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 169
diff changeset
    25
  else ifneq ($(shell which gcc-4),)
7276ef940aa3 Use at most GCC 8.x when targeting i686 and x86_64
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 169
diff changeset
    26
    CC = gcc-4
7276ef940aa3 Use at most GCC 8.x when targeting i686 and x86_64
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 169
diff changeset
    27
  endif
7276ef940aa3 Use at most GCC 8.x when targeting i686 and x86_64
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 169
diff changeset
    28
endif
7276ef940aa3 Use at most GCC 8.x when targeting i686 and x86_64
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 169
diff changeset
    29