| Submitter | Saul Wold |
|---|---|
| Date | Dec. 22, 2011, 7:55 a.m. |
| Message ID | <be1461e4a665328a3f97fb6e516cfce663b1c48d.1324540323.git.sgw@linux.intel.com> |
| Download | mbox | patch |
| Permalink | /patch/17421/ |
| State | New |
| Headers | show |
Comments
On Wed, 2011-12-21 at 23:55 -0800, Saul Wold wrote:
> +BUILD_LDFLAGS += "-Wl,-rpath,${base_libdir}"
Why is that required?
p.
On 12/22/2011 12:50 AM, Phil Blundell wrote: > On Wed, 2011-12-21 at 23:55 -0800, Saul Wold wrote: >> +BUILD_LDFLAGS += "-Wl,-rpath,${base_libdir}" > > Why is that required? It's actually needed only for the -native case, so that the tic command (and possibly others) can be run. I take it I should have done: BUILD_LDFLAGS_virtclass_native += instead? Scott
On 12/22/2011 08:12 AM, Scott Garman wrote: > On 12/22/2011 12:50 AM, Phil Blundell wrote: >> On Wed, 2011-12-21 at 23:55 -0800, Saul Wold wrote: >>> +BUILD_LDFLAGS += "-Wl,-rpath,${base_libdir}" >> >> Why is that required? > > It's actually needed only for the -native case, so that the tic command > (and possibly others) can be run. > > I take it I should have done: > > BUILD_LDFLAGS_virtclass_native += Having tested this, it actually doesn't work. Scott
On Thursday 22 December 2011 21:30:56 Scott Garman wrote: > On 12/22/2011 08:12 AM, Scott Garman wrote: > > On 12/22/2011 12:50 AM, Phil Blundell wrote: > >> On Wed, 2011-12-21 at 23:55 -0800, Saul Wold wrote: > >>> +BUILD_LDFLAGS += "-Wl,-rpath,${base_libdir}" > >> > >> Why is that required? > > > > It's actually needed only for the -native case, so that the tic command > > (and possibly others) can be run. > > > > I take it I should have done: > > > > BUILD_LDFLAGS_virtclass_native += > > Having tested this, it actually doesn't work. Were you doing virtclass_native or virtclass-native? If the former I think the latter is what you need. Cheers, Paul
On 12/23/2011 12:18 AM, Paul Eggleton wrote: > On Thursday 22 December 2011 21:30:56 Scott Garman wrote: >> On 12/22/2011 08:12 AM, Scott Garman wrote: >>> On 12/22/2011 12:50 AM, Phil Blundell wrote: >>>> On Wed, 2011-12-21 at 23:55 -0800, Saul Wold wrote: >>>>> +BUILD_LDFLAGS += "-Wl,-rpath,${base_libdir}" >>>> >>>> Why is that required? >>> >>> It's actually needed only for the -native case, so that the tic command >>> (and possibly others) can be run. >>> >>> I take it I should have done: >>> >>> BUILD_LDFLAGS_virtclass_native += >> >> Having tested this, it actually doesn't work. > > Were you doing virtclass_native or virtclass-native? If the former I think the > latter is what you need. Whoops, you're right. Scott
Patch
diff --git a/meta/recipes-core/ncurses/ncurses.inc b/meta/recipes-core/ncurses/ncurses.inc index 583dad7..8c55631 100644 --- a/meta/recipes-core/ncurses/ncurses.inc +++ b/meta/recipes-core/ncurses/ncurses.inc @@ -26,6 +26,8 @@ ENABLE_WIDEC ?= "true" # builds. BUILD_CPPFLAGS += "-D_GNU_SOURCE" +BUILD_LDFLAGS += "-Wl,-rpath,${base_libdir}" + # Helper function for do_configure to allow multiple configurations # $1 the directory to run configure in # $@ the arguments to pass to configure @@ -41,6 +43,7 @@ ncurses_configure() { --enable-hard-tabs \ --enable-xmc-glitch \ --enable-colorfgbg \ + --libdir=${base_libdir} \ --with-termpath='${sysconfdir}/termcap:${datadir}/misc/termcap' \ --with-terminfo-dirs='${sysconfdir}/terminfo:${datadir}/terminfo' \ --with-shared \ @@ -120,7 +123,6 @@ do_install() { ! ${ENABLE_WIDEC} || \ oe_runmake -C widec ${_install_opts} - cd narrowc # include some basic terminfo files @@ -155,28 +157,29 @@ do_install() { # 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 + f=${D}${base_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 - # Make sure that libcurses is linked so that it gets -ltinfo - # also, this should be addressed upstream really. - ln -sf libncurses.so ${D}${libdir}/libcurses.so + + # Make sure that libcurses is linked so that it gets -ltinfo + # also, this should be addressed upstream really. + ln -sf libncurses.so ${D}${base_libdir}/libcurses.so # create libtermcap.so linker script for backward compatibility - f=${D}${libdir}/libtermcap.so + f=${D}${base_libdir}/libtermcap.so echo '/* GNU ld script */' >$f echo 'INPUT(AS_NEEDED(-ltinfo))' >>$f - oe_multilib_header curses.h + oe_multilib_header curses.h } python populate_packages_prepend () { - libdir = bb.data.expand("${libdir}", d) + base_libdir = bb.data.expand("${base_libdir}", d) pnbase = bb.data.expand("${PN}-lib%s", d) - do_split_packages(d, libdir, '^lib(.*)\.so\..*', pnbase, 'ncurses %s library', prepend=True, extra_depends = '', allow_links=True) + do_split_packages(d, base_libdir, '^lib(.*)\.so\..*', pnbase, 'ncurses %s library', prepend=True, extra_depends = '', allow_links=True) } @@ -210,6 +213,10 @@ FILES_${PN} = "\ ${datadir}/tabset \ " +FILES_${PN}-dev += "\ + ${base_libdir}/*.so \ +" + # This keeps only tput/tset in ncurses # clear/reset are in already busybox FILES_${PN}-tools = "\ @@ -223,6 +230,7 @@ FILES_${PN}-tools = "\ ${bindir}/tack \ ${bindir}/tabs \ " + # 'reset' is a symlink to 'tset' which is in the 'ncurses' package RDEPENDS_${PN}-tools = "${PN}"