diff options
author | Joe Slater <joe.slater@windriver.com> | 2022-02-25 07:48:08 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-02-27 12:34:40 +0000 |
commit | 62644e48daf4a642adebd5c5cf6c1345ed58ac41 (patch) | |
tree | 81379125b0d71640cd26bebb3b236ba90e3a42c3 /meta | |
parent | f74327157c1c86778da28d3bdf0447cbcd98f354 (diff) | |
download | poky-62644e48daf4a642adebd5c5cf6c1345ed58ac41.tar.gz |
zip: modify when match.S is built
Use the correct $CPP to test if *.S are buildable,
but do not build match.S because it is not PIC code.
(From OE-Core rev: 58b16da805b774465f15c8bee59f8361a47ccd4e)
Signed-off-by: Joe Slater <joe.slater@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
3 files changed, 83 insertions, 0 deletions
diff --git a/meta/recipes-extended/zip/zip-3.0/0001-configure-use-correct-CPP.patch b/meta/recipes-extended/zip/zip-3.0/0001-configure-use-correct-CPP.patch new file mode 100644 index 0000000000..02253f968c --- /dev/null +++ b/meta/recipes-extended/zip/zip-3.0/0001-configure-use-correct-CPP.patch | |||
@@ -0,0 +1,47 @@ | |||
1 | From 7a2729ee7f5d9b9d4a0d9b83fe641a2ab03c4ee0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Joe Slater <joe.slater@windriver.com> | ||
3 | Date: Thu, 24 Feb 2022 17:36:59 -0800 | ||
4 | Subject: [PATCH 1/2] configure: use correct CPP | ||
5 | |||
6 | configure uses CPP to test that two assembler routines | ||
7 | can be built. Unfortunately, it will use /usr/bin/cpp | ||
8 | if it exists, invalidating the tests. We use the $CC | ||
9 | passed to configure. | ||
10 | |||
11 | Upstream-Status: Inappropriate [openembedded specific] | ||
12 | |||
13 | Signed-off-by: Joe Slater <joe.slater@windriver.com> | ||
14 | --- | ||
15 | unix/configure | 15 +++++++++------ | ||
16 | 1 file changed, 9 insertions(+), 6 deletions(-) | ||
17 | |||
18 | diff --git a/unix/configure b/unix/configure | ||
19 | index 73ba803..7e21070 100644 | ||
20 | --- a/unix/configure | ||
21 | +++ b/unix/configure | ||
22 | @@ -220,13 +220,16 @@ fi | ||
23 | echo Check for the C preprocessor | ||
24 | # on SVR4, cc -E does not produce correct assembler files. Need /lib/cpp. | ||
25 | CPP="${CC} -E" | ||
26 | + | ||
27 | +# We should not change CPP for yocto builds. | ||
28 | +# | ||
29 | # solaris as(1) needs -P, maybe others as well ? | ||
30 | -[ -f /usr/ccs/lib/cpp ] && CPP="/usr/ccs/lib/cpp -P" | ||
31 | -[ -f /usr/lib/cpp ] && CPP=/usr/lib/cpp | ||
32 | -[ -f /lib/cpp ] && CPP=/lib/cpp | ||
33 | -[ -f /usr/bin/cpp ] && CPP=/usr/bin/cpp | ||
34 | -[ -f /xenix ] && CPP="${CC} -E" | ||
35 | -[ -f /lynx.os ] && CPP="${CC} -E" | ||
36 | +# [ -f /usr/ccs/lib/cpp ] && CPP="/usr/ccs/lib/cpp -P" | ||
37 | +# [ -f /usr/lib/cpp ] && CPP=/usr/lib/cpp | ||
38 | +# [ -f /lib/cpp ] && CPP=/lib/cpp | ||
39 | +# [ -f /usr/bin/cpp ] && CPP=/usr/bin/cpp | ||
40 | +# [ -f /xenix ] && CPP="${CC} -E" | ||
41 | +# [ -f /lynx.os ] && CPP="${CC} -E" | ||
42 | |||
43 | echo "#include <stdio.h>" > conftest.c | ||
44 | $CPP conftest.c >/dev/null 2>/dev/null || CPP="${CC} -E" | ||
45 | -- | ||
46 | 2.24.1 | ||
47 | |||
diff --git a/meta/recipes-extended/zip/zip-3.0/0002-configure-support-PIC-code-build.patch b/meta/recipes-extended/zip/zip-3.0/0002-configure-support-PIC-code-build.patch new file mode 100644 index 0000000000..6e0879616a --- /dev/null +++ b/meta/recipes-extended/zip/zip-3.0/0002-configure-support-PIC-code-build.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | From b0492506d2c28581193906e9d260d4f0451e2c39 Mon Sep 17 00:00:00 2001 | ||
2 | From: Joe Slater <joe.slater@windriver.com> | ||
3 | Date: Thu, 24 Feb 2022 17:46:03 -0800 | ||
4 | Subject: [PATCH 2/2] configure: support PIC code build | ||
5 | |||
6 | Disable building match.S. The code requires | ||
7 | relocation in .text. | ||
8 | |||
9 | Upstream-Status: Inappropriate [openembedded specific] | ||
10 | |||
11 | Signed-off-by: Joe Slater <joe.slater@windriver.com> | ||
12 | --- | ||
13 | unix/configure | 5 +++-- | ||
14 | 1 file changed, 3 insertions(+), 2 deletions(-) | ||
15 | |||
16 | diff --git a/unix/configure b/unix/configure | ||
17 | index 7e21070..1bc698b 100644 | ||
18 | --- a/unix/configure | ||
19 | +++ b/unix/configure | ||
20 | @@ -242,8 +242,9 @@ if eval "$CPP match.S > _match.s 2>/dev/null"; then | ||
21 | if test ! -s _match.s || grep error < _match.s > /dev/null; then | ||
22 | : | ||
23 | elif eval "$CC -c _match.s >/dev/null 2>/dev/null" && [ -f _match.o ]; then | ||
24 | - CFLAGS="${CFLAGS} -DASMV" | ||
25 | - OBJA="match.o" | ||
26 | + # disable match.S for PIC code | ||
27 | + # CFLAGS="${CFLAGS} -DASMV" | ||
28 | + # OBJA="match.o" | ||
29 | echo "int foo() { return 0;}" > conftest.c | ||
30 | $CC -c conftest.c >/dev/null 2>/dev/null | ||
31 | echo Check if compiler generates underlines | ||
32 | -- | ||
33 | 2.24.1 | ||
34 | |||
diff --git a/meta/recipes-extended/zip/zip_3.0.bb b/meta/recipes-extended/zip/zip_3.0.bb index 3fea75125e..0547cd5c53 100644 --- a/meta/recipes-extended/zip/zip_3.0.bb +++ b/meta/recipes-extended/zip/zip_3.0.bb | |||
@@ -14,6 +14,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/infozip/Zip%203.x%20%28latest%29/3.0/zip30.tar. | |||
14 | file://fix-security-format.patch \ | 14 | file://fix-security-format.patch \ |
15 | file://10-remove-build-date.patch \ | 15 | file://10-remove-build-date.patch \ |
16 | file://zipnote-crashes-with-segfault.patch \ | 16 | file://zipnote-crashes-with-segfault.patch \ |
17 | file://0001-configure-use-correct-CPP.patch \ | ||
18 | file://0002-configure-support-PIC-code-build.patch \ | ||
17 | " | 19 | " |
18 | UPSTREAM_VERSION_UNKNOWN = "1" | 20 | UPSTREAM_VERSION_UNKNOWN = "1" |
19 | 21 | ||