summaryrefslogtreecommitdiff
path: root/Makeconf
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2015-11-29 16:47:06 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2015-11-29 16:47:06 +0100
commitc9c29eb890527fe68900e4a0af7c2df9a9fa5b40 (patch)
tree010c18561de5163bac58632f53dd0c44d14af826 /Makeconf
parent9af3576c86ac17264c8542d65779adc4b4872574 (diff)
Use -L instead of -Wl,-rpath-link
The latter does not work for libpthread.a which passes -lihash, which would find the installed libihash.a instead of the just-compiled one. * Makeconf (rpath): Remove, replaced by... (lpath): ... new variable. (link-executable, $(libname).so.$(hurd-version)): Use $(lpath) instead of $(rpath).
Diffstat (limited to 'Makeconf')
-rw-r--r--Makeconf6
1 files changed, 3 insertions, 3 deletions
diff --git a/Makeconf b/Makeconf
index b42e4c79..dc435db1 100644
--- a/Makeconf
+++ b/Makeconf
@@ -324,7 +324,7 @@ _libsubst=${libsubst$(patsubst %,-override,${libsubst-override})}
# Direct the linker where to find shared objects specified in the
# dependencies of other shared objects it encounters.
-rpath := -Wl,-rpath-link=.:$(subst $. ,:,$(dir $(wildcard ../lib*/lib*.so)))
+lpath := -L. $(patsubst %,-L%,$(dir $(wildcard ../lib*/lib*.so)))
# Main rule to link executables
#
@@ -333,7 +333,7 @@ rpath := -Wl,-rpath-link=.:$(subst $. ,:,$(dir $(wildcard ../lib*/lib*.so)))
ifeq ($(prof-depend),)
define link-executable
-$(CC) $(rpath) $(CFLAGS) $($*-CFLAGS) $(LDFLAGS) $($*-LDFLAGS) \
+$(CC) $(lpath) $(CFLAGS) $($*-CFLAGS) $(LDFLAGS) $($*-LDFLAGS) \
$(BUGADDR_REF) \
-o $@
endef
@@ -382,7 +382,7 @@ $(libname)_pic.a: $(patsubst %.o,%_pic.o,$(OBJS))
# we make that a symlink.
$(libname).so.$(hurd-version): $(patsubst %.o,%_pic.o,$(OBJS)) $(library_deps)
$(CC) -shared -Wl,-soname=$@ -o $@ \
- $(rpath) $(CFLAGS) $(LDFLAGS) $($(libname).so-LDFLAGS) \
+ $(lpath) $(CFLAGS) $(LDFLAGS) $($(libname).so-LDFLAGS) \
'-Wl,-(' $(filter-out %.map,$^) \
$($(libname).so-LDLIBS) $(LDLIBS) \
'-Wl,-)' $(filter %.map,$^)