summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2018-12-02 20:32:30 -0500
committermidipix <writeonce@midipix.org>2018-12-10 20:34:28 -0500
commitaa5698527aa4f4fd1e7d24abfca186a75e4ae4fa (patch)
tree78e151adbad839599c10e90d82883f3923795208
parent45f73a7f18e2052d969386f8155527c42de26070 (diff)
downloadapimagic-aa5698527aa4f4fd1e7d24abfca186a75e4ae4fa.tar.bz2
apimagic-aa5698527aa4f4fd1e7d24abfca186a75e4ae4fa.tar.xz
build system: added NATIVE_CC_HOST support.
-rw-r--r--Makefile.in9
-rw-r--r--config.usage2
-rwxr-xr-xconfigure8
3 files changed, 18 insertions, 1 deletions
diff --git a/Makefile.in b/Makefile.in
index 208a2ed..89d4904 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -84,6 +84,8 @@ PDFDIR = @pdfdir@
PSDIR = @psdir@
NATIVE_CC = @native_cc@
+NATIVE_CC_HOST = @native_cc_host@
+
NATIVE_OS = @native_os@
NATIVE_OS_BITS = @native_os_bits@
NATIVE_OS_UNDERSCORE = @native_os_underscore@
@@ -251,6 +253,9 @@ host.tag: Makefile
$(PROJECT_DIR)/sysinfo/host/host.sh --compiler="$(CC)" --cflags="$(CFLAGS)"
touch host.tag
+cchost-native:
+ $(PROJECT_DIR)/sysinfo/host/host.sh --compiler="$(NATIVE_CC)"
+
version.tag: $(GIT_REFERENCE_INDEX)
$(PROJECT_DIR)/sysinfo/version.sh \
-s $(SOURCE_DIR) \
@@ -412,6 +417,8 @@ clean: clean-implib
.display-build:
@echo NATIVE_CC:' '$(NATIVE_CC)
+ @echo NATIVE_CC_HOST:' '$(NATIVE_CC_HOST)
+ @echo
@echo NATIVE_OS:' '$(NATIVE_OS)
@echo NATIVE_OS_BITS:' '$(NATIVE_OS_BITS)
@echo NATIVE_OS_UNDERSCORE:' '$(NATIVE_OS_UNDERSCORE)
@@ -438,7 +445,7 @@ clean: clean-implib
@echo $(CFLAGS)
-.PHONY: cchost package-app \
+.PHONY: cchost cchost-native package-app \
all install shared static app \
shared-objs shared-lib \
shared-soname shared-solink \
diff --git a/config.usage b/config.usage
index b8792bd..36303cd 100644
--- a/config.usage
+++ b/config.usage
@@ -152,6 +152,8 @@ supported variables:
ELF_CONFIG_DEFS
NATIVE_CC
+ NATIVE_CC_HOST
+
NATIVE_OS
NATIVE_OS_BITS
NATIVE_OS_UNDERSCORE
diff --git a/configure b/configure
index 8c4a4ab..e607fee 100755
--- a/configure
+++ b/configure
@@ -113,6 +113,8 @@ init_vars()
# overrides
mb_native_cc=$NATIVE_CC
+ mb_native_cc_host=$NATIVE_CC_HOST
+
mb_native_os=$NATIVE_OS
mb_native_os_bits=$NATIVE_OS_BITS
mb_native_os_underscore=$NATIVE_OS_UNDERSCORE
@@ -346,6 +348,10 @@ native_defaults()
mb_native_cc='false'
fi
+ if [ -z "$mb_native_cc_host" ]; then
+ mb_native_cc_host=$($mb_project_dir/sysinfo/host/host.sh --compiler=$mb_native_cc)
+ fi
+
if [ -z "$mb_compiler" ]; then
$mb_native_cc -dM -E - < /dev/null | grep -q '__clang__' && mb_compiler='clang'
fi
@@ -530,6 +536,8 @@ config_copy()
-e 's^@psdir@^'"$mb_psdir"'^g' \
\
-e 's^@native_cc@^'"$mb_native_cc"'^g' \
+ -e 's^@native_cc_host@^'"$mb_native_cc_host"'^g' \
+ \
-e 's^@native_os@^'"$mb_native_os"'^g' \
-e 's^@native_os_bits@^'"$mb_native_os_bits"'^g' \
-e 's^@native_os_underscore@^'"$mb_native_os_underscore"'^g' \