summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2022-03-08 22:47:58 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-03-10 13:07:37 +0000
commitc6aa831fe575d989ea4710a18ace4f9da551f055 (patch)
tree947d837ffd012ea4d06deb331e087cef05fe3adc /meta/recipes-extended
parente34f694c3539bc8557a323361e277bbc85addd2c (diff)
downloadpoky-c6aa831fe575d989ea4710a18ace4f9da551f055.tar.gz
zip: Pass ldflags to configure tests using linking
(From OE-Core rev: 118e4ca244a8ff48b126225b8f98b7c9f66b71f1) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r--meta/recipes-extended/zip/zip-3.0/0001-configure-Use-CFLAGS-and-LDFLAGS-when-doing-link-tes.patch88
-rw-r--r--meta/recipes-extended/zip/zip_3.0.bb1
2 files changed, 89 insertions, 0 deletions
diff --git a/meta/recipes-extended/zip/zip-3.0/0001-configure-Use-CFLAGS-and-LDFLAGS-when-doing-link-tes.patch b/meta/recipes-extended/zip/zip-3.0/0001-configure-Use-CFLAGS-and-LDFLAGS-when-doing-link-tes.patch
new file mode 100644
index 0000000000..475a653f28
--- /dev/null
+++ b/meta/recipes-extended/zip/zip-3.0/0001-configure-Use-CFLAGS-and-LDFLAGS-when-doing-link-tes.patch
@@ -0,0 +1,88 @@
1From ab5df4826c4a532da78828b72a2751c899e27ef2 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 8 Mar 2022 22:31:21 -0800
4Subject: [PATCH] configure: Use CFLAGS and LDFLAGS when doing link tests
5
6Some case link flags contain important flags which are required during
7linking, link fails otherwise without them, which can result in
8configure detection go wrong, ensure these flags are used along with CC
9when tests involve linking
10
11Upstream-Status: Pending
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 unix/configure | 16 ++++++++--------
15 1 file changed, 8 insertions(+), 8 deletions(-)
16
17diff --git a/unix/configure b/unix/configure
18index 1bc698b..1d9a9bb 100644
19--- a/unix/configure
20+++ b/unix/configure
21@@ -517,14 +517,14 @@ for func in rmdir strchr strrchr rename mktemp mktime mkstemp
22 do
23 echo Check for $func
24 echo "int main(){ $func(); return 0; }" > conftest.c
25- $CC $BFLAG -o conftest conftest.c >/dev/null 2>/dev/null
26+ $CC $CFLAGS $LDFLAGS $BFLAG -o conftest conftest.c >/dev/null 2>/dev/null
27 [ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_`echo $func | tr '[a-z]' '[A-Z]'`"
28 done
29
30
31 echo Check for memset
32 echo "int main(){ char k; memset(&k,0,0); return 0; }" > conftest.c
33-$CC -o conftest conftest.c >/dev/null 2>/dev/null
34+$CC $CFLAGS $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null
35 [ $? -ne 0 ] && CFLAGS="${CFLAGS} -DZMEM"
36
37
38@@ -533,7 +533,7 @@ cat > conftest.c << _EOF_
39 #include <string.h>
40 int main() { int a; int b = 0; memmove( &a, &b, sizeof( a)); return a; }
41 _EOF_
42-$CC -o conftest conftest.c >/dev/null 2>/dev/null
43+$CC $CFLAGS $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null
44 [ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNEED_MEMMOVE"
45
46
47@@ -542,7 +542,7 @@ cat > conftest.c << _EOF_
48 #include <string.h>
49 int main() { strerror( 0); return 0; }
50 _EOF_
51-$CC -o conftest conftest.c >/dev/null 2>/dev/null
52+$CC $CFLAGS $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null
53 [ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNEED_STRERROR"
54
55 echo Check for errno declaration
56@@ -563,7 +563,7 @@ cat > conftest.c << _EOF_
57 int main() { return closedir(opendir(".")); }
58 _EOF_
59
60-$CC -o conftest conftest.c >/dev/null 2>/dev/null
61+$CC $CFLAGS $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null
62 if [ $? -ne 0 ]; then
63 OPT=""
64 for lib in ndir dir ucb bsd BSD PW x dirent
65@@ -583,9 +583,9 @@ fi
66
67 echo Check for readlink
68 echo "int main(){ return readlink(); }" > conftest.c
69-$CC -o conftest conftest.c >/dev/null 2>/dev/null
70+$CC $CFLAGS $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null
71 if [ $? -ne 0 ]; then
72- $CC -o conftest conftest.c -lseq >/dev/null 2>/dev/null
73+ $CC $CFLAGS $LDFLAGS -o conftest conftest.c -lseq >/dev/null 2>/dev/null
74 [ $? -eq 0 ] && LFLAGS2="${LFLAGS2} -lseq"
75 fi
76
77@@ -661,7 +661,7 @@ elif [ -f /xenix ]; then
78 elif uname -X >/dev/null 2>/dev/null; then
79 # SCO shared library check
80 echo "int main() { return 0;}" > conftest.c
81- $CC -o conftest conftest.c -lc_s -nointl >/dev/null 2> /dev/null
82+ $CC $CFLAGS $LDFLAGS -o conftest conftest.c -lc_s -nointl >/dev/null 2> /dev/null
83 [ $? -eq 0 ] && LFLAGS2="-lc_s -nointl"
84 else
85 SYSTEM=`uname -s 2>/dev/null` || SYSTEM="unknown"
86--
872.35.1
88
diff --git a/meta/recipes-extended/zip/zip_3.0.bb b/meta/recipes-extended/zip/zip_3.0.bb
index 0547cd5c53..07a67b9634 100644
--- a/meta/recipes-extended/zip/zip_3.0.bb
+++ b/meta/recipes-extended/zip/zip_3.0.bb
@@ -16,6 +16,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/infozip/Zip%203.x%20%28latest%29/3.0/zip30.tar.
16 file://zipnote-crashes-with-segfault.patch \ 16 file://zipnote-crashes-with-segfault.patch \
17 file://0001-configure-use-correct-CPP.patch \ 17 file://0001-configure-use-correct-CPP.patch \
18 file://0002-configure-support-PIC-code-build.patch \ 18 file://0002-configure-support-PIC-code-build.patch \
19 file://0001-configure-Use-CFLAGS-and-LDFLAGS-when-doing-link-tes.patch \
19 " 20 "
20UPSTREAM_VERSION_UNKNOWN = "1" 21UPSTREAM_VERSION_UNKNOWN = "1"
21 22