summaryrefslogtreecommitdiffstats
path: root/meta/classes/sanity.bbclass
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2017-06-28 15:50:45 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-07-06 14:38:13 +0100
commit43ff2881f198873ffe3700c4e1025cedfa494eb6 (patch)
treecf603925f9018d9f33712eb7b9e83780930b0821 /meta/classes/sanity.bbclass
parent0efe636e397be65aa77edbd0eedf1191afe271ff (diff)
downloadpoky-43ff2881f198873ffe3700c4e1025cedfa494eb6.tar.gz
insane: remove obsolete gcc 4.5 check
As gcc 4.5 is very old now (released in 2010, gcc 4.6 released in 2011) this check can be removed now. (From OE-Core rev: 78ea1af6bc5d314781be4a3c2d28347312238115) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/sanity.bbclass')
-rw-r--r--meta/classes/sanity.bbclass50
1 files changed, 1 insertions, 49 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index ea5f215ad3..f629d2046d 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -448,45 +448,6 @@ def check_sanity_validmachine(sanity_data):
448 448
449 return messages 449 return messages
450 450
451# Checks if necessary to add option march to host gcc
452def check_gcc_march(sanity_data):
453 result = True
454 message = ""
455
456 # Check if -march not in BUILD_CFLAGS
457 if sanity_data.getVar("BUILD_CFLAGS").find("-march") < 0:
458 result = False
459
460 # Construct a test file
461 f = open("gcc_test.c", "w")
462 f.write("int main (){ volatile int atomic = 2; __sync_bool_compare_and_swap (&atomic, 2, 3); return 0; }\n")
463 f.close()
464
465 # Check if GCC could work without march
466 if not result:
467 status,res = oe.utils.getstatusoutput(sanity_data.expand("${BUILD_CC} gcc_test.c -o gcc_test"))
468 if status == 0:
469 result = True;
470
471 if not result:
472 status,res = oe.utils.getstatusoutput(sanity_data.expand("${BUILD_CC} -march=native gcc_test.c -o gcc_test"))
473 if status == 0:
474 message = "BUILD_CFLAGS_append = \" -march=native\""
475 result = True;
476
477 if not result:
478 build_arch = sanity_data.getVar('BUILD_ARCH')
479 status,res = oe.utils.getstatusoutput(sanity_data.expand("${BUILD_CC} -march=%s gcc_test.c -o gcc_test" % build_arch))
480 if status == 0:
481 message = "BUILD_CFLAGS_append = \" -march=%s\"" % build_arch
482 result = True;
483
484 os.remove("gcc_test.c")
485 if os.path.exists("gcc_test"):
486 os.remove("gcc_test")
487
488 return (result, message)
489
490# Unpatched versions of make 3.82 are known to be broken. See GNU Savannah Bug 30612. 451# Unpatched versions of make 3.82 are known to be broken. See GNU Savannah Bug 30612.
491# Use a modified reproducer from http://savannah.gnu.org/bugs/?30612 to validate. 452# Use a modified reproducer from http://savannah.gnu.org/bugs/?30612 to validate.
492def check_make_version(sanity_data): 453def check_make_version(sanity_data):
@@ -612,7 +573,7 @@ def check_sanity_sstate_dir_change(sstate_dir, data):
612 except IndexError: 573 except IndexError:
613 pass 574 pass
614 return testmsg 575 return testmsg
615 576
616def check_sanity_version_change(status, d): 577def check_sanity_version_change(status, d):
617 # Sanity checks to be done when SANITY_VERSION or NATIVELSBSTRING changes 578 # Sanity checks to be done when SANITY_VERSION or NATIVELSBSTRING changes
618 # In other words, these tests run once in a given build directory and then 579 # In other words, these tests run once in a given build directory and then
@@ -657,15 +618,6 @@ def check_sanity_version_change(status, d):
657 if "diffstat-native" not in assume_provided: 618 if "diffstat-native" not in assume_provided:
658 status.addresult('Please use ASSUME_PROVIDED +=, not ASSUME_PROVIDED = in your local.conf\n') 619 status.addresult('Please use ASSUME_PROVIDED +=, not ASSUME_PROVIDED = in your local.conf\n')
659 620
660 (result, message) = check_gcc_march(d)
661 if result and message:
662 status.addresult("Your gcc version is older than 4.5, please add the following param to local.conf\n \
663 %s\n" % message)
664 if not result:
665 status.addresult("Your gcc version is older than 4.5 or is not working properly. Please verify you can build")
666 status.addresult(" and link something that uses atomic operations, such as: \n")
667 status.addresult(" __sync_bool_compare_and_swap (&atomic, 2, 3);\n")
668
669 # Check that TMPDIR isn't on a filesystem with limited filename length (eg. eCryptFS) 621 # Check that TMPDIR isn't on a filesystem with limited filename length (eg. eCryptFS)
670 tmpdir = d.getVar('TMPDIR') 622 tmpdir = d.getVar('TMPDIR')
671 status.addresult(check_create_long_filename(tmpdir, "TMPDIR")) 623 status.addresult(check_create_long_filename(tmpdir, "TMPDIR"))