Skip to content

Commit f90cf4f

Browse files
committed
WIP-rpath
1 parent 32b11b1 commit f90cf4f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Makefile.rules

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,7 @@ ifneq (,$(findstring cygwin,$(host_os)))
440440
LIBGAP_FULL = libgap$(SHLIB_EXT)
441441

442442
LINK_SHLIB_FLAGS = -shared -Wl,--enable-auto-image-base -Wl,--out-implib,libgap.dll.a
443+
GAP_LDFLAGS += -Wl,-rpath,$(libdir)
443444
else ifneq (,$(findstring darwin,$(host_os)))
444445
SHLIB_EXT=.dylib
445446
LIBGAP_FULL = libgap.$(SHLIB_MAJOR)$(SHLIB_EXT)
@@ -455,6 +456,7 @@ else ifneq (,$(findstring darwin,$(host_os)))
455456
GAP_CPPFLAGS += -DPIC
456457
GAP_CFLAGS += -fno-common
457458
GAP_CXXFLAGS += -fno-common
459+
GAP_LDFLAGS += -Wl,-rpath,$(libdir)
458460
else
459461
# Note: the following was tested on Linux -- patches making this work better
460462
# on e.g. FreeBSD/OpenBSD/... are highly welcome

0 commit comments

Comments
 (0)