aboutsummaryrefslogtreecommitdiff
path: root/reproduce/src/make/dependencies-basic.mk
diff options
context:
space:
mode:
Diffstat (limited to 'reproduce/src/make/dependencies-basic.mk')
-rw-r--r--reproduce/src/make/dependencies-basic.mk48
1 files changed, 35 insertions, 13 deletions
diff --git a/reproduce/src/make/dependencies-basic.mk b/reproduce/src/make/dependencies-basic.mk
index 2e6caf4..4d39141 100644
--- a/reproduce/src/make/dependencies-basic.mk
+++ b/reproduce/src/make/dependencies-basic.mk
@@ -574,8 +574,15 @@ $(ilidir)/openssl: $(tdir)/openssl-$(openssl-version).tar.gz \
--with-zlib-lib=$(ildir) \
--with-zlib-include=$(idir)/include, , , \
./config ) && \
- cp $(tdir)/cert.pem $(idir)/etc/ssl/cert.pem && \
- echo "OpenSSL is built and ready" > $@
+ cp $(tdir)/cert.pem $(idir)/etc/ssl/cert.pem; \
+ if [ $$? = 0 ]; then \
+ if [ x$(on_mac_os) = xyes ]; then \
+ echo "No need to fix rpath in libssl"; \
+ else \
+ patchelf --set-rpath $(ildir) $(ildir)/libssl.so; \
+ fi; \
+ echo "OpenSSL is built and ready" > $@; \
+ fi
# GNU Wget
#
@@ -750,8 +757,14 @@ $(ibdir)/gcc: $(gcc-prerequisites) \
$(ibdir)/which
# On a macOS, we (currently!) won't build GCC because of some
- # errors we are still trying to fix. So, we'll just make a symbolic
- # link to the host's executables.
+ # errors we are still trying to find. So, we'll just make a
+ # symbolic link to the host's executables.
+ #
+ # GCC builds is own libraries in '$(idir)/lib64'. But all other
+ # libraries are in '$(idir)/lib'. Since this pipeline is only for a
+ # single architecture, we can trick GCC into building its libraries
+ # in '$(idir)/lib' by defining the '$(idir)/lib64' as a symbolic
+ # link to '$(idir)/lib'.
if [ "x$(on_mac_os)" = xyes ]; then \
$(call makelink,gfortran); \
$(call makelink,g++); \
@@ -762,12 +775,14 @@ $(ibdir)/gcc: $(gcc-prerequisites) \
rm -rf $(ildir)/gcc $(ildir)/libcc* $(ildir)/libgcc*; \
rm -rf $(ildir)/libgfortran* $(ildir)/libstdc* rm $(idir)/x86_64*;\
\
+ ln -fs $(ildir) $(idir)/lib64; \
+ \
cd $(ddir); \
rm -rf gcc-build gcc-$(gcc-version); \
- tar xf $< && \
- mkdir $(ddir)/gcc-build && \
- cd $(ddir)/gcc-build && \
- ../gcc-$(gcc-version)/configure SHELL=$(ibdir)/bash \
+ tar xf $< \
+ && mkdir $(ddir)/gcc-build \
+ && cd $(ddir)/gcc-build \
+ && ../gcc-$(gcc-version)/configure SHELL=$(ibdir)/bash \
--prefix=$(idir) \
--with-mpc=$(idir) \
--with-mpfr=$(idir) \
@@ -785,9 +800,16 @@ $(ibdir)/gcc: $(gcc-prerequisites) \
--enable-default-pie \
--enable-default-ssp \
--enable-cet=auto \
- --enable-decimal-float && \
- make SHELL=$(ibdir)/bash -j$$(nproc) && \
- make SHELL=$(ibdir)/bash install && \
- cd .. && \
- rm -rf gcc-build gcc-$(gcc-version); \
+ --enable-decimal-float \
+ && make SHELL=$(ibdir)/bash -j$$(nproc) \
+ && make SHELL=$(ibdir)/bash install \
+ && cd .. \
+ && rm -rf gcc-build gcc-$(gcc-version) \
+ \
+ && for f in $$(find $(idir)/libexec/gcc); do \
+ if ldd $$f &> /dev/null; then \
+ patchelf --set-rpath $(ildir) $$f; \
+ fi; \
+ done; \
fi
+