diff options
author | Joe Slater <joe.slater@windriver.com> | 2022-03-18 16:38:07 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-04-03 20:49:03 +0100 |
commit | 3f537fefb64cb88e16b1fe64bef6f6d967a3fc10 (patch) | |
tree | da201f8266bb4e6dd86b4346fb84e212cf4adfe4 /meta/recipes-extended/zip/zip-3.0/0002-configure-support-PIC-code-build.patch | |
parent | eb28aafdc9b5872d4f3a06fd611583a1b4252d84 (diff) | |
download | poky-3f537fefb64cb88e16b1fe64bef6f6d967a3fc10.tar.gz |
zip: modify when match.S is built
Avoid generating non-PIC code.
The patches are taken from master 58b16da805... but we cannot
cherry-pick because zip_3.0.bb context is different.
(From OE-Core rev: 0a5d1b1c617a152559c18ada394827de0db6031a)
Signed-off-by: Joe Slater <joe.slater@windriver.com>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/zip/zip-3.0/0002-configure-support-PIC-code-build.patch')
-rw-r--r-- | meta/recipes-extended/zip/zip-3.0/0002-configure-support-PIC-code-build.patch | 34 |
1 files changed, 34 insertions, 0 deletions
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 | |||