aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/ncurses
diff options
context:
space:
mode:
authorEnrico Scholz <enrico.scholz@sigma-chemnitz.de>2010-09-08 23:54:28 +0200
committerEnrico Scholz <enrico.scholz@sigma-chemnitz.de>2010-09-09 11:43:54 +0200
commit10a92f252407e4487afbf44a330ba5b7b61b84b1 (patch)
treecabf23496d21c842f7ea3c5a39461e87f01efc75 /recipes/ncurses
parent52d4cb12901247f501d1392b2095c81348c6858c (diff)
downloadopenembedded-10a92f252407e4487afbf44a330ba5b7b61b84b1.tar.gz
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@sigma-chemnitz.de>
Diffstat (limited to 'recipes/ncurses')
-rw-r--r--recipes/ncurses/ncurses-5.7/libtermcap.so1
-rw-r--r--recipes/ncurses/ncurses_5.7.bb21
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 f74f99311d..0000000000
--- 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 f7aac33eb5..7a523701f0 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 () {