aboutsummaryrefslogtreecommitdiff
path: root/reproduce
diff options
context:
space:
mode:
Diffstat (limited to 'reproduce')
-rw-r--r--reproduce/software/make/basic.mk17
-rwxr-xr-xreproduce/software/shell/configure.sh1
2 files changed, 17 insertions, 1 deletions
diff --git a/reproduce/software/make/basic.mk b/reproduce/software/make/basic.mk
index 2cad9f9..d8afccd 100644
--- a/reproduce/software/make/basic.mk
+++ b/reproduce/software/make/basic.mk
@@ -1182,6 +1182,15 @@ endif
# programs (http://savannah.nongnu.org/bugs/?56294). Therefore, we'll set
# all other basic programs as Binutils prerequisite and GCC (the final
# basic target) ultimately just depends on Binutils.
+#
+# The `ld' linker of Binutils needs several `*crt*.o' file to run. On some
+# systems these object files aren't installed in standard places. We
+# defined `LIBRARY_PATH' and that fixed the problem for many
+# systems. However, some software (for example ImageMagick) over-write
+# `LIBRARY_PATH', therefore there is no other way than to put a link to
+# these necessary files in our local build directory. IMPORTANT NOTE:
+# later, when we build the GNU C Library in the project, we should remove
+# this step.
$(ibidir)/binutils: | $(ibidir)/sed \
$(ibidir)/wget \
$(ibidir)/grep \
@@ -1203,11 +1212,17 @@ $(ibidir)/binutils: | $(ibidir)/sed \
$(call makelink,nm); \
$(call makelink,ps); \
$(call makelink,ranlib); \
- echo "" > $@; \
+ echo "" > $@; \
else \
$(call gbuild, binutils-$(binutils-version), static, \
--with-lib-path=$(sys_library_path), \
-j$(numthreads) ) \
+ && if ! [ x"$(sys_library_path)" = x ]; then \
+ for f in $(sys_library_path)/*crt*.o; do \
+ b=$$($(ibdir)/basename $$f); \
+ ln -s $$f $(ildir)/$$b; \
+ done; \
+ fi \
&& echo "GNU Binutils $(binutils-version)" > $@; \
fi
diff --git a/reproduce/software/shell/configure.sh b/reproduce/software/shell/configure.sh
index 4c6c29a..7b3d939 100755
--- a/reproduce/software/shell/configure.sh
+++ b/reproduce/software/shell/configure.sh
@@ -1208,6 +1208,7 @@ fi
# tools, but we have to be very portable (and use minimal features in all).
echo; echo "Building necessary software (if necessary)..."
make -k -f reproduce/software/make/basic.mk \
+ sys_library_path=$sys_library_path \
good_static_libc=$good_static_libc \
rpath_command=$rpath_command \
static_build=$static_build \