From 8db3d5731bc999983ca6c776731a26a4e97d8bc8 Mon Sep 17 00:00:00 2001 From: TheCharlatan Date: Tue, 20 Mar 2018 01:26:35 +0100 Subject: Modify depends for monero's dependencies Add readline, ldns, graphviz, unbound to depends packages Add a cmake toolchain file to depends that is uniquely created for every build and placed in triple/share/toolchain.cmake This file is then passed to cmake with -DCMAKE_TOOLCHAIN_FILE=/path/to/triple/share/toolchain.cmake Add the boost locale package to depends In the depends cmake toolchain file, a DEPENDS flag is added to exclude, or change cmake checks done that are required for depends Link miniupnpc and unwind from depends and not external Add libiconv and icu4c to depends, required for mingw32 builds. Headers (winsock) need to be lower case in order to compile on unix systems. This should not affect building on windows. --- .../icu-001-dont-build-static-dynamic-twice.patch | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 contrib/depends/patches/icu4c/icu-001-dont-build-static-dynamic-twice.patch (limited to 'contrib/depends/patches/icu4c') diff --git a/contrib/depends/patches/icu4c/icu-001-dont-build-static-dynamic-twice.patch b/contrib/depends/patches/icu4c/icu-001-dont-build-static-dynamic-twice.patch new file mode 100644 index 000000000..bbd4e99e7 --- /dev/null +++ b/contrib/depends/patches/icu4c/icu-001-dont-build-static-dynamic-twice.patch @@ -0,0 +1,37 @@ +Don't build object files twice + +When passed --enable-static and --enable-shared, icu will generate +both a shared and a static version of its libraries. + +However, in order to do so, it builds each and every object file +twice: once with -fPIC (for the shared library), and once without +-fPIC (for the static library). While admittedly building -fPIC for a +static library generates a slightly suboptimal code, this is what all +the autotools-based project are doing. They build each object file +once, and they use it for both the static and shared libraries. + +icu builds the object files for the shared library as .o files, and +the object files for static library as .ao files. By simply changing +the suffix of object files used for static libraries to ".o", we tell +icu to use the ones built for the shared library (i.e, with -fPIC), +and avoid the double build of icu. + +On a fast build server, this brings the target icu build from +3m41.302s down to 1m43.926s (approximate numbers: some other builds +are running on the system at the same time). + +Signed-off-by: Thomas Petazzoni + +Index: b/source/config/mh-linux +=================================================================== +--- a/source/config/mh-linux ++++ b/source/config/mh-linux +@@ -38,7 +38,7 @@ + ## Shared object suffix + SO = so + ## Non-shared intermediate object suffix +-STATIC_O = ao ++STATIC_O = o + + ## Compilation rules + %.$(STATIC_O): $(srcdir)/%.c -- cgit v1.2.3