[Libreoffice-commits] .: config/config_clang.h.in config/config_global.h.in config/config_graphite.h.in config/config_telepathy.h.in config/config_vclplug.h.in config/config_version.h.in config/.gitignore config_host/config_clang.h.in config_host/config_global.h.in config_host/config_graphite.h.in config_host/config_telepathy.h.in config_host/config_vclplug.h.in config_host/config_version.h.in config_host/.gitignore config_host/README config/README configure.ac cross_tail_build/Makefile cross_toolset/Makefile .gitignore Makefile.in solenv/gbuild
Tor Lillqvist
tml at iki.fi
Thu Jan 31 11:46:41 PST 2013
.gitignore | 1 +
Makefile.in | 2 +-
config/.gitignore | 1 -
config/README | 24 ------------------------
config/config_clang.h.in | 19 -------------------
config/config_global.h.in | 22 ----------------------
config/config_graphite.h.in | 6 ------
config/config_telepathy.h.in | 6 ------
config/config_vclplug.h.in | 15 ---------------
config/config_version.h.in | 26 --------------------------
config_host/.gitignore | 1 +
config_host/README | 24 ++++++++++++++++++++++++
config_host/config_clang.h.in | 19 +++++++++++++++++++
config_host/config_global.h.in | 22 ++++++++++++++++++++++
config_host/config_graphite.h.in | 6 ++++++
config_host/config_telepathy.h.in | 6 ++++++
config_host/config_vclplug.h.in | 15 +++++++++++++++
config_host/config_version.h.in | 26 ++++++++++++++++++++++++++
configure.ac | 16 +++++++++-------
cross_tail_build/Makefile | 2 ++
cross_toolset/Makefile | 2 ++
solenv/gbuild/platform/com_GCC_defs.mk | 2 +-
22 files changed, 135 insertions(+), 128 deletions(-)
New commits:
commit c5b1441ede3c58f1fe92372cbb48864f9d4df6ec
Author: Tor Lillqvist <tml at iki.fi>
Date: Thu Jan 31 20:44:25 2013 +0200
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
diff --git a/.gitignore b/.gitignore
index 99b0a9d..aa5a6fa 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 c28ca6b..a4e5710 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/.gitignore
deleted file mode 100644
index 9becb5b..0000000
--- a/config/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-config_*.h
diff --git a/config/README b/config/README
deleted file mode 100644
index fd58b64..0000000
--- a/config/README
+++ /dev/null
@@ -1,24 +0,0 @@
-These are configuration files for various features as detected by configure.
-
-Include only those files you need (in order to reduce rebuilds when a setting changes).
-
-Settings here are only C/C++ #define directives, so they apply only to C/C++ source,
-not to Makefiles.
-
-
-
-Adding a new setting:
-=====================
-
-- do AC_DEFINE(HAVE_FOO) in configure.ac when a setting should be set
-- choose the proper config/config_xxx.h file to use
- - if it is a global setting (such as availability of a compiler feature),
- use config/config_global.h
- - otherwise check if there is a matching config/config_hxx.h file
- - if none matches, add a new one:
- - add config/config_xxx.h.in here, with just #ifndef include guard
- - add AC_CONFIG_HEADERS([config/config_xxx.h]) next to the others
- in configure.ac
- - add config_hxx.h to config/.gitignore
-- add #undef HAVE_FOO to the config/config_hxx.h , possibly with a comment
-- add #include <config_xxx.h> before any #ifdef HAVE_XXX in a source file
diff --git a/config/config_clang.h.in b/config/config_clang.h.in
deleted file mode 100644
index 056d3e8..0000000
--- a/config/config_clang.h.in
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-
-Settings related to Clang compiler plugins.
-
-*/
-
-#ifndef CONFIG_CLANG_H
-#define CONFIG_CLANG_H
-
-#undef BUILDDIR
-#undef OUTDIR
-#undef SRCDIR
-#undef WORKDIR
-
-/* This is actually unused, but it should change whenever Clang changes,
-thus causing update of this .h file and triggerring rebuild of our Clang plugin. */
-#undef CLANG_FULL_VERSION
-
-#endif
diff --git a/config/config_global.h.in b/config/config_global.h.in
deleted file mode 100644
index 0f85b59..0000000
--- a/config/config_global.h.in
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
-Global configuration file.
-
-Only for settings that apply to every source file and are unlikely to change often,
-such as whether a certain C++11 feature is available.
-
-Do NOT use for settings local to some code or for settings that can change often.
-Any change in this header will cause a rebuild of almost everything.
-
-*/
-
-#ifndef CONFIG_GLOBAL_H
-#define CONFIG_GLOBAL_H
-
-#undef HAVE_CXX11_DELETE
-#undef HAVE_CXX11_OVERRIDE
-#undef HAVE_GCC_BUILTIN_ATOMIC
-#undef HAVE_SFINAE_ANONYMOUS_BROKEN
-#undef HAVE_THREADSAFE_STATICS
-#undef HAVE_SYSLOG_H
-
-#endif
diff --git a/config/config_graphite.h.in b/config/config_graphite.h.in
deleted file mode 100644
index eb7a7b3..0000000
--- a/config/config_graphite.h.in
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef CONFIG_GRAPHITE_H
-#define CONFIG_GRAPHITE_H
-
-#undef ENABLE_GRAPHITE
-
-#endif
diff --git a/config/config_telepathy.h.in b/config/config_telepathy.h.in
deleted file mode 100644
index f8752b5..0000000
--- a/config/config_telepathy.h.in
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef CONFIG_TELEPATHY
-#define CONFIG_TELEPATHY
-
-#undef ENABLE_TELEPATHY
-
-#endif
diff --git a/config/config_vclplug.h.in b/config/config_vclplug.h.in
deleted file mode 100644
index 46c6bd1..0000000
--- a/config/config_vclplug.h.in
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
-
-Settings about which X11 desktops have support enabled.
-
-*/
-
-#ifndef CONFIG_VCLPLUG_H
-#define CONFIG_VCLPLUG_H
-
-#undef ENABLE_GTK
-#undef ENABLE_KDE
-#undef ENABLE_KDE4
-#undef ENABLE_TDE
-
-#endif
diff --git a/config/config_version.h.in b/config/config_version.h.in
deleted file mode 100644
index 736c578..0000000
--- a/config/config_version.h.in
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
-Version settings
- version 4.0.0.1 is Major.Minor.Micro.Patch
-*/
-
-#ifndef CONFIG_VERSION_H
-#define CONFIG_VERSION_H
-
-#define LIBO_VERSION_STRINGIFY_inner(s) #s
-#define LIBO_VERSION_STRINGIFY(s) LIBO_VERSION_STRINGIFY_inner(s)
-
-#undef LIBO_VERSION_MAJOR
-#undef LIBO_VERSION_MINOR
-#undef LIBO_VERSION_MICRO
-#undef LIBO_VERSION_PATCH
-
-#define LIBO_VERSION_DOTTED \
- (LIBO_VERSION_STRINGIFY(LIBO_VERSION_MAJOR) "." \
- LIBO_VERSION_STRINGIFY(LIBO_VERSION_MINOR) "." \
- LIBO_VERSION_STRINGIFY(LIBO_VERSION_MICRO) "." \
- LIBO_VERSION_STRINGIFY(LIBO_VERSION_PATCH))
-
-#define LIBO_VERSION_ENCODED_IN_32BITS \
- ((LIBO_VERSION_MAJOR << 24) | (LIBO_VERSION_MINOR << 16) | (LIBO_VERSION_MICRO << 8) | LIBO_VERSION_PATCH)
-
-#endif
diff --git a/config_host/.gitignore b/config_host/.gitignore
new file mode 100644
index 0000000..9becb5b
--- /dev/null
+++ b/config_host/.gitignore
@@ -0,0 +1 @@
+config_*.h
diff --git a/config_host/README b/config_host/README
new file mode 100644
index 0000000..fd58b64
--- /dev/null
+++ b/config_host/README
@@ -0,0 +1,24 @@
+These are configuration files for various features as detected by configure.
+
+Include only those files you need (in order to reduce rebuilds when a setting changes).
+
+Settings here are only C/C++ #define directives, so they apply only to C/C++ source,
+not to Makefiles.
+
+
+
+Adding a new setting:
+=====================
+
+- do AC_DEFINE(HAVE_FOO) in configure.ac when a setting should be set
+- choose the proper config/config_xxx.h file to use
+ - if it is a global setting (such as availability of a compiler feature),
+ use config/config_global.h
+ - otherwise check if there is a matching config/config_hxx.h file
+ - if none matches, add a new one:
+ - add config/config_xxx.h.in here, with just #ifndef include guard
+ - add AC_CONFIG_HEADERS([config/config_xxx.h]) next to the others
+ in configure.ac
+ - add config_hxx.h to config/.gitignore
+- add #undef HAVE_FOO to the config/config_hxx.h , possibly with a comment
+- add #include <config_xxx.h> before any #ifdef HAVE_XXX in a source file
diff --git a/config_host/config_clang.h.in b/config_host/config_clang.h.in
new file mode 100644
index 0000000..056d3e8
--- /dev/null
+++ b/config_host/config_clang.h.in
@@ -0,0 +1,19 @@
+/*
+
+Settings related to Clang compiler plugins.
+
+*/
+
+#ifndef CONFIG_CLANG_H
+#define CONFIG_CLANG_H
+
+#undef BUILDDIR
+#undef OUTDIR
+#undef SRCDIR
+#undef WORKDIR
+
+/* This is actually unused, but it should change whenever Clang changes,
+thus causing update of this .h file and triggerring rebuild of our Clang plugin. */
+#undef CLANG_FULL_VERSION
+
+#endif
diff --git a/config_host/config_global.h.in b/config_host/config_global.h.in
new file mode 100644
index 0000000..0f85b59
--- /dev/null
+++ b/config_host/config_global.h.in
@@ -0,0 +1,22 @@
+/*
+Global configuration file.
+
+Only for settings that apply to every source file and are unlikely to change often,
+such as whether a certain C++11 feature is available.
+
+Do NOT use for settings local to some code or for settings that can change often.
+Any change in this header will cause a rebuild of almost everything.
+
+*/
+
+#ifndef CONFIG_GLOBAL_H
+#define CONFIG_GLOBAL_H
+
+#undef HAVE_CXX11_DELETE
+#undef HAVE_CXX11_OVERRIDE
+#undef HAVE_GCC_BUILTIN_ATOMIC
+#undef HAVE_SFINAE_ANONYMOUS_BROKEN
+#undef HAVE_THREADSAFE_STATICS
+#undef HAVE_SYSLOG_H
+
+#endif
diff --git a/config_host/config_graphite.h.in b/config_host/config_graphite.h.in
new file mode 100644
index 0000000..eb7a7b3
--- /dev/null
+++ b/config_host/config_graphite.h.in
@@ -0,0 +1,6 @@
+#ifndef CONFIG_GRAPHITE_H
+#define CONFIG_GRAPHITE_H
+
+#undef ENABLE_GRAPHITE
+
+#endif
diff --git a/config_host/config_telepathy.h.in b/config_host/config_telepathy.h.in
new file mode 100644
index 0000000..f8752b5
--- /dev/null
+++ b/config_host/config_telepathy.h.in
@@ -0,0 +1,6 @@
+#ifndef CONFIG_TELEPATHY
+#define CONFIG_TELEPATHY
+
+#undef ENABLE_TELEPATHY
+
+#endif
diff --git a/config_host/config_vclplug.h.in b/config_host/config_vclplug.h.in
new file mode 100644
index 0000000..46c6bd1
--- /dev/null
+++ b/config_host/config_vclplug.h.in
@@ -0,0 +1,15 @@
+/*
+
+Settings about which X11 desktops have support enabled.
+
+*/
+
+#ifndef CONFIG_VCLPLUG_H
+#define CONFIG_VCLPLUG_H
+
+#undef ENABLE_GTK
+#undef ENABLE_KDE
+#undef ENABLE_KDE4
+#undef ENABLE_TDE
+
+#endif
diff --git a/config_host/config_version.h.in b/config_host/config_version.h.in
new file mode 100644
index 0000000..736c578
--- /dev/null
+++ b/config_host/config_version.h.in
@@ -0,0 +1,26 @@
+/*
+Version settings
+ version 4.0.0.1 is Major.Minor.Micro.Patch
+*/
+
+#ifndef CONFIG_VERSION_H
+#define CONFIG_VERSION_H
+
+#define LIBO_VERSION_STRINGIFY_inner(s) #s
+#define LIBO_VERSION_STRINGIFY(s) LIBO_VERSION_STRINGIFY_inner(s)
+
+#undef LIBO_VERSION_MAJOR
+#undef LIBO_VERSION_MINOR
+#undef LIBO_VERSION_MICRO
+#undef LIBO_VERSION_PATCH
+
+#define LIBO_VERSION_DOTTED \
+ (LIBO_VERSION_STRINGIFY(LIBO_VERSION_MAJOR) "." \
+ LIBO_VERSION_STRINGIFY(LIBO_VERSION_MINOR) "." \
+ LIBO_VERSION_STRINGIFY(LIBO_VERSION_MICRO) "." \
+ LIBO_VERSION_STRINGIFY(LIBO_VERSION_PATCH))
+
+#define LIBO_VERSION_ENCODED_IN_32BITS \
+ ((LIBO_VERSION_MAJOR << 24) | (LIBO_VERSION_MINOR << 16) | (LIBO_VERSION_MICRO << 8) | LIBO_VERSION_PATCH)
+
+#endif
diff --git a/configure.ac b/configure.ac
index a707d4a..b2f7d5c 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 89d3627..e632a08 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 2ea3619..1694f3a 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 8350505..039333b 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),)
More information about the Libreoffice-commits
mailing list