mirror of
https://git.yoctoproject.org/poky
synced 2026-04-04 23:02:22 +02:00
sanity.bbclass: Ensure we expand BUILD_PREFIX
This likely used to work when we expanded python functions and broke when we stopped. Since it defaults to "", it never caused an issue but is incorrect usage so fix it. (From OE-Core rev: bfb395fdea642b306f110b4b8f1046f1992c622c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -459,19 +459,19 @@ def check_gcc_march(sanity_data):
|
||||
|
||||
# Check if GCC could work without march
|
||||
if not result:
|
||||
status,res = oe.utils.getstatusoutput("${BUILD_PREFIX}gcc gcc_test.c -o gcc_test")
|
||||
status,res = oe.utils.getstatusoutput(sanity_data.expand("${BUILD_PREFIX}gcc gcc_test.c -o gcc_test"))
|
||||
if status == 0:
|
||||
result = True;
|
||||
|
||||
if not result:
|
||||
status,res = oe.utils.getstatusoutput("${BUILD_PREFIX}gcc -march=native gcc_test.c -o gcc_test")
|
||||
status,res = oe.utils.getstatusoutput(sanity_data.expand("${BUILD_PREFIX}gcc -march=native gcc_test.c -o gcc_test"))
|
||||
if status == 0:
|
||||
message = "BUILD_CFLAGS_append = \" -march=native\""
|
||||
result = True;
|
||||
|
||||
if not result:
|
||||
build_arch = sanity_data.getVar('BUILD_ARCH', True)
|
||||
status,res = oe.utils.getstatusoutput("${BUILD_PREFIX}gcc -march=%s gcc_test.c -o gcc_test" % build_arch)
|
||||
status,res = oe.utils.getstatusoutput(sanity_data.expand("${BUILD_PREFIX}gcc -march=%s gcc_test.c -o gcc_test" % build_arch))
|
||||
if status == 0:
|
||||
message = "BUILD_CFLAGS_append = \" -march=%s\"" % build_arch
|
||||
result = True;
|
||||
|
||||
Reference in New Issue
Block a user