Export ARCH64 to config/Makefile as well as m.h

Allows it to be used more easily in the build system.
master
David Allsopp 2018-06-07 13:27:30 +01:00
parent 9e811e10ff
commit 02a3091a7d
6 changed files with 7 additions and 1 deletions

View File

@ -1203,7 +1203,7 @@ check_arch:
.PHONY: check_all_arches
check_all_arches:
ifneq ($(shell grep -E '^\#define ARCH_SIXTYFOUR$$' byterun/caml/m.h 2> /dev/null),)
ifeq ($(ARCH64),true)
@STATUS=0; \
for i in $(ARCHES); do \
$(MAKE) --no-print-directory check_arch ARCH=$$i || STATUS=1; \

View File

@ -178,6 +178,7 @@ ARCMD=$(TOOLPREF)ar
### Name of architecture for the native-code compiler
ARCH=i386
ARCH64=false
### Name of architecture model for the native-code compiler.
MODEL=default

View File

@ -178,6 +178,7 @@ ARCMD=$(TOOLPREF)ar
### Name of architecture for the native-code compiler
ARCH=amd64
ARCH64=true
### Name of architecture model for the native-code compiler.
MODEL=default

View File

@ -173,6 +173,7 @@ ARCMD=
### Name of architecture for the native-code compiler
ARCH=i386
ARCH64=false
### Name of architecture model for the native-code compiler.
MODEL=default

View File

@ -176,6 +176,7 @@ ARCMD=
### Name of architecture for the native-code compiler
ARCH=amd64
ARCH64=true
### Name of architecture model for the native-code compiler.
MODEL=default

2
configure vendored
View File

@ -670,9 +670,11 @@ if test "$?" -eq 0; then
case "$3" in
4) inf "OK, this is a regular 32 bit architecture."
echo "#undef ARCH_SIXTYFOUR" >> m.h
config ARCH64 "false"
arch64=false;;
8) inf "Wow! A 64 bit architecture!"
echo "#define ARCH_SIXTYFOUR" >> m.h
config ARCH64 "true"
arch64=true;;
*) err "This architecture seems to be neither 32 bits nor 64 bits.\n" \
"OCaml won't run on this architecture.";;