From 774a74ffa47abcc3e022e24cefaafb362b60fd27 Mon Sep 17 00:00:00 2001 From: "B. Scott Michel" Date: Thu, 21 Nov 2024 15:06:18 -0800 Subject: [PATCH] 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. --- makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/makefile b/makefile index 0cc0ea9a..b460a38b 100644 --- a/makefile +++ b/makefile @@ -617,11 +617,14 @@ ifeq (${WIN32},) #*nix Environments (&& cygwin) PCRE2_LIB=pcre2-8 ifneq (,$(call find_lib,${PCRE2_LIB})) OS_CCDEFS += -DHAVE_PCRE2_H + ifeq ($(LD_SEARCH_NEEDED),$(call need_search,${PCRE2_LIB})) + PCRE2_LIBPATH = $(dir $(call find_lib,${PCRE2_LIB})) + ifneq (,${PCRE2_LIBPATH}) + OS_LDFLAGS += -L${PCRE2_LIBPATH} + endif + endif OS_LDFLAGS += -l${PCRE2_LIB} $(info using libpcre2-8: $(call find_lib,${PCRE2_LIB}) $(call find_include,pcre2)) - ifeq ($(LD_SEARCH_NEEDED),$(call need_search,${PCRE2_LIB})) - OS_LDFLAGS += -L$(dir $(call find_lib,${{PCRE2_LIB}})) - endif FALLBACK_PCRE= endif endif