Skip to contentSkip to conversation

oeqa/selftest/glibc: remove obsolete parallel make assignment

PATCH In review Ross Burton 2 participants 5 messages Aug 5 – Aug 6

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 oeqa/selftest/glibc: remove obsolete parallel make assignment

glibc doesn't use EGLIBCPARALLELISM so this didn't do anything.

The glibc check target serialises timing-sensitive tests (nptl and rt) so this wouldn't have done anything meaningful anyway.

---
 meta/lib/oeqa/selftest/cases/glibc.py | 2 --
 1 file changed, 2 deletions(-)
meta/lib/oeqa/selftest/cases/glibc.py +0 -2
index a65afb1367e..b8efa22fdac 100644
@@ -58,8 +58,6 @@ class GlibcSelfTestBase(OESelftestTestCase, OEPTestResultTestCase):
             features.append('TOOLCHAIN_TEST_HOST = "{0}"'.format(ssh))
             features.append('TOOLCHAIN_TEST_HOST_USER = "root"')
             features.append('TOOLCHAIN_TEST_HOST_PORT = "22"')
-            # force single threaded test execution
-            features.append('EGLIBCPARALLELISM:task-check:pn-glibc-testsuite = "PARALLELMFLAGS="-j1""')
         self.write_config("\n".join(features))
 
         start_time = time.time()
Signature · 1 line
2.43.0
#1 lore raw

PATCH 2/4 glibc: remove obsolete parallelism flag handling

Several problems here: the comment refers to PARALLELMFLAGS (which is a variable in glibc's Makefile) but the actual assignment is to EGLIBCPARALLELISM, which is an eglibc-ism and thus not respected by glibc. Thus we were emptying PARALLEL_MAKE and so not actually doing the build in parallel.

The Makefiles as of glibc 2.44[1] actually build in parallel well using the standard way to pass flags, so drop all of this logic.

On my machine this has noticable improvements to walltime:

do_compile: 86s -> 44s
do_install: 55s -> 40s

Note that there is a PARALLELMFLAGS variable in the Makefiles, but using it has marginal gains over not and upstream are looking at removing it entirely.

[1] glibc 7cac99621e ("Makefile: Run the subdirectory recursion in parallel")

---
 meta/recipes-core/glibc/glibc.inc | 7 -------
 1 file changed, 7 deletions(-)
meta/recipes-core/glibc/glibc.inc +0 -7
index 560ebef677c..27a911dd8ff 100644
@@ -29,13 +29,6 @@ CACHED_CONFIGUREVARS:append:mipsarch = " libc_cv_ld_gnu_indirect_function=no"
 GLIBC_EXTRA_OECONF ?= ""
 GLIBC_EXTRA_OECONF:class-nativesdk = ""
 
-# glibc uses PARALLELMFLAGS variable to pass parallel build info so transfer
-# PARALLEL_MAKE into PARALLELMFLAGS and empty out PARALLEL_MAKE
-EGLIBCPARALLELISM := "PARALLELMFLAGS="${PARALLEL_MAKE}""
-EXTRA_OEMAKE[vardepsexclude] += "EGLIBCPARALLELISM"
-EXTRA_OEMAKE += "${EGLIBCPARALLELISM}"
-PARALLEL_MAKE = ""
-
 # glibc make-syscalls.sh has a number of issues with /bin/dash and
 # it's output which make calls via the SHELL also has issues, so
 # ensure make uses /bin/bash
Signature · 1 line
2.43.0
#2 lore raw

Re: [OE-core] [PATCH 2/4] glibc: remove obsolete parallelism flag handling

Quoted 40 lines · Ross Burton via lists.openembedded.org

Several problems here: the comment refers to PARALLELMFLAGS (which is a variable in glibc's Makefile) but the actual assignment is to EGLIBCPARALLELISM, which is an eglibc-ism and thus not respected by glibc. Thus we were emptying PARALLEL_MAKE and so not actually doing the build in parallel.

The Makefiles as of glibc 2.44[1] actually build in parallel well using the standard way to pass flags, so drop all of this logic.

On my machine this has noticable improvements to walltime:

  do_compile:  86s -> 44s
  do_install:  55s -> 40s

Note that there is a PARALLELMFLAGS variable in the Makefiles, but using it has marginal gains over not and upstream are looking at removing it entirely.

[1] glibc 7cac99621e ("Makefile: Run the subdirectory recursion in parallel")

---
 meta/recipes-core/glibc/glibc.inc | 7 -------

 1 file changed, 7 deletions(-)
meta/recipes-core/glibc/glibc.inc +0 -0
index 560ebef677c..27a911dd8ff 100644
@@ -29,13 +29,6 @@ CACHED_CONFIGUREVARS:append:mipsarch = " libc_cv_ld_gnu_indirect_function=no"

 GLIBC_EXTRA_OECONF ?= ""
 GLIBC_EXTRA_OECONF:class-nativesdk = ""

meta/recipes-core/glibc/glibc.inc +0 -7
-# glibc uses PARALLELMFLAGS variable to pass parallel build info so transfer
-# PARALLEL_MAKE into PARALLELMFLAGS and empty out PARALLEL_MAKE
-EGLIBCPARALLELISM := "PARALLELMFLAGS="${PARALLEL_MAKE}""
-EXTRA_OEMAKE[vardepsexclude] += "EGLIBCPARALLELISM"
-EXTRA_OEMAKE += "${EGLIBCPARALLELISM}"
-PARALLEL_MAKE = ""
-
Quoted 4 lines
 # glibc make-syscalls.sh has a number of issues with /bin/dash and
 # it's output which make calls via the SHELL also has issues, so
 # ensure make uses /bin/bash

Unfortunately
https://autobuilder.yoctoproject.org/valkyrie/#/builders/29/builds/4399
is full of what look like parallel make failures :(

Cheers,

Richard

#3 lore raw

PATCH 3/4 glibc: remove obsolete shell override for make-syscalls.sh

In reply to Ross Burton

SHELL was set to /bin/bash back in 2012[1] because of non-portable use of echo in eglibc.

As this non-portable use was fixed upstream in glibc in 2015[1] we can remove this override.

[1] oe-core 9d002f7cdc5 ("eglibc: force make to use /bin/bash")
[2] glibc 95b07fbcc7 ("Fix non-portable echo usage in sysdeps/unix/make-syscalls.sh")

---
 meta/recipes-core/glibc/glibc.inc | 5 -----
 1 file changed, 5 deletions(-)
meta/recipes-core/glibc/glibc.inc +0 -5
index 27a911dd8ff..47c15c116d8 100644
@@ -29,11 +29,6 @@ CACHED_CONFIGUREVARS:append:mipsarch = " libc_cv_ld_gnu_indirect_function=no"
 GLIBC_EXTRA_OECONF ?= ""
 GLIBC_EXTRA_OECONF:class-nativesdk = ""
 
-# glibc make-syscalls.sh has a number of issues with /bin/dash and
-# it's output which make calls via the SHELL also has issues, so
-# ensure make uses /bin/bash
-EXTRA_OEMAKE += "SHELL=/bin/bash"
-
 # We do not need bash to run tzselect script, the default is to use
 # bash but it can be configured by setting KSHELL Makefile variable
 EXTRA_OEMAKE += "KSHELL=/bin/sh"
Signature · 1 line
2.43.0
#4 lore raw

PATCH 4/4 glibc: remove obsolete KSHELL assignment

In reply to Ross Burton

KSHELL was set so that tzselect uses /bin/sh instead of /bin/bash.

This variable doesn't exist in glibc and instead we patch the script in 0019-tzselect.ksh-Use-bin-sh-default-shell-interpreter.patch, so we can remove this assignment.

---
 meta/recipes-core/glibc/glibc.inc | 4 ----
 1 file changed, 4 deletions(-)
meta/recipes-core/glibc/glibc.inc +0 -4
index 47c15c116d8..16c18bd4b6c 100644
@@ -29,10 +29,6 @@ CACHED_CONFIGUREVARS:append:mipsarch = " libc_cv_ld_gnu_indirect_function=no"
 GLIBC_EXTRA_OECONF ?= ""
 GLIBC_EXTRA_OECONF:class-nativesdk = ""
 
-# We do not need bash to run tzselect script, the default is to use
-# bash but it can be configured by setting KSHELL Makefile variable
-EXTRA_OEMAKE += "KSHELL=/bin/sh"
-
 TARGET_CC_ARCH:append:toolchain-gcc = " -fno-link-libatomic"
 SDK_CC_ARCH:append:toolchain-gcc = " -fno-link-libatomic"
 
Signature · 1 line
2.43.0