Skip to content

Commit f5b904d

Browse files
committed
Makefile: Allow CC_LD_DYNPATH to be overriden
Current Makefile does not allow config.mak to override CC_LD_DYNPATH; it only lets it affect indirectly via NO_R_TO_GCC_LINKER. If the command line, config.mak or config.mak.autogen wants to set CC_LD_DYNPATH differently, we should just allow it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 2ebc02d commit f5b904d

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

Makefile

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -688,8 +688,7 @@ ifeq ($(uname_S),NetBSD)
688688
NEEDS_LIBICONV = YesPlease
689689
endif
690690
BASIC_CFLAGS += -I/usr/pkg/include
691-
BASIC_LDFLAGS += -L/usr/pkg/lib
692-
ALL_LDFLAGS += -Wl,-rpath,/usr/pkg/lib
691+
BASIC_LDFLAGS += -L/usr/pkg/lib $(CC_LD_DYNPATH)/usr/pkg/lib
693692
endif
694693
ifeq ($(uname_S),AIX)
695694
NO_STRCASESTR=YesPlease
@@ -781,12 +780,14 @@ ifeq ($(uname_S),Darwin)
781780
endif
782781
endif
783782

784-
ifdef NO_R_TO_GCC_LINKER
785-
# Some gcc does not accept and pass -R to the linker to specify
786-
# the runtime dynamic library path.
787-
CC_LD_DYNPATH = -Wl,-rpath=
788-
else
789-
CC_LD_DYNPATH = -R
783+
ifndef CC_LD_DYNPATH
784+
ifdef NO_R_TO_GCC_LINKER
785+
# Some gcc does not accept and pass -R to the linker to specify
786+
# the runtime dynamic library path.
787+
CC_LD_DYNPATH = -Wl,-rpath,
788+
else
789+
CC_LD_DYNPATH = -R
790+
endif
790791
endif
791792

792793
ifdef NO_CURL

0 commit comments

Comments
 (0)