diff options
author | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2018-11-16 19:07:03 +0000 |
---|---|---|
committer | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2018-11-16 19:10:41 +0000 |
commit | 035e44f3bfdd814c4b7d8240011672ed625aed8d (patch) | |
tree | 612f3604fee775869462d3bc888ad88ce4a0eba1 /reproduce/src/make/dependencies-build-rules.mk | |
parent | a0ac5af0b21c79a65d8657f762ff5324bd2419ae (diff) |
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.
Diffstat (limited to 'reproduce/src/make/dependencies-build-rules.mk')
-rw-r--r-- | reproduce/src/make/dependencies-build-rules.mk | 6 |
1 files changed, 4 insertions, 2 deletions
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; \ |