Skip to content

Commit 774a74f

Browse files
bscottmpkoning2
authored andcommitted
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 24cd667 commit 774a74f

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -617,11 +617,14 @@ ifeq (${WIN32},) #*nix Environments (&& cygwin)
617617
PCRE2_LIB=pcre2-8
618618
ifneq (,$(call find_lib,${PCRE2_LIB}))
619619
OS_CCDEFS += -DHAVE_PCRE2_H
620-
OS_LDFLAGS += -l${PCRE2_LIB}
621-
$(info using libpcre2-8: $(call find_lib,${PCRE2_LIB}) $(call find_include,pcre2))
622620
ifeq ($(LD_SEARCH_NEEDED),$(call need_search,${PCRE2_LIB}))
623-
OS_LDFLAGS += -L$(dir $(call find_lib,${{PCRE2_LIB}}))
621+
PCRE2_LIBPATH = $(dir $(call find_lib,${PCRE2_LIB}))
622+
ifneq (,${PCRE2_LIBPATH})
623+
OS_LDFLAGS += -L${PCRE2_LIBPATH}
624+
endif
624625
endif
626+
OS_LDFLAGS += -l${PCRE2_LIB}
627+
$(info using libpcre2-8: $(call find_lib,${PCRE2_LIB}) $(call find_include,pcre2))
625628
FALLBACK_PCRE=
626629
endif
627630
endif

0 commit comments

Comments
 (0)