From fa912a33396487aa213fbc3cf66305fdbfd312de Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Tue, 4 Dec 2018 15:16:08 +0000 Subject: Removed already built symbolic links to OS tools `ln' will complain about a link already existing. So to avoid having to rely on the `-f' option (which may not be portable across systems), when we are making symbolic links to the OS tools that we won't be building, we now remove the file if it exists, then make a new symbolic link. --- reproduce/src/make/dependencies-basic.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/reproduce/src/make/dependencies-basic.mk b/reproduce/src/make/dependencies-basic.mk index f9b35f8..b007778 100644 --- a/reproduce/src/make/dependencies-basic.mk +++ b/reproduce/src/make/dependencies-basic.mk @@ -188,6 +188,7 @@ $(tarballs): $(tdir)/%: # any C compiler that the system already has and just make a symbolic link # to it. makelink = export PATH=$(syspath); a=$$(which $(1) 2> /dev/null); \ + if [ -f $(ibdir)/$(1) ]; then rm $(ibdir)/$(1); fi; \ if [ x$$a != x ]; then ln -s $$a $(ibdir)/$(1); fi $(ibdir) $(ildir):; mkdir $@ $(ibdir)/low-level-links: | $(ibdir) $(ildir) @@ -228,6 +229,7 @@ $(ibdir)/low-level-links: | $(ibdir) $(ildir) # Libdl (for dynamic loading libraries at runtime) # POSIX Threads library for multi-threaded programs. for l in dl pthread; do \ + rm -f $(ildir)/lib$$l*; \ if [ -f /usr/lib/lib$$l.a ]; then \ ln -s /usr/lib/lib$$l.* $(ildir)/; \ fi; \ -- cgit v1.2.1