summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Rossi <nathan@nathanrossi.com>2020-12-15 08:32:00 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-12-18 22:52:24 +0000
commit50f4e82e4e79f115122f34762150bf1c754e3cf4 (patch)
treec7163e972b9a3890b7735e4b6fa58f41ba5870d9
parent38ff3dd50215f5004c9453c00df7bf37c9773a83 (diff)
downloadpoky-50f4e82e4e79f115122f34762150bf1c754e3cf4.tar.gz
ncurses: Prevent LDFLAGS being emitted in .pc files
By default ncurses includes the values of LDFLAGS in its output pkgconfig .pc files. This causes issues because OE includes options that are specific to either the build host, or build configuration. These options are not expected to be embedded in the pkgconfig output that is installed. Specifically this change resolves issues with uninative, where uninative includes '-Wl,--dynamic-linker=' in LDFLAGS in order to force the building and execution of native binaries against the dynamic linker provided by uninative. This path is specific to TMPDIR at the time of build, such that the installed files (and the associated sstate) have this path. This prevents the sstate from being portable across build directories/hosts. (From OE-Core rev: ef960d14bd9cecb9a3b50994636fbd455f06104a) Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-core/ncurses/files/0003-gen-pkgconfig.in-Do-not-include-LDFLAGS-in-generated.patch29
-rw-r--r--meta/recipes-core/ncurses/ncurses_6.2.bb1
2 files changed, 30 insertions, 0 deletions
diff --git a/meta/recipes-core/ncurses/files/0003-gen-pkgconfig.in-Do-not-include-LDFLAGS-in-generated.patch b/meta/recipes-core/ncurses/files/0003-gen-pkgconfig.in-Do-not-include-LDFLAGS-in-generated.patch
new file mode 100644
index 0000000000..1eb17767a0
--- /dev/null
+++ b/meta/recipes-core/ncurses/files/0003-gen-pkgconfig.in-Do-not-include-LDFLAGS-in-generated.patch
@@ -0,0 +1,29 @@
1From 3b3e87934bb6d8511261d7c3d6e39b4f71849272 Mon Sep 17 00:00:00 2001
2From: Nathan Rossi <nathan@nathanrossi.com>
3Date: Mon, 14 Dec 2020 13:39:02 +1000
4Subject: [PATCH] gen-pkgconfig.in: Do not include LDFLAGS in generated pc
5 files
6
7Including the LDFLAGS in the pkgconfig output is problematic as OE
8includes build host specific paths and options (e.g. uninative and
9'-Wl,--dynamic-linker=').
10
11Upstream-Status: Inappropriate [OE Specific]
12Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
13---
14 misc/gen-pkgconfig.in | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/misc/gen-pkgconfig.in b/misc/gen-pkgconfig.in
18index 8f00b824b9..009d215663 100644
19--- a/misc/gen-pkgconfig.in
20+++ b/misc/gen-pkgconfig.in
21@@ -80,7 +80,7 @@ if [ "$includedir" != "/usr/include" ]; then
22 fi
23
24 lib_flags=
25-for opt in -L$libdir @LDFLAGS@ @EXTRA_LDFLAGS@ @LIBS@
26+for opt in -L$libdir @LIBS@
27 do
28 case $opt in
29 -l*) # LIBS is handled specially below
diff --git a/meta/recipes-core/ncurses/ncurses_6.2.bb b/meta/recipes-core/ncurses/ncurses_6.2.bb
index f3c84c2877..e7d7396a20 100644
--- a/meta/recipes-core/ncurses/ncurses_6.2.bb
+++ b/meta/recipes-core/ncurses/ncurses_6.2.bb
@@ -2,6 +2,7 @@ require ncurses.inc
2 2
3SRC_URI += "file://0001-tic-hang.patch \ 3SRC_URI += "file://0001-tic-hang.patch \
4 file://0002-configure-reproducible.patch \ 4 file://0002-configure-reproducible.patch \
5 file://0003-gen-pkgconfig.in-Do-not-include-LDFLAGS-in-generated.patch \
5 " 6 "
6# commit id corresponds to the revision in package version 7# commit id corresponds to the revision in package version
7SRCREV = "a669013cd5e9d6434e5301348ea51baf306c93c4" 8SRCREV = "a669013cd5e9d6434e5301348ea51baf306c93c4"