From 035e44f3bfdd814c4b7d8240011672ed625aed8d Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Fri, 16 Nov 2018 19:07:03 +0000 Subject: Configure script checks if static libraries will be built The default Mac compiler has problems building static libraries. Since we are not yet building the GNU C Compiler as part of the pipeline, we'll have to rely on the host system's compiler. Therefore, a check is now added a the start of the configure script that will build a minimal program with the `-static' flag and if it fails, it will print a warning. Afterwards, none of the dependencies will be built with the `-static' flag. --- reproduce/src/make/dependencies-build-rules.mk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'reproduce/src/make/dependencies-build-rules.mk') diff --git a/reproduce/src/make/dependencies-build-rules.mk b/reproduce/src/make/dependencies-build-rules.mk index 31e7759..49838f3 100644 --- a/reproduce/src/make/dependencies-build-rules.mk +++ b/reproduce/src/make/dependencies-build-rules.mk @@ -48,7 +48,9 @@ # 4: Extra configuration options. # 5: Extra options/arguments to pass to Make. # 6: Step to run between `make' and `make install': usually `make check'. -gbuild = if [ $(3)x = staticx ]; then export LDFLAGS="$$LDFLAGS -static"; fi; \ +gbuild = if [ $(static_build) = yes ] && $(3)x = staticx ]; then \ + export LDFLAGS="$$LDFLAGS -static"; \ + fi; \ check="$(6)"; \ if [ x"$$check" = x ]; then check="echo Skipping-check"; fi; \ cd $(ddir) && rm -rf $(2) && tar xf $(tdir)/$(1) && cd $(2) && \ @@ -64,7 +66,7 @@ gbuild = if [ $(3)x = staticx ]; then export LDFLAGS="$$LDFLAGS -static"; fi; \ # CMake # ----- -cbuild = if [ $(3)x = staticx ]; then \ +cbuild = if [ $(static_build) = yes ] && [ $(3)x = staticx ]; then \ export LDFLAGS="$$LDFLAGS -static"; \ opts="-DBUILD_SHARED_LIBS=OFF"; \ fi; \ -- cgit v1.2.1