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

Signed-off-by: Khem Raj <[email protected]>
---
 .../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

diff --git a/meta-oe/recipes-support/imapfilter/imapfilter/ldflags.patch 
b/meta-oe/recipes-support/imapfilter/imapfilter/ldflags.patch
new file mode 100644
index 0000000000..ceda8394a7
--- /dev/null
+++ b/meta-oe/recipes-support/imapfilter/imapfilter/ldflags.patch
@@ -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
diff --git a/meta-oe/recipes-support/imapfilter/imapfilter_2.6.16.bb 
b/meta-oe/recipes-support/imapfilter/imapfilter_2.6.16.bb
index 7d4e12dfb8..86553b5a8c 100644
--- a/meta-oe/recipes-support/imapfilter/imapfilter_2.6.16.bb
+++ b/meta-oe/recipes-support/imapfilter/imapfilter_2.6.16.bb
@@ -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 = ""
-- 
2.28.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#86782): 
https://lists.openembedded.org/g/openembedded-devel/message/86782
Mute This Topic: https://lists.openembedded.org/mt/76575804/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to