From 82c95d3ba9fb607980981dfb56e8bd9515609454 Mon Sep 17 00:00:00 2001 From: Philippe Coval Date: Mon, 29 Aug 2016 15:16:13 +0200 Subject: [PATCH] yocto: use LDFLAGS if defined in build environment Without this change, extra flags like "--hash-style=gnu" will be ignored and quality checks will fail. Reported message is: ERROR: iotivity-* do_package_qa: QA Issue: No GNU_HASH in the elf binary: '*/samples/opt/iotivity/examples/plugins/zigbee/iotivityandzigbeeserver' (...) ERROR: iotivity-* do_package_qa: QA run found fatal errors. Please consider fixing them. ERROR: iotivity-* do_package_qa: Function failed: do_package_qa (...) Summary: There were 8 ERROR messages shown, returning a non-zero exit code. Bug: https://lists.yoctoproject.org/pipermail/yocto/2016-August/031442.html Bug-AGL: https://jira.automotivelinux.org/browse/SPEC-158 Change-Id: Ifa240817c768df3a7d154d36b699de8ca0f0307a Signed-off-by: Philippe Coval Reviewed-on: https://gerrit.iotivity.org/gerrit/11073 Reviewed-by: Kishen Maloor Reviewed-by: Ziran Sun Reviewed-by: Dave Thaler Tested-by: Dave Thaler --- build_common/SConscript | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build_common/SConscript b/build_common/SConscript index f8085d4..59a063f 100644 --- a/build_common/SConscript +++ b/build_common/SConscript @@ -1,3 +1,4 @@ +# -*- mode: python; python-indent-offset: 4; indent-tabs-mode: nil -*- ## # This script includes generic build options: # release/debug, target os, target arch, cross toolchain, build environment etc @@ -368,6 +369,8 @@ if target_os == "yocto": env[tool] = os.path.join(path, os.environ[tool]) break env['CROSS_COMPILE'] = target_prefix[:len(target_prefix) - 1] + if os.environ['LDFLAGS'] != None: + env.AppendUnique(LINKFLAGS = Split(os.environ['LDFLAGS'])) except: print "ERROR in Yocto cross-toolchain environment" Exit(1) -- 2.7.4