1*4882a593SmuzhiyunFrom 0d9e004d324cc030c173de04c40db51a0f22bb5c Mon Sep 17 00:00:00 2001 2*4882a593SmuzhiyunFrom: Fabrice Fontaine <fontaine.fabrice@gmail.com> 3*4882a593SmuzhiyunDate: Thu, 15 Oct 2020 07:58:05 +0200 4*4882a593SmuzhiyunSubject: [PATCH] Makefile: fix static linking with pcre 5*4882a593Smuzhiyun 6*4882a593SmuzhiyunStatic build with pcre is broken since version 1.19b and 7*4882a593Smuzhiyunhttps://github.com/yrutschle/sslh/commit/cb90cc97ae64a445242e517847c6e44b7003eda4 8*4882a593Smuzhiyunbecause -lpcre has been replaced by -lpcreposix which will result in 9*4882a593Smuzhiyunthe following static build failure: 10*4882a593Smuzhiyun 11*4882a593Smuzhiyun/srv/storage/autobuild/run/instance-1/output-1/host/bin/mipsel-linux-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -static -static -o echosrv echosrv.o probe.o common.o tls.o -lpcreposix -lconfig -lcap 12*4882a593Smuzhiyun/srv/storage/autobuild/run/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mipsel-buildroot-linux-uclibc/8.3.0/../../../../mipsel-buildroot-linux-uclibc/bin/ld: /srv/storage/autobuild/run/instance-1/output-1/host/mipsel-buildroot-linux-uclibc/sysroot/usr/lib/libpcreposix.a(libpcreposix_la-pcreposix.o): in function `regfree': 13*4882a593Smuzhiyunpcreposix.c:(.text+0x120): undefined reference to `pcre_free' 14*4882a593Smuzhiyun 15*4882a593SmuzhiyunSo append -lpcre after -lpcreposix 16*4882a593Smuzhiyun 17*4882a593SmuzhiyunFixes: 18*4882a593Smuzhiyun - http://autobuild.buildroot.org/results/a601824fc0c205a6a940e0f9f079ce2c39840605 19*4882a593Smuzhiyun 20*4882a593SmuzhiyunSigned-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> 21*4882a593Smuzhiyun[Upstream status: https://github.com/yrutschle/sslh/pull/280] 22*4882a593Smuzhiyun--- 23*4882a593Smuzhiyun Makefile | 2 +- 24*4882a593Smuzhiyun 1 file changed, 1 insertion(+), 1 deletion(-) 25*4882a593Smuzhiyun 26*4882a593Smuzhiyundiff --git a/Makefile b/Makefile 27*4882a593Smuzhiyunindex 986cf1c..ecadc22 100644 28*4882a593Smuzhiyun--- a/Makefile 29*4882a593Smuzhiyun+++ b/Makefile 30*4882a593Smuzhiyun@@ -43,7 +43,7 @@ endif 31*4882a593Smuzhiyun 32*4882a593Smuzhiyun ifneq ($(strip $(USELIBPCRE)),) 33*4882a593Smuzhiyun CPPFLAGS+=-DLIBPCRE 34*4882a593Smuzhiyun- LIBS:=$(LIBS) -lpcreposix 35*4882a593Smuzhiyun+ LIBS:=$(LIBS) -lpcreposix -lpcre 36*4882a593Smuzhiyun endif 37*4882a593Smuzhiyun 38*4882a593Smuzhiyun ifneq ($(strip $(USELIBCONFIG)),) 39*4882a593Smuzhiyun-- 40*4882a593Smuzhiyun2.28.0 41*4882a593Smuzhiyun 42