From 705c36e2cd345f88f071eb4b0a5c24ccf7cb7524 Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Wed, 4 Dec 2019 16:29:49 +0000 Subject: 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. --- reproduce/software/make/basic.mk | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'reproduce/software/make/basic.mk') 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 \ -- cgit v1.2.1