diff options
author | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2020-04-17 20:29:55 +0100 |
---|---|---|
committer | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2020-04-17 20:29:55 +0100 |
commit | 5950fb9d463b8258f2b1bbd633585eff1ff06002 (patch) | |
tree | 6e1006f271dfa21ceb47a51c09a48f18bd240316 /reproduce | |
parent | 8eb0892e179b4970a9835d29b5f57dd912ca4464 (diff) |
Patchelf is now built dynamically
Until a few commits ago, PatchELF was built statically because it was used
to patch `libstdc++' at the end of the GCC building phase, but PatchELF
also depends on `libstdc++', so it would crash. However, recently when
patching the GCC libraries, we don't directly apply Patchelf to the
library, first we copy it to a temporary place, do the patching, then put
it in its proper place. So the problem above won't happen any more.
With this commit, I am thus removing the static flag from patchelf and
letting it built dynamically all the time. The main problem was that some
systems don't have a static C++ library, so PatchELF couldn't be built
statically. Instead of adding more checks, we just fixed the core
foundation of the problem.
Diffstat (limited to 'reproduce')
-rw-r--r-- | reproduce/software/make/basic.mk | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/reproduce/software/make/basic.mk b/reproduce/software/make/basic.mk index 17bb47a..e8fc105 100644 --- a/reproduce/software/make/basic.mk +++ b/reproduce/software/make/basic.mk @@ -567,18 +567,9 @@ $(ibidir)/readline: $(ibidir)/ncurses \ SHLIB_LIBS="-lncursesw" -j$(numthreads)) \ && echo "GNU Readline $(readline-version)" > $@ -# When we have a static C library, PatchELF will be built statically. This -# is because PatchELF links with the C++ standard library. But we need to -# run PatchELF later on `libstdc++'! This circular dependency can cause a -# crash, so when PatchELF can't be built statically, we won't build GCC -# either, see the `configure.sh' script where we define `good_static_libc' -# for more. $(ibidir)/patchelf: | $(ibidir)/make \ $(tdir)/patchelf-$(patchelf-version).tar.gz - if [ $(good_static_libc) = 1 ]; then \ - export LDFLAGS="$$LDFLAGS -static"; \ - fi; \ - $(call gbuild, patchelf-$(patchelf-version), static) \ + $(call gbuild, patchelf-$(patchelf-version)) \ && echo "PatchELF $(patchelf-version)" > $@ @@ -1342,7 +1333,7 @@ $(ibidir)/gcc: | $(ibidir)/binutils \ if [ "$$f" = $(ildir)/libstdc++.so ]; then \ patchelf --add-needed $(ildir)/libiconv.so $$tempname; \ fi; \ - mv $$tempname $$f; echo "corrected"; \ + mv $$tempname $$f; \ fi; \ done; \ fi \ |