summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-06-04 23:47:55 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-06-18 16:34:40 +0100
commit068aad9f1d598af8953e9881c306883012e2bfa6 (patch)
tree8d114821af6539f872f2b47c847e6a3250e5fabc /meta/classes
parentd87cbd6f16c2288135e7e3d7a47a2d13ef088bee (diff)
downloadpoky-068aad9f1d598af8953e9881c306883012e2bfa6.tar.gz
sanity: Switch to make 4.0 as a minimum version
We can't build glibc without make 4.0 and we don't work on older distros with older versions of make without buildtools tarball so increase the minimum version to 4.0. (From OE-Core rev: 4b694ded86877cce06af65a0f542027d7408c111) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit e9a449aeec72a698206323c3471c9268f949b1ae) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/sanity.bbclass30
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.
437def check_make_version(sanity_data): 436def 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()