Skip to content
Browse files

Fixed bug 2360 - Wrong -rpath setting includes DESTDIR rather that on…

…ly the libdir

Marcus von Appen

The LT_LDFLAGS in contain the $(DESTDIR) in -rpath, which instructs libtool to take a wrong path into account for linking.

The issue arises, if DESTDIR is passed at build time and installation time.
-rpath only should use $(libdir) for both SDL 1.2 and SDL 2.x.
  • Loading branch information
slouken committed Aug 14, 2017
1 parent 64dd829 commit 1da2c1bb36e3b3413307158cd619a3d3078a99ec
Showing with 3 additions and 3 deletions.
  1. +3 −3
@@ -121,7 +121,7 @@ LT_AGE = @LT_AGE@
LT_LDFLAGS = -no-undefined -rpath $(DESTDIR)$(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
LT_LDFLAGS = -no-undefined -rpath $(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)

all: $(srcdir)/configure Makefile $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET)

@@ -145,10 +145,10 @@ $(objects)/$(TARGET): $(GEN_HEADERS) $(GEN_OBJECTS) $(OBJECTS) $(VERSION_OBJECTS

$(RUN_CMD_LTLINK)$(LIBTOOL) --tag=CC --mode=link $(CC) -static -o $@ $(SDLMAIN_OBJECTS) -rpath $(DESTDIR)$(libdir)
$(RUN_CMD_LTLINK)$(LIBTOOL) --tag=CC --mode=link $(CC) -static -o $@ $(SDLMAIN_OBJECTS) -rpath $(libdir)

$(RUN_CMD_LTLINK)$(LIBTOOL) --tag=CC --mode=link $(CC) -static -o $@ $(SDLTEST_OBJECTS) -rpath $(DESTDIR)$(libdir)
$(RUN_CMD_LTLINK)$(LIBTOOL) --tag=CC --mode=link $(CC) -static -o $@ $(SDLTEST_OBJECTS) -rpath $(libdir)

install: all install-bin install-hdrs install-lib install-data

0 comments on commit 1da2c1b

Please sign in to comment.