diff options
author | Khem Raj <raj.khem@gmail.com> | 2022-03-09 12:26:05 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-03-11 06:56:01 +0000 |
commit | 172b9aa6d2c893edef784c92388c39d3b1162767 (patch) | |
tree | 53cdd03099b63c08f2ddc29d8ef7f85b471a08e0 | |
parent | 2c545a19ce971c359ba7bbe28b675f4c9797a623 (diff) | |
download | poky-172b9aa6d2c893edef784c92388c39d3b1162767.tar.gz |
unzip: Pass LDFLAGS to configure tests
Ensures the configure time tests are compiled/linked with the Options
that it will be using to build.
(From OE-Core rev: 6d01bb24f198710b7acb49c43a8a813b6e01ed14)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-extended/unzip/unzip/0001-configure-Pass-LDFLAGS-to-tests-doing-link-step.patch | 137 | ||||
-rw-r--r-- | meta/recipes-extended/unzip/unzip_6.0.bb | 1 |
2 files changed, 138 insertions, 0 deletions
diff --git a/meta/recipes-extended/unzip/unzip/0001-configure-Pass-LDFLAGS-to-tests-doing-link-step.patch b/meta/recipes-extended/unzip/unzip/0001-configure-Pass-LDFLAGS-to-tests-doing-link-step.patch new file mode 100644 index 0000000000..716766de29 --- /dev/null +++ b/meta/recipes-extended/unzip/unzip/0001-configure-Pass-LDFLAGS-to-tests-doing-link-step.patch | |||
@@ -0,0 +1,137 @@ | |||
1 | From da29ba6a27d8e78562052c79061476848915eb2a Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 9 Mar 2022 12:13:28 -0800 | ||
4 | Subject: [PATCH] configure: Pass LDFLAGS to tests doing link step | ||
5 | |||
6 | Ensures that right flags from recipes are honored, otherwise tests fail | ||
7 | which otherwise should not. | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | unix/configure | 28 ++++++++++++++-------------- | ||
13 | 1 file changed, 14 insertions(+), 14 deletions(-) | ||
14 | |||
15 | diff --git a/unix/configure b/unix/configure | ||
16 | index d4b0a8e..49579f3 100755 | ||
17 | --- a/unix/configure | ||
18 | +++ b/unix/configure | ||
19 | @@ -116,7 +116,7 @@ _EOF_ | ||
20 | # Special Mac OS X shared library "ld" option? | ||
21 | if test ` uname -s 2> /dev/null ` = 'Darwin'; then | ||
22 | lf='-Wl,-search_paths_first' | ||
23 | - $CC $CFLAGS $lf conftest.c > /dev/null 2>/dev/null | ||
24 | + $CC $CFLAGS $LDFLAGS $lf conftest.c > /dev/null 2>/dev/null | ||
25 | if test $? -eq 0; then | ||
26 | BZLF=${lf} | ||
27 | fi | ||
28 | @@ -276,7 +276,7 @@ int main() | ||
29 | } | ||
30 | _EOF_ | ||
31 | # compile it | ||
32 | -$CC -o conftest conftest.c >/dev/null 2>/dev/null | ||
33 | +$CC $CFLAGS $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null | ||
34 | if [ $? -ne 0 ]; then | ||
35 | echo -- no Large File Support | ||
36 | else | ||
37 | @@ -322,7 +322,7 @@ int main() | ||
38 | } | ||
39 | _EOF_ | ||
40 | # compile it | ||
41 | -$CC -o conftest conftest.c >/dev/null 2>/dev/null | ||
42 | +$CC $CFLAGS $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null | ||
43 | if [ $? -ne 0 ]; then | ||
44 | echo "-- no Unicode (wchar_t) support" | ||
45 | else | ||
46 | @@ -383,7 +383,7 @@ for func in fchmod fchown lchown nl_langinfo | ||
47 | do | ||
48 | echo Check for $func | ||
49 | echo "int main(){ $func(); return 0; }" > conftest.c | ||
50 | - $CC $BFLAG -o conftest conftest.c >/dev/null 2>/dev/null | ||
51 | + $CC $BFLAG $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null | ||
52 | [ $? -ne 0 ] && CFLAGSR="${CFLAGSR} -DNO_`echo $func | tr '[a-z]' '[A-Z]'`" | ||
53 | done | ||
54 | |||
55 | @@ -395,14 +395,14 @@ temp_link="link_$$" | ||
56 | echo "int main() { lchmod(\"${temp_file}\", 0666); }" \ | ||
57 | ) > conftest.c | ||
58 | ln -s "${temp_link}" "${temp_file}" && \ | ||
59 | - $CC $BFLAG -o conftest conftest.c >/dev/null 2>/dev/null && \ | ||
60 | + $CC $BFLAG $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null && \ | ||
61 | ./conftest | ||
62 | [ $? -ne 0 ] && CFLAGSR="${CFLAGSR} -DNO_LCHMOD" | ||
63 | rm -f "${temp_file}" | ||
64 | |||
65 | echo Check for memset | ||
66 | echo "int main(){ char k; memset(&k,0,0); return 0; }" > conftest.c | ||
67 | -$CC -o conftest conftest.c >/dev/null 2>/dev/null | ||
68 | +$CC $CFLAGS $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null | ||
69 | [ $? -ne 0 ] && CFLAGSR="${CFLAGSR} -DZMEM" | ||
70 | |||
71 | echo Check for errno declaration | ||
72 | @@ -422,12 +422,12 @@ cat > conftest.c << _EOF_ | ||
73 | int main() { return closedir(opendir(".")); } | ||
74 | _EOF_ | ||
75 | |||
76 | -$CC -o conftest conftest.c >/dev/null 2>/dev/null | ||
77 | +$CC $CFLAGS $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null | ||
78 | if [ $? -ne 0 ]; then | ||
79 | OPT="" | ||
80 | for lib in ndir dir ucb bsd BSD PW x dirent | ||
81 | do | ||
82 | - $CC -o conftest conftest.c -l$lib >/dev/null 2>/dev/null | ||
83 | + $CC $CLFAGS $LDFLAGS -o conftest conftest.c -l$lib >/dev/null 2>/dev/null | ||
84 | [ $? -eq 0 ] && OPT=-l$lib && break | ||
85 | done | ||
86 | if [ ${OPT} ]; then | ||
87 | @@ -440,9 +440,9 @@ fi | ||
88 | # Dynix/ptx 1.3 needed this | ||
89 | echo Check for readlink | ||
90 | echo "int main(){ return readlink(); }" > conftest.c | ||
91 | -$CC -o conftest conftest.c >/dev/null 2>/dev/null | ||
92 | +$CC $CFLAGS $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null | ||
93 | if [ $? -ne 0 ]; then | ||
94 | - $CC -o conftest conftest.c -lseq >/dev/null 2>/dev/null | ||
95 | + $CC $CFLAGS $LDFLAGS -o conftest conftest.c -lseq >/dev/null 2>/dev/null | ||
96 | [ $? -eq 0 ] && LFLAGS2="${LFLAGS2} -lseq" | ||
97 | fi | ||
98 | |||
99 | @@ -501,7 +501,7 @@ int main() | ||
100 | } | ||
101 | _EOF_ | ||
102 | # compile it | ||
103 | -$CC ${CFLAGS} ${CFLAGSR} -o conftest conftest.c >/dev/null 2>/dev/null | ||
104 | +$CC ${CFLAGS} ${CFLAGSR} $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null | ||
105 | if [ $? -ne 0 ]; then | ||
106 | echo "-- no MBCS support" | ||
107 | CFLAGSR="${CFLAGSR} -DNO_MBCS" | ||
108 | @@ -515,7 +515,7 @@ else | ||
109 | do | ||
110 | echo Check for MBCS $func | ||
111 | echo "int main() { $func(); return 0; }" > conftest.c | ||
112 | - $CC $BFLAG -o conftest conftest.c >/dev/null 2>/dev/null | ||
113 | + $CC $BFLAG $LDFLAGS -o conftest conftest.c >/dev/null 2>/dev/null | ||
114 | [ $? -eq 0 ] && CFLAGSR="${CFLAGSR} -D`echo $func | tr '[a-z]' '[A-Z]'`=$func" | ||
115 | done | ||
116 | fi | ||
117 | @@ -557,7 +557,7 @@ elif [ -f /xenix ]; then | ||
118 | elif uname -X >/dev/null 2>/dev/null; then | ||
119 | # SCO shared library check | ||
120 | echo "int main() { return 0;}" > conftest.c | ||
121 | - $CC -o conftest conftest.c -lc_s -nointl >/dev/null 2> /dev/null | ||
122 | + $CC $CFLAGS $LDFLAGS -o conftest conftest.c -lc_s -nointl >/dev/null 2> /dev/null | ||
123 | [ $? -eq 0 ] && LFLAGS2="-lc_s -nointl" | ||
124 | else | ||
125 | SYSTEM=`uname -s 2>/dev/null` || SYSTEM="unknown" | ||
126 | @@ -565,7 +565,7 @@ else | ||
127 | case $SYSTEM in | ||
128 | OSF1|ULTRIX) | ||
129 | echo Check for -Olimit option | ||
130 | - $CC ${CFLAGS} -Olimit 1000 -o conftest conftest.c >/dev/null 2>/dev/null | ||
131 | + $CC ${CFLAGS} ${LDFLAGS} -Olimit 1000 -o conftest conftest.c >/dev/null 2>/dev/null | ||
132 | [ $? -eq 0 ] && CFLAGSR="${CFLAGSR} -Olimit 1000" | ||
133 | ;; | ||
134 | ### HP-UX) | ||
135 | -- | ||
136 | 2.35.1 | ||
137 | |||
diff --git a/meta/recipes-extended/unzip/unzip_6.0.bb b/meta/recipes-extended/unzip/unzip_6.0.bb index 4720fddf48..af94a39195 100644 --- a/meta/recipes-extended/unzip/unzip_6.0.bb +++ b/meta/recipes-extended/unzip/unzip_6.0.bb | |||
@@ -27,6 +27,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/infozip/UnZip%206.x%20%28latest%29/UnZip%206.0/ | |||
27 | file://CVE-2019-13232_p2.patch \ | 27 | file://CVE-2019-13232_p2.patch \ |
28 | file://CVE-2019-13232_p3.patch \ | 28 | file://CVE-2019-13232_p3.patch \ |
29 | file://unzip_optimization.patch \ | 29 | file://unzip_optimization.patch \ |
30 | file://0001-configure-Pass-LDFLAGS-to-tests-doing-link-step.patch \ | ||
30 | " | 31 | " |
31 | UPSTREAM_VERSION_UNKNOWN = "1" | 32 | UPSTREAM_VERSION_UNKNOWN = "1" |
32 | 33 | ||