[yocto] Over-riding insane LDFLAGS check

Elvis Dowson elvis.dowson at gmail.com
Sun Aug 12 04:45:36 PDT 2012


Hi,
       Is there anyway I can over-ride the insane LDFLAGS check for GNU_HASH? 

gcc-4.5.1 doesn't generate the hashes, and at the moment, I've had to temporarily hack by getting the check to return, as follows:

 meta/classes/insane.bbclass |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 556a176..0ec3292 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -392,6 +392,8 @@ def package_qa_hash_style(path, name, d, elf, messages):
     Check if the binary has the right hash style...
     """
 
+    return
+
     if not elf:
         return
 
-- 
1.7.9.5

The meta-sourcery/conf/distro/include/tcmode-external-sourcery.inc got around this issue by the following piece of code, but I don't know where or which recipe to hook this into.

ERROR_QA[type] ?= "list"
python toolchain_metadata_setup () {
    if not isinstance(e, bb.event.ConfigParsed):
        return

    import subprocess
    d = e.data

    l = d.createCopy()
    l.finalize()
    oe_import(l)

    sysroot_cmd = "${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} -print-sysroot"
    try:
        toolchain_sysroot = bb.process.run(bb.data.expand(sysroot_cmd, l),
                                           stderr=subprocess.PIPE,
                                           env={"PATH": l.getVar('PATH', True)})[0].rstrip()
    except bb.process.CmdError as exc:
        bb.fatal(str(exc))

    d.setVar('EXTERNAL_TOOLCHAIN_SYSROOT', toolchain_sysroot)

    if os.path.exists(bb.data.expand('${EXTERNAL_TOOLCHAIN}/bin/gcc', l)):
        d.setVar('TOOLCHAIN_PATH_ADD', '')

    # The external toolchain may not have been built with the yocto preferred
    # gnu hash setting, so ensure that the corresponding sanity check is a
    # warning, not an error.
    error_qa = oe.data.typed_value('ERROR_QA', l)
    if 'ldflags' in error_qa:
        error_qa.remove('ldflags')
        d.setVar('ERROR_QA', ' '.join(error_qa))
        d.appendVar('WARN_QA', ' ldflags')
}
addhandler toolchain_metadata_setup


I was wondering if there was a more elegant way of doing this.

Best regards,

Elvis Dowson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20120812/7802516e/attachment.html>


More information about the yocto mailing list