Code Monkey home page Code Monkey logo

Comments (7)

kergoth avatar kergoth commented on June 18, 2024

Nicely spotted, thanks for the report. I'll take a look. I tried to make use of existing .inc's in the core where possible, but the external toolchain sysroot extraction requires more explicit specification than the core recipes do. I'm assuming this is against current master?

from meta-sourcery.

lumag avatar lumag commented on June 18, 2024

It's against release/2014.12. Using that branch for now. I'll recheck with the master branch tomorrow.
I have a patch/workaround locally, but I'd like to give it a test before posting.

from meta-sourcery.

lumag avatar lumag commented on June 18, 2024

Created SB-4841, if that matters

from meta-sourcery.

kergoth avatar kergoth commented on June 18, 2024

Okay, that's good to know. The recipes were completely reworked in master to use separate recipes for each upstream recipe (e.g. libgcc-external is its own recipe) with an entirely different mechanism for the file extraction from the external toolchain sysroot. Regardless, fixing this should just be a matter of adding a few entries to the FILES variable in question in the external-sourcery-toolchain recipe.

from meta-sourcery.

lumag avatar lumag commented on June 18, 2024

Good to know. This should give us more flexibility. Unfortuntately ATM I'm stuck with release 2014.12.

Regarding FILES_* variables. Not quite. To be as compatible as possible I'm also installing files to a gcc-specific folders, not to /usr/lib. On the other hand just putting everything to /usr/lib should also work. I'll give it a try.

from meta-sourcery.

lumag avatar lumag commented on June 18, 2024

@kergoth Installing these files to /usr/lib has serious drawback --- they will go now to libc6-dev package instead of libgcc-dev. I'll do few more tests.

from meta-sourcery.

lumag avatar lumag commented on June 18, 2024

@kergoth just FYI. I ended up with the following snippet:

def sourcery_get_libroot(d):
    import subprocess
    libroot_cmd = "${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} -print-file-name=crtbegin.o"
    try:
        toolchain_libroot = bb.process.run(bb.data.expand(libroot_cmd, d),
                                           stderr=subprocess.PIPE,
                                           env={"PATH": d.getVar('PATH', True)})[0].rstrip()[:-11]
    except bb.process.CmdError as exc:
        bb.fatal(str(exc))
    else:
        return toolchain_libroot

EXTERNAL_TOOLCHAIN_LIBROOT = "${@sourcery_get_libroot(d)}"

do_install_append() {
        install -d ${D}/usr/lib/${TARGET_SYS}/${CSL_VER_GCC}
        for file in crtbegin.o crtbeginS.o crtendT.o crtend.o crtendS.o libgcc.a libgcc_eh.a ; do
                if [ -e "${EXTERNAL_TOOLCHAIN_LIBROOT}"/$file ]; then
                        install -m 0644 "${EXTERNAL_TOOLCHAIN_LIBROOT}"/$file ${D}/usr/lib/${TARGET_SYS}/${CSL_VER_GCC}
                fi
        done
}

FILES_libgcc-dev += "${libdir}/${TARGET_SYS}/${CSL_VER_GCC}"
INSANE_SKIP_libgcc-dev = "staticdev"

pkg_postinst_libgcc-dev () {
        for file in crtbegin.o crtbeginS.o crtendT.o crtend.o crtendS.o libgcc.a libgcc_eh.a ; do
                ln -s /usr/lib/${TARGET_SYS}/${CSL_VER_GCC}/$file ${libdir}
        done
}

from meta-sourcery.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.