summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile13
-rw-r--r--Makefile.config.in3
2 files changed, 14 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 5d10f8e237..b8d4367e72 100644
--- a/Makefile
+++ b/Makefile
@@ -88,10 +88,19 @@ cross-compile-build-tools:
$(Verb) if [ ! -f BuildTools/Makefile ]; then \
$(MKDIR) BuildTools; \
cd BuildTools ; \
- $(PROJ_SRC_DIR)/configure ; \
+ $(PROJ_SRC_DIR)/configure --build=$(BUILD_TRIPLE) \
+ --host=$(BUILD_TRIPLE) --target=$(BUILD_TRIPLE); \
cd .. ; \
fi; \
- ($(MAKE) -C BuildTools BUILD_DIRS_ONLY=1 ) || exit 1;
+ ($(MAKE) -C BuildTools \
+ BUILD_DIRS_ONLY=1 \
+ UNIVERSAL= \
+ ENABLE_OPTIMIZED=$(ENABLE_OPTIMIZED) \
+ ENABLE_PROFILING=$(ENABLE_PROFILING) \
+ ENABLE_COVERAGE=$(ENABLE_COVERAGE) \
+ DISABLE_ASSERTIONS=$(DISABLE_ASSERTIONS) \
+ ENABLE_EXPENSIVE_CHECKS=$(ENABLE_EXPENSIVE_CHECKS) \
+ ) || exit 1;
endif
# Include the main makefile machinery.
diff --git a/Makefile.config.in b/Makefile.config.in
index ecd05957d9..bb68e4c2d3 100644
--- a/Makefile.config.in
+++ b/Makefile.config.in
@@ -110,6 +110,9 @@ BUILD_EXEEXT=@BUILD_EXEEXT@
BUILD_CC=@BUILD_CC@
BUILD_CXX=@BUILD_CXX@
+# Triple for configuring build tools when cross-compiling
+BUILD_TRIPLE=@build@
+
# Target triple (cpu-vendor-os) for which we should generate code
TARGET_TRIPLE=@target@