diff options
author | Tor Lillqvist <tml@iki.fi> | 2013-01-31 20:44:25 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2013-01-31 21:43:59 +0200 |
commit | c5b1441ede3c58f1fe92372cbb48864f9d4df6ec (patch) | |
tree | c86b771e67121fe3ff1711f403bd633c02e93ec4 | |
parent | 0e63a97066a817f3d01b40d99e3e1ed831ae3598 (diff) |
Use separate config_*.h files for BUILD and HOST when cross-compiling
We have only been lucky so far that there hasn't been any compilation errors
caused by using the HOST platform config_*.h files also for the BUILD
platform. But as more and more information found out during configury is
stored in config_*.h files, sooner or later it will be a problem.
Move config/* to config_host/*. When not cross-compiling, the config_*.h files
in config_host expanded from config_*.h.in are all there is. When
cross-compiling, the generated config_*.h files for the BUILD platform are
put into a config_build folder.
Then use config_build when building the cross_toolset and config_host
otherwise.
Change-Id: I3c28cc83866bffd696b45d00dfb68e00bc2ae538
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile.in | 2 | ||||
-rw-r--r-- | config_host/.gitignore (renamed from config/.gitignore) | 0 | ||||
-rw-r--r-- | config_host/README (renamed from config/README) | 0 | ||||
-rw-r--r-- | config_host/config_clang.h.in (renamed from config/config_clang.h.in) | 0 | ||||
-rw-r--r-- | config_host/config_global.h.in (renamed from config/config_global.h.in) | 0 | ||||
-rw-r--r-- | config_host/config_graphite.h.in (renamed from config/config_graphite.h.in) | 0 | ||||
-rw-r--r-- | config_host/config_telepathy.h.in (renamed from config/config_telepathy.h.in) | 0 | ||||
-rw-r--r-- | config_host/config_vclplug.h.in (renamed from config/config_vclplug.h.in) | 0 | ||||
-rw-r--r-- | config_host/config_version.h.in (renamed from config/config_version.h.in) | 0 | ||||
-rw-r--r-- | configure.ac | 16 | ||||
-rw-r--r-- | cross_tail_build/Makefile | 2 | ||||
-rw-r--r-- | cross_toolset/Makefile | 2 | ||||
-rw-r--r-- | solenv/gbuild/platform/com_GCC_defs.mk | 2 |
14 files changed, 16 insertions, 9 deletions
diff --git a/.gitignore b/.gitignore index 99b0a9dea3f3..aa5a6fab857f 100644 --- a/.gitignore +++ b/.gitignore @@ -46,6 +46,7 @@ /config_host.mk /config_host.mk.last /config_host.mk.stamp +/config_build/config_*.h /config_build.mk /configure /Makefile diff --git a/Makefile.in b/Makefile.in index c28ca6bd3e03..a4e57105142b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -46,7 +46,7 @@ else # MAKE_RESTARTS all: build ifeq ($(gb_Side),) -gb_Side:=host +export gb_Side:=host endif include $(BUILDDIR)/config_$(gb_Side).mk diff --git a/config/.gitignore b/config_host/.gitignore index 9becb5b61647..9becb5b61647 100644 --- a/config/.gitignore +++ b/config_host/.gitignore diff --git a/config/README b/config_host/README index fd58b64045bb..fd58b64045bb 100644 --- a/config/README +++ b/config_host/README diff --git a/config/config_clang.h.in b/config_host/config_clang.h.in index 056d3e80832a..056d3e80832a 100644 --- a/config/config_clang.h.in +++ b/config_host/config_clang.h.in diff --git a/config/config_global.h.in b/config_host/config_global.h.in index 0f85b59c3785..0f85b59c3785 100644 --- a/config/config_global.h.in +++ b/config_host/config_global.h.in diff --git a/config/config_graphite.h.in b/config_host/config_graphite.h.in index eb7a7b3400f7..eb7a7b3400f7 100644 --- a/config/config_graphite.h.in +++ b/config_host/config_graphite.h.in diff --git a/config/config_telepathy.h.in b/config_host/config_telepathy.h.in index f8752b5f5336..f8752b5f5336 100644 --- a/config/config_telepathy.h.in +++ b/config_host/config_telepathy.h.in diff --git a/config/config_vclplug.h.in b/config_host/config_vclplug.h.in index 46c6bd1aea77..46c6bd1aea77 100644 --- a/config/config_vclplug.h.in +++ b/config_host/config_vclplug.h.in diff --git a/config/config_version.h.in b/config_host/config_version.h.in index 736c578afc8c..736c578afc8c 100644 --- a/config/config_version.h.in +++ b/config_host/config_version.h.in diff --git a/configure.ac b/configure.ac index a707d4a88b29..b2f7d5c4bdef 100644 --- a/configure.ac +++ b/configure.ac @@ -4114,7 +4114,7 @@ if test "$cross_compiling" = "yes"; then config_host.mk.in \ configure \ Makefile.in \ - config/config_*.h.in \ + config_host/config_*.h.in \ bin/get_config_variables \ solenv/bin/getcompver.awk \ solenv/inc/langlist.mk \ @@ -4170,6 +4170,8 @@ if test "$cross_compiling" = "yes"; then test -f ./config_host.mk 2>/dev/null || exit cp config_host.mk ../config_build.mk cp config.log ../config.Build.log + mkdir -p ../config_build + cp config_host/*.h ../config_build . ./bin/get_config_variables COM GUI OS PATH CPU CPUNAME CC CXX DISABLE_PYTHON MACOSX_DEPLOYMENT_TARGET INPATH OUTPATH PYTHON SYSTEM_LIBXSLT OUTDIR SOLARINC SOLARLIB WORKDIR for V in COM GUI OS CPU CPUNAME CC CXX DISABLE_PYTHON MACOSX_DEPLOYMENT_TARGET INPATH OUTPATH \ @@ -12308,12 +12310,12 @@ else fi AC_CONFIG_FILES([config_host.mk Makefile solenv/inc/minor.mk instsetoo_native/util/openoffice.lst]) -AC_CONFIG_HEADERS([config/config_clang.h]) -AC_CONFIG_HEADERS([config/config_global.h]) -AC_CONFIG_HEADERS([config/config_graphite.h]) -AC_CONFIG_HEADERS([config/config_telepathy.h]) -AC_CONFIG_HEADERS([config/config_vclplug.h]) -AC_CONFIG_HEADERS([config/config_version.h]) +AC_CONFIG_HEADERS([config_host/config_clang.h]) +AC_CONFIG_HEADERS([config_host/config_global.h]) +AC_CONFIG_HEADERS([config_host/config_graphite.h]) +AC_CONFIG_HEADERS([config_host/config_telepathy.h]) +AC_CONFIG_HEADERS([config_host/config_vclplug.h]) +AC_CONFIG_HEADERS([config_host/config_version.h]) AC_OUTPUT # touch the config timestamp file diff --git a/cross_tail_build/Makefile b/cross_tail_build/Makefile index 89d362745b41..e632a08bf563 100644 --- a/cross_tail_build/Makefile +++ b/cross_tail_build/Makefile @@ -30,6 +30,8 @@ ifeq ($(strip $(SOLARENV)),) include $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/../config_build.mk endif +export gb_Side=build + include $(SOLARENV)/gbuild/gbuild.mk $(eval $(call gb_Module_make_global_targets,$(SRCDIR)/Module_cross_tail_build.mk)) diff --git a/cross_toolset/Makefile b/cross_toolset/Makefile index 2ea36198cc7c..1694f3a78dee 100644 --- a/cross_toolset/Makefile +++ b/cross_toolset/Makefile @@ -6,6 +6,8 @@ SHELL=/usr/bin/env bash include ../config_build.mk +export gb_Side=build + .PHONY : build build: diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk index 83505051a4d7..039333b3eac1 100644 --- a/solenv/gbuild/platform/com_GCC_defs.mk +++ b/solenv/gbuild/platform/com_GCC_defs.mk @@ -157,7 +157,7 @@ gb_DEBUG_CXXFLAGS := $(FNO_DEFAULT_INLINE) gb_LinkTarget_INCLUDE :=\ $(subst -I. , ,$(SOLARINC)) \ - -I$(BUILDDIR)/config \ + -I$(BUILDDIR)/config_$(gb_Side) \ ifeq ($(COM_GCC_IS_CLANG),TRUE) ifeq ($(COMPILER_PLUGIN_TOOL),) |