[oe-commits] Enrico Scholz : ncurses: use linker scripts for libncurses(w)
git version control
git at git.openembedded.org
Thu Sep 9 09:47:09 UTC 2010
Module: openembedded.git
Branch: org.openembedded.dev
Commit: 10a92f252407e4487afbf44a330ba5b7b61b84b1
URL: http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=10a92f252407e4487afbf44a330ba5b7b61b84b1
Author: Enrico Scholz <enrico.scholz at sigma-chemnitz.de>
Date: Wed Sep 8 23:54:28 2010 +0200
ncurses: use linker scripts for libncurses(w)
Some software (e.g. util-linux-ng) assumes that symbols from -ltinfo
will be added when it is linked against -lncurses. This breaks when
linkerflags are containing --no-copy-dt-needed-entries which is the case
e.g. in Fedora 13+.
This patch replaces the libncurses.so symlink with a linkerscript which
adds -ltinfo. To do things in a consistant manner, the patch rewrites
most parts of 9e58422868a03eeafa72781477174850d1c5abe7.
NOTE: it might require a 'bitbake ncurses -c clean' to see an effect
because staging on updates does not change a symlink (libncurses.so) to a
regular file.
Signed-off-by: Enrico Scholz <enrico.scholz at sigma-chemnitz.de>
---
recipes/ncurses/ncurses-5.7/libtermcap.so | 1 -
recipes/ncurses/ncurses_5.7.bb | 21 ++++++++++++++++++---
2 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/recipes/ncurses/ncurses-5.7/libtermcap.so b/recipes/ncurses/ncurses-5.7/libtermcap.so
deleted file mode 100644
index f74f993..0000000
--- a/recipes/ncurses/ncurses-5.7/libtermcap.so
+++ /dev/null
@@ -1 +0,0 @@
-INPUT(-ltinfo)
diff --git a/recipes/ncurses/ncurses_5.7.bb b/recipes/ncurses/ncurses_5.7.bb
index f7aac33..7a52370 100644
--- a/recipes/ncurses/ncurses_5.7.bb
+++ b/recipes/ncurses/ncurses_5.7.bb
@@ -4,7 +4,7 @@ LICENSE = "MIT"
SECTION = "libs"
PATCHDATE = "20100501"
PKGV = "${PV}+${PATCHDATE}"
-PR = "r13"
+PR = "r13+1"
DEPENDS = "ncurses-native unifdef-native"
DEPENDS_virtclass-native = "unifdef-native"
@@ -17,7 +17,6 @@ SRC_URI = "${GNU_MIRROR}/ncurses/ncurses-${PV}.tar.gz;name=tarball \
ftp://invisible-island.net/ncurses/5.7/ncurses-5.7-${PATCHDATE}.patch.gz;name=p20100501 \
file://tic-hang.patch \
file://config.cache \
- file://libtermcap.so \
"
SRC_URI[tarball.md5sum] = "cce05daf61a64501ef6cd8da1f727ec6"
@@ -163,7 +162,23 @@ do_install() {
mv ${D}${bindir}/reset ${D}${bindir}/reset.${PN}
fi
- install -p -m 0644 ${WORKDIR}/libtermcap.so ${D}${libdir}/
+
+ # create linker scripts for libcurses.so and libncurses to
+ # link against -ltinfo when needed. Some builds might break
+ # else when '-Wl,--no-copy-dt-needed-entries' has been set in
+ # linker flags.
+ for i in libncurses libncursesw; do
+ f=${D}${libdir}/$i.so
+ test -h $f || continue
+ rm -f $f
+ echo '/* GNU ld script */' >$f
+ echo "INPUT($i.so.5 AS_NEEDED(-ltinfo))" >>$f
+ done
+
+ # create libtermcap.so linker script for backward compatibility
+ f=${D}${libdir}/libtermcap.so
+ echo '/* GNU ld script */' >$f
+ echo 'INPUT(AS_NEEDED(-ltinfo))' >>$f
}
python populate_packages_prepend () {
More information about the Openembedded-commits
mailing list