diff options
author | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2019-12-04 16:29:49 +0000 |
---|---|---|
committer | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2019-12-04 16:29:49 +0000 |
commit | 705c36e2cd345f88f071eb4b0a5c24ccf7cb7524 (patch) | |
tree | ed1462556556fa97565f4aa9a84d1168fbed93d7 /reproduce | |
parent | db01d15f1233a34115a7fd5ea38ad52eb7110848 (diff) |
Perl built without -shared on macOS
Until now, while building Perl, the `-Dlddlflags="-shared $$LDFLAGS"'
option was being used for all systems. However, this caused `symbol(s) not
found for architecture x86_64' problems on macOS systems.
With this commit, this configure option is only passed for GNU/Linux
systems. With it, Perl can be built nicely on both GNU/Linux and macOS.
Diffstat (limited to 'reproduce')
-rw-r--r-- | reproduce/software/make/basic.mk | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/reproduce/software/make/basic.mk b/reproduce/software/make/basic.mk index 42246e1..dbf40f9 100644 --- a/reproduce/software/make/basic.mk +++ b/reproduce/software/make/basic.mk @@ -1020,6 +1020,16 @@ $(ibidir)/mpfr: $(ibidir)/gmp \ $(call gbuild, mpfr-$(mpfr-version), static, , , make check) \ && echo "GNU Multiple Precision Floating-Point Reliably $(mpfr-version)" > $@ +# The `-shared' flag will cause problems while building Perl on macOS, so +# we'll only use this configuration option when we are GNU/Linux +# systems. However, since the whole option must be used (which includes `=' +# and empty space), its easier to define the variable as a Make variable +# outside the recipe, not as a shell variable inside it. +ifeq ($(on_mac_os),yes) +perl-conflddlflags = +else +perl-conflddlflags = -Dlddlflags="-shared $$LDFLAGS" +endif $(ibidir)/perl: | $(ibidir)/coreutils \ $(tdir)/perl-$(perl-version).tar.gz major_version=$$(echo $(perl-version) \ @@ -1057,7 +1067,7 @@ $(ibidir)/perl: | $(ibidir)/coreutils \ -Dman1ext=1perl \ -Dman3ext=3perl \ -Dcccdlflags='-fPIC' \ - -Dlddlflags="-shared $$LDFLAGS" \ + $(perl-conflddlflags) \ -Dldflags="$$LDFLAGS" \ && make SHELL=$(ibdir)/bash -j$(numthreads) \ && make SHELL=$(ibdir)/bash install \ |