[oe-issues] [Bug 2928] binutils-cross 2.18 fails to build on x86_64

bugzilla-daemon at tinman.treke.net bugzilla-daemon at tinman.treke.net
Tue Sep 11 03:59:29 UTC 2007


http://bugs.openembedded.org/show_bug.cgi?id=2928


Michael DeVico <mdevico at qualcomm.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mdevico at qualcomm.com




--- Comment #12 from Michael DeVico <mdevico at qualcomm.com>  2007-09-10 20:59:29 ---
(In reply to comment #11)
> Same issue here; the lib is initially in cross/lib64; tweaking the .inc file
> locally fixes this, but a generic, portatble solutions is needed.
> 

FYI: I experienced the same issue when building gcc-cross-4.1.2-r5 for x86_64 
as well. I had to change lib to lib64. Otherwise, it couldn't find libgcc_s.so
since it was only looking in lib and not lib64.

My gross hack is below. I create a variable called larch (Library architecture) 
and set it to 64 if the TARGET_ARCH == "x86_64". I then attach ${larch} 
onto dir. See below:

gcc-package-cross.inc

set_larch() {
       larch=""
       if [ "${TARGET_ARCH}" = "x86_64" ]; then
          larch=64
       fi
}

do_install () {
        set_larch
        oe_runmake 'DESTDIR=${D}' install

        # Move libgcc_s into /lib
        mkdir -p ${D}${target_base_libdir}
        if [ -f ${D}${target_base_libdir}/libgcc_s.so.? ]; then
                # Already in the right location
                :
        elif [ -f ${D}${prefix}/lib${larch}/libgcc_s.so.? ]; then
                mv -f ${D}${prefix}/lib${larch}/libgcc_s.so*
${D}${target_base_libdir}
        else
                mv -f ${D}${prefix}/*/lib${larch}/libgcc_s.so*
${D}${target_base_libdir}
        fi

        # Move libstdc++ and libg2c into libdir (resetting our prefix to /usr
        mkdir -p ${D}${target_libdir}
        mv -f ${D}${prefix}/*/lib${larch}/libstdc++.so* ${D}${target_libdir}
        if [ "${HAS_G2C}" = "yes" ]; then
          mv -f ${D}${prefix}/*/lib${larch}/libg2c.so* ${D}${target_libdir} ||
true
        fi
        if [ "${HAS_GFORTRAN}" = "yes" ]; then
          mv -f ${D}${prefix}/*/lib${larch}/libgfortran*.so*
${D}${target_libdir}
        fi


-- 
Configure bugmail: http://bugs.openembedded.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.




More information about the Openembedded-issues mailing list