All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] sanity: Switch to make 4.0 as a minimum version
@ 2022-06-05 12:25 Richard Purdie
  2022-06-05 12:25 ` [PATCH 2/4] perl: Add dependency on make-native to avoid race issues Richard Purdie
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Richard Purdie @ 2022-06-05 12:25 UTC (permalink / raw)
  To: openembedded-core

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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/classes/sanity.bbclass | 30 +++---------------------------
 1 file changed, 3 insertions(+), 27 deletions(-)

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index b416918013c..eb0ca058049 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -432,8 +432,7 @@ def check_patch_version(sanity_data):
     except subprocess.CalledProcessError as e:
         return "Unable to execute patch --version, exit code %d:\n%s\n" % (e.returncode, e.output)
 
-# Unpatched versions of make 3.82 are known to be broken.  See GNU Savannah Bug 30612.
-# Use a modified reproducer from http://savannah.gnu.org/bugs/?30612 to validate.
+# Glibc needs make 4.0 or later, we may as well match at this point
 def check_make_version(sanity_data):
     import subprocess
 
@@ -442,31 +441,8 @@ def check_make_version(sanity_data):
     except subprocess.CalledProcessError as e:
         return "Unable to execute make --version, exit code %d\n%s\n" % (e.returncode, e.output)
     version = result.split()[2]
-    if bb.utils.vercmp_string_op(version, "3.82", "=="):
-        # Construct a test file
-        f = open("makefile_test", "w")
-        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")
-        f.write("\n")
-        f.write("makefile_test_a.c:\n")
-        f.write("	touch $@\n")
-        f.write("\n")
-        f.write("makefile_test_b.c:\n")
-        f.write("	touch $@\n")
-        f.close()
-
-        # Check if make 3.82 has been patched
-        try:
-            subprocess.check_call(['make', '-f', 'makefile_test'])
-        except subprocess.CalledProcessError as e:
-            return "Your version of make 3.82 is broken. Please revert to 3.81 or install a patched version.\n"
-        finally:
-            os.remove("makefile_test")
-            if os.path.exists("makefile_test_a.c"):
-                os.remove("makefile_test_a.c")
-            if os.path.exists("makefile_test_b.c"):
-                os.remove("makefile_test_b.c")
-            if os.path.exists("makefile_test.a"):
-                os.remove("makefile_test.a")
+    if bb.utils.vercmp_string_op(version, "4.0", "<"):
+        return "Please install a make version of 4.0 or later.\n"
 
     if bb.utils.vercmp_string_op(version, "4.2.1", "=="):
         distro = oe.lsb.distro_identifier()
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/4] perl: Add dependency on make-native to avoid race issues
  2022-06-05 12:25 [PATCH 1/4] sanity: Switch to make 4.0 as a minimum version Richard Purdie
@ 2022-06-05 12:25 ` Richard Purdie
  2022-06-05 12:25 ` [PATCH 3/4] glibc: Drop make-native dependency Richard Purdie
  2022-06-05 12:25 ` [PATCH 4/4] populate_sdk_ext: Fix second bb_unihashes reference Richard Purdie
  2 siblings, 0 replies; 4+ messages in thread
From: Richard Purdie @ 2022-06-05 12:25 UTC (permalink / raw)
  To: openembedded-core

Make 4.1 has race issues with double colon usage in makefiles which are common
in MakeMaker generated code in perl. Add a dependency on make-native to avoid
this as it is relaitvely low overhead.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/recipes-devtools/perl/perl_5.34.1.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-devtools/perl/perl_5.34.1.bb b/meta/recipes-devtools/perl/perl_5.34.1.bb
index 4b9d2e2c501..42bcb8b1bc6 100644
--- a/meta/recipes-devtools/perl/perl_5.34.1.bb
+++ b/meta/recipes-devtools/perl/perl_5.34.1.bb
@@ -33,6 +33,8 @@ S = "${WORKDIR}/perl-${PV}"
 inherit upstream-version-is-even update-alternatives
 
 DEPENDS += "perlcross-native zlib virtual/crypt"
+# make 4.1 has race issues with the double-colon usage of MakeMaker, see #14096
+DEPENDS += "make-native"
 
 PERL_LIB_VER = "${@'.'.join(d.getVar('PV').split('.')[0:2])}.0"
 
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/4] glibc: Drop make-native dependency
  2022-06-05 12:25 [PATCH 1/4] sanity: Switch to make 4.0 as a minimum version Richard Purdie
  2022-06-05 12:25 ` [PATCH 2/4] perl: Add dependency on make-native to avoid race issues Richard Purdie
@ 2022-06-05 12:25 ` Richard Purdie
  2022-06-05 12:25 ` [PATCH 4/4] populate_sdk_ext: Fix second bb_unihashes reference Richard Purdie
  2 siblings, 0 replies; 4+ messages in thread
From: Richard Purdie @ 2022-06-05 12:25 UTC (permalink / raw)
  To: openembedded-core

Now that our make version is a minmum of 4.0 we can drop this dependency.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/recipes-core/glibc/glibc_2.35.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/glibc/glibc_2.35.bb b/meta/recipes-core/glibc/glibc_2.35.bb
index 6ea5b1efb59..96fe39c548c 100644
--- a/meta/recipes-core/glibc/glibc_2.35.bb
+++ b/meta/recipes-core/glibc/glibc_2.35.bb
@@ -16,7 +16,7 @@ CVE_CHECK_IGNORE += "CVE-2019-1010022 CVE-2019-1010023 CVE-2019-1010024"
 # Potential patch at https://sourceware.org/bugzilla/show_bug.cgi?id=22853
 CVE_CHECK_IGNORE += "CVE-2019-1010025"
 
-DEPENDS += "gperf-native bison-native make-native"
+DEPENDS += "gperf-native bison-native"
 
 NATIVESDKFIXES ?= ""
 NATIVESDKFIXES:class-nativesdk = "\
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 4/4] populate_sdk_ext: Fix second bb_unihashes reference
  2022-06-05 12:25 [PATCH 1/4] sanity: Switch to make 4.0 as a minimum version Richard Purdie
  2022-06-05 12:25 ` [PATCH 2/4] perl: Add dependency on make-native to avoid race issues Richard Purdie
  2022-06-05 12:25 ` [PATCH 3/4] glibc: Drop make-native dependency Richard Purdie
@ 2022-06-05 12:25 ` Richard Purdie
  2 siblings, 0 replies; 4+ messages in thread
From: Richard Purdie @ 2022-06-05 12:25 UTC (permalink / raw)
  To: openembedded-core

A previous fix for zero length bb_unihashes.dat files wasn't complete
as there is a second copy of the unihashes file made. Change this second
call site to match the first to fully fix the zero length file issue.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/classes/populate_sdk_ext.bbclass | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass
index 3ddbb46eda4..d58b2ba5d0d 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -491,10 +491,10 @@ python copy_buildsystem () {
     else:
         tasklistfn = None
 
-    if os.path.exists(builddir + '/cache/bb_unihashes.dat'):
-        bb.parse.siggen.save_unitaskhashes()
-        bb.utils.mkdirhier(os.path.join(baseoutpath, 'cache'))
-        shutil.copyfile(builddir + '/cache/bb_unihashes.dat', baseoutpath + '/cache/bb_unihashes.dat')
+
+    cachedir = os.path.join(baseoutpath, 'cache')
+    bb.utils.mkdirhier(cachedir)
+    bb.parse.siggen.copy_unitaskhashes(cachedir)
 
     # Add packagedata if enabled
     if d.getVar('SDK_INCLUDE_PKGDATA') == '1':
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-06-05 12:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-05 12:25 [PATCH 1/4] sanity: Switch to make 4.0 as a minimum version Richard Purdie
2022-06-05 12:25 ` [PATCH 2/4] perl: Add dependency on make-native to avoid race issues Richard Purdie
2022-06-05 12:25 ` [PATCH 3/4] glibc: Drop make-native dependency Richard Purdie
2022-06-05 12:25 ` [PATCH 4/4] populate_sdk_ext: Fix second bb_unihashes reference Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.