diff options
Diffstat (limited to 'reproduce/software/make')
-rw-r--r-- | reproduce/software/make/basic.mk | 15 | ||||
-rw-r--r-- | reproduce/software/make/high-level.mk | 7 |
2 files changed, 18 insertions, 4 deletions
diff --git a/reproduce/software/make/basic.mk b/reproduce/software/make/basic.mk index e7d00df..9eba04b 100644 --- a/reproduce/software/make/basic.mk +++ b/reproduce/software/make/basic.mk @@ -1174,6 +1174,7 @@ $(ibidir)/binutils: | $(ibidir)/sed \ $(ibidir)/diffutils \ $(ibidir)/coreutils \ $(gcc-prerequisites) + if [ x$(on_mac_os) = xyes ]; then \ $(call makelink,as); \ $(call makelink,ar); \ @@ -1183,7 +1184,9 @@ $(ibidir)/binutils: | $(ibidir)/sed \ $(call makelink,ranlib); \ echo "" > $@; \ else \ - $(call gbuild, binutils-$(binutils-version), static) \ + $(call gbuild, binutils-$(binutils-version), static, \ + --with-lib-path=$(sys_library_path), \ + -j$(numthreads) ) \ && echo "GNU Binutils $(binutils-version)" > $@; \ fi @@ -1257,15 +1260,19 @@ $(ibidir)/gcc: | $(ibidir)/binutils \ && make SHELL=$(ibdir)/bash -j$(numthreads) \ && make SHELL=$(ibdir)/bash install \ && cd ../.. \ - && rm -rf gcc-$(gcc-version) \ + && tempname=$(ddir)/gcc-$(gcc-version)/build/rpath-temp-copy \ && if [ "x$(on_mac_os)" != xyes ]; then \ patchelf --add-needed $(ildir)/libiconv.so $(ildir)/libstdc++.so; \ for f in $$(find $(idir)/libexec/gcc) $(ildir)/libstdc++*; do \ - if ldd $$f &> /dev/null; then \ - patchelf --set-rpath $(ildir) $$f; \ + isdynamic=$$(file $$f | grep "dynamically linked"); \ + if [ x"$$isdynamic" != x ]; then \ + cp $$f $$tempname; \ + patchelf --set-rpath $(ildir) $$tempname; \ + mv $$tempname $$f; echo "corrected"; \ fi; \ done; \ fi \ + && rm -rf gcc-$(gcc-version) \ && ln -sf $(ibdir)/gcc $(ibdir)/cc \ && echo "GNU Compiler Collection (GCC) $(gcc-version)" > $@; \ fi diff --git a/reproduce/software/make/high-level.mk b/reproduce/software/make/high-level.mk index 735a24a..0afeaba 100644 --- a/reproduce/software/make/high-level.mk +++ b/reproduce/software/make/high-level.mk @@ -84,6 +84,13 @@ export PKG_CONFIG_LIBDIR := $(ildir)/pkgconfig # causes crashs (see bug #56682). So we'll just give it no value at all. export DYLD_LIBRARY_PATH := +# On Debian-based OSs, the basic C libraries are in a target-specific +# location, not in standard places. Until we merge the building of the C +# library, it is thus necessary to include this location here. On systems +# that don't need it, `sys_library_path' is just empty. This is necessary +# for `ld'. +export LIBRARY_PATH := $(sys_library_path) + # Recipe startup script, see `reproduce/software/bash/bashrc.sh'. export PROJECT_STATUS := configure_highlevel export BASH_ENV := $(shell pwd)/reproduce/software/bash/bashrc.sh |