Skip to contentSkip to conversation

imapfilter: Fix linker flags

PATCH New Khem Raj 1 participant 1 message Sep 2, 2020

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 imapfilter: Fix linker flags

Linker flags were not being respected as a result it was passing wrong gnu_hash options while linking.

---
 .../imapfilter/imapfilter/ldflags.patch          | 16 ++++++++++++++++
 .../imapfilter/imapfilter_2.6.16.bb              |  6 +++++-
 2 files changed, 21 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-support/imapfilter/imapfilter/ldflags.patch
meta-oe/recipes-support/imapfilter/imapfilter/ldflags.patch new file +16 -0
new file mode 100644
index 0000000000..ceda8394a7
@@ -0,0 +1,16 @@
+Append to LDFLAGS so it can respect the LDFLAGS passed from environment. This helps
+with using propert GNU_HASH settings during link on mips/arm
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -24,7 +24,7 @@ CFLAGS = -Wall -Wextra -O \
+ 	 -DCONFIG_SSL_CAPATH='"$(SSLCAPATH)"' \
+ 	 -DCONFIG_SSL_CAFILE='"$(SSLCAFILE)"' \
+ 	 $(INCDIRS) $(MYCFLAGS)
+-LDFLAGS = $(LIBDIRS) $(MYLDFLAGS)
++LDFLAGS += $(LIBDIRS) $(MYLDFLAGS)
+ LIBS = -lm -ldl $(LIBLUA) $(LIBPCRE) $(LIBSSL) $(LIBCRYPTO) $(MYLIBS)
+ 
+ MAN1 = imapfilter.1
meta-oe/recipes-support/imapfilter/imapfilter_2.6.16.bb +5 -1
index 7d4e12dfb8..86553b5a8c 100644
@@ -2,7 +2,9 @@ SUMMARY = "IMAPFilter is a mail filtering utility that processes mailboxes based
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=ccca8573ead8e965c130b6b2946a36ab"
 
-SRC_URI = "https://codeload.github.com/lefcha/${BPN}/tar.gz/v${PV};downloadfilename=v${PV}.tar.gz"
+SRC_URI = "https://codeload.github.com/lefcha/${BPN}/tar.gz/v${PV};downloadfilename=${BP}.tar.gz \
+           file://ldflags.patch \
+"
 SRC_URI[sha256sum] = "90af9bc9875e03fb5a09a3233287b74dd817867cb18ec9ff52fead615755563e"
 
 DEPENDS= "openssl lua libpcre"
@@ -15,3 +17,5 @@ do_install(){
     # No need for manuals at this point, MANDIR is hardcoded to depend on prefix
     rm -rf ${D}${prefix}/man
 }
+
+ASNEEDED = ""
Signature · 1 line
2.28.0