Skip to content

Commit 31318ce

Browse files
committed
MAKEFILE: Move PCRE2 library path search earlier
Don't put "-L" linker options after the "-l" library. Move the search for libpcre2-8 before "-lpcre2-8" is added to OS_LDFLAGS.
1 parent 3f2775d commit 31318ce

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -613,11 +613,14 @@ ifeq (${WIN32},) #*nix Environments (&& cygwin)
613613
PCRE2_LIB=pcre2-8
614614
ifneq (,$(call find_lib,${PCRE2_LIB}))
615615
OS_CCDEFS += -DHAVE_PCRE2_H
616-
OS_LDFLAGS += -l${PCRE2_LIB}
617-
$(info using libpcre2-8: $(call find_lib,${PCRE2_LIB}) $(call find_include,pcre2))
618616
ifeq ($(LD_SEARCH_NEEDED),$(call need_search,${PCRE2_LIB}))
619-
OS_LDFLAGS += -L$(dir $(call find_lib,${{PCRE2_LIB}}))
617+
PCRE2_LIBPATH = $(dir $(call find_lib,${PCRE2_LIB}))
618+
ifneq (,${PCRE2_LIBPATH})
619+
OS_LDFLAGS += -L${PCRE2_LIBPATH}
620+
endif
620621
endif
622+
OS_LDFLAGS += -l${PCRE2_LIB}
623+
$(info using libpcre2-8: $(call find_lib,${PCRE2_LIB}) $(call find_include,pcre2))
621624
FALLBACK_PCRE=
622625
endif
623626
endif

0 commit comments

Comments
 (0)