Over-riding insane LDFLAGS check

Elvis Dowson

       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:

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):

    import subprocess
    d = e.data

    l = d.createCopy()

    sysroot_cmd = "${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} -print-sysroot"
        toolchain_sysroot = bb.process.run(bb.data.expand(sysroot_cmd, l),
                                           env={"PATH": l.getVar('PATH', True)})[0].rstrip()
    except bb.process.CmdError as 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:
        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

Join yocto@lists.yoctoproject.org to automatically receive all group messages.