diff options
-rw-r--r-- | meta/classes/sanity.bbclass | 30 |
1 files changed, 3 insertions, 27 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass index b416918013..eb0ca05804 100644 --- a/meta/classes/sanity.bbclass +++ b/meta/classes/sanity.bbclass | |||
@@ -432,8 +432,7 @@ def check_patch_version(sanity_data): | |||
432 | except subprocess.CalledProcessError as e: | 432 | except subprocess.CalledProcessError as e: |
433 | return "Unable to execute patch --version, exit code %d:\n%s\n" % (e.returncode, e.output) | 433 | return "Unable to execute patch --version, exit code %d:\n%s\n" % (e.returncode, e.output) |
434 | 434 | ||
435 | # Unpatched versions of make 3.82 are known to be broken. See GNU Savannah Bug 30612. | 435 | # Glibc needs make 4.0 or later, we may as well match at this point |
436 | # Use a modified reproducer from http://savannah.gnu.org/bugs/?30612 to validate. | ||
437 | def check_make_version(sanity_data): | 436 | def check_make_version(sanity_data): |
438 | import subprocess | 437 | import subprocess |
439 | 438 | ||
@@ -442,31 +441,8 @@ def check_make_version(sanity_data): | |||
442 | except subprocess.CalledProcessError as e: | 441 | except subprocess.CalledProcessError as e: |
443 | return "Unable to execute make --version, exit code %d\n%s\n" % (e.returncode, e.output) | 442 | return "Unable to execute make --version, exit code %d\n%s\n" % (e.returncode, e.output) |
444 | version = result.split()[2] | 443 | version = result.split()[2] |
445 | if bb.utils.vercmp_string_op(version, "3.82", "=="): | 444 | if bb.utils.vercmp_string_op(version, "4.0", "<"): |
446 | # Construct a test file | 445 | return "Please install a make version of 4.0 or later.\n" |
447 | f = open("makefile_test", "w") | ||
448 | f.write("makefile_test.a: makefile_test_a.c makefile_test_b.c makefile_test.a( makefile_test_a.c makefile_test_b.c)\n") | ||
449 | f.write("\n") | ||
450 | f.write("makefile_test_a.c:\n") | ||
451 | f.write(" touch $@\n") | ||
452 | f.write("\n") | ||
453 | f.write("makefile_test_b.c:\n") | ||
454 | f.write(" touch $@\n") | ||
455 | f.close() | ||
456 | |||
457 | # Check if make 3.82 has been patched | ||
458 | try: | ||
459 | subprocess.check_call(['make', '-f', 'makefile_test']) | ||
460 | except subprocess.CalledProcessError as e: | ||
461 | return "Your version of make 3.82 is broken. Please revert to 3.81 or install a patched version.\n" | ||
462 | finally: | ||
463 | os.remove("makefile_test") | ||
464 | if os.path.exists("makefile_test_a.c"): | ||
465 | os.remove("makefile_test_a.c") | ||
466 | if os.path.exists("makefile_test_b.c"): | ||
467 | os.remove("makefile_test_b.c") | ||
468 | if os.path.exists("makefile_test.a"): | ||
469 | os.remove("makefile_test.a") | ||
470 | 446 | ||
471 | if bb.utils.vercmp_string_op(version, "4.2.1", "=="): | 447 | if bb.utils.vercmp_string_op(version, "4.2.1", "=="): |
472 | distro = oe.lsb.distro_identifier() | 448 | distro = oe.lsb.distro_identifier() |