summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/libtool
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2016-02-01 04:49:49 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-02 14:44:16 +0000
commit64089c6ae6dffb3e7777590943505aa7a19bb8db (patch)
tree2683dd054898ac7780e19cb58d34ef01201c8db2 /meta/recipes-devtools/libtool
parent457f4170def9f508be1b68657035e636ea1bee18 (diff)
downloadpoky-64089c6ae6dffb3e7777590943505aa7a19bb8db.tar.gz
libtool-cross: Unset pre|post dep objects
predep_objects and postdep_objects are specifying the duplicate objects which are better computed by gcc/g++ driver, since we want to generate PIE, PIC and non-PIC combinations, let gcc decide on this, since it knows best about linker options to use in each of these situations. When we defer the linker options to driver, we also need to remove -nostdlib from linker commandline options. Remove duplicate directory creation for ${D}${bindir_crossscripts}/ This fixes a frequent problem we see during -fpie links e.g. | /home/ubuntu/work/oe/openembedded-core/build/tmp-glibc/sysroots/qemux86-64/usr/include/c++/5.3.0/iostream:74: undefined reference to `__dso_handle' | /home/ubuntu/work/oe/openembedded-core/build/tmp-glibc/sysroots/x86_64-linux/usr/libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/5.3.0/ld: .libs/cxx_channel.o: relocation R_X86_64_PC32 against undefined hidden symbol `__dso_handle' can not be used when making a shared object | /home/ubuntu/work/oe/openembedded-core/build/tmp-glibc/sysroots/x86_64-linux/usr/libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/5.3.0/ld: final link failed: Bad value After this change libtool gets changed as below old_archive_from_expsyms_cmds="" # Commands used to build a shared archive. -archive_cmds="\$CC \$pic_flag -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \$wl-soname \$wl\$soname -o \$lib" -archive_expsym_cmds="\$CC \$pic_flag -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \$wl-soname \$wl\$soname \$wl-retain-symbols-file \$wl\$export_symbols -o \$lib" +archive_cmds="\$CC \$pic_flag -shared \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \$wl-soname \$wl\$soname -o \$lib" +archive_expsym_cmds="\$CC \$pic_flag -shared \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \$wl-soname \$wl\$soname \$wl-retain-symbols-file \$wl\$export_symbols -o \$lib" # Commands used to build a loadable module if different from building # a shared archive. @@ -11908,8 +11908,8 @@ # Dependencies to place before and after the objects being linked to # create a shared library. -predep_objects="/home/ubuntu/work/oe/openembedded-core/build/tmp-glibc/sysroots/qemux86-64/usr/lib/../lib/Scrt1.o /home/ubuntu/work/oe/openembedded-core/build/tmp-glibc/sysroots/qemux86-64/usr/lib/../lib/crti.o /home/ubuntu/work/oe/openembedded-core/build/tmp-glibc/sysroots/qemux86-64/usr/lib/../lib/x86_64-oe-linux/5.3.0/crtbeginS.o" -postdep_objects="/home/ubuntu/work/oe/openembedded-core/build/tmp-glibc/sysroots/qemux86-64/usr/lib/../lib/x86_64-oe-linux/5.3.0/crtendS.o /home/ubuntu/work/oe/openembedded-core/build/tmp-glibc/sysroots/qemux86-64/usr/lib/../lib/crtn.o" +predep_objects="" +postdep_objects="" predeps="" postdeps="-lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc" (From OE-Core rev: e1b45cb8e15458dde21f5e86ea1cbb619fb5c4cf) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/libtool')
-rw-r--r--meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb6
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb b/meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb
index 847880270d..0204d347ba 100644
--- a/meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb
+++ b/meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb
@@ -16,7 +16,11 @@ do_configure_prepend () {
16do_install () { 16do_install () {
17 install -d ${D}${bindir_crossscripts}/ 17 install -d ${D}${bindir_crossscripts}/
18 install -m 0755 ${HOST_SYS}-libtool ${D}${bindir_crossscripts}/${HOST_SYS}-libtool 18 install -m 0755 ${HOST_SYS}-libtool ${D}${bindir_crossscripts}/${HOST_SYS}-libtool
19 install -d ${D}${bindir_crossscripts}/ 19 sed -e 's@^\(predep_objects="\).*@\1"@' \
20 -e 's@^\(postdep_objects="\).*@\1"@' \
21 -i ${D}${bindir_crossscripts}/${HOST_SYS}-libtool
22 sed -i '/^archive_cmds=/s/\-nostdlib//g' ${D}${bindir_crossscripts}/${HOST_SYS}-libtool
23 sed -i '/^archive_expsym_cmds=/s/\-nostdlib//g' ${D}${bindir_crossscripts}/${HOST_SYS}-libtool
20 GREP='/bin/grep' SED='sed' ${S}/build-aux/inline-source libtoolize > ${D}${bindir_crossscripts}/libtoolize 24 GREP='/bin/grep' SED='sed' ${S}/build-aux/inline-source libtoolize > ${D}${bindir_crossscripts}/libtoolize
21 chmod 0755 ${D}${bindir_crossscripts}/libtoolize 25 chmod 0755 ${D}${bindir_crossscripts}/libtoolize
22 install -d ${D}${target_datadir}/libtool/build-aux/ 26 install -d ${D}${target_datadir}/libtool/build-aux/