Skip to content

Commit

Permalink
provide a workaround for a glibc and GNU make incompatibility
Browse files Browse the repository at this point in the history
Versions of GNU make newer than 4.4 trigger a hang in versions of glibc
older than 2.31. As distros update to the newer GNU make version we'll
start seeing more and more reports of this hang. Fortunately we already
carry GNU make as a comp tool so all we need to do is select the right
version when needed.

Fixes #1946, #1932, #1975
Signed-off-by: Chris Packham <judge.packham@gmail.com>
  • Loading branch information
cpackham committed Jul 21, 2023
1 parent bedec42 commit e63c408
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 1 deletion.
3 changes: 3 additions & 0 deletions config/configure.in.in
Expand Up @@ -30,6 +30,9 @@ config CONFIGURE_has_make_3_81_or_newer
config CONFIGURE_has_make_4_0_or_newer
@KCONFIG_make_4_0_or_newer@

config CONFIGURE_has_make_4_4_or_newer
@KCONFIG_make_4_4_or_newer@

config CONFIGURE_has_libtool_2_4_or_newer
@KCONFIG_libtool_2_4_or_newer@

Expand Down
9 changes: 9 additions & 0 deletions config/libc/glibc.in
Expand Up @@ -64,6 +64,15 @@ config GLIBC_DEP_MAKE_4_0
select COMP_TOOLS_MAKE
select MAKE_GNUMAKE_SYMLINK # Override old host make in .build/tools/bin

# Glibc versions older than 2.31 have a bug that triggers with GNU make 4.4 or newer
# where the build process hangs indefinitely
config GLIBC_DEP_MAKE_4_3
def_bool y
depends on GLIBC_older_than_2_32 && CONFIGURE_has_make_4_4_or_newer
select COMP_TOOLS_MAKE
select MAKE_GNUMAKE_SYMLINK
select MAKE_REQUIRE_older_than_4_4

# Glibc 2.31 removed support for pre-v8 SPARC in 32-bit mode (64-bit mode always
# required UltraSPARC)
config GLIBC_SPARC_ALLOW_V7
Expand Down
7 changes: 7 additions & 0 deletions configure.ac
Expand Up @@ -210,6 +210,13 @@ CTNG_PROG_VERSION_REQ_ANY([MAKE],
[^GNU Make [4-9]\.],
[make_4_0_or_newer])

CTNG_PROG_VERSION_REQ_ANY([MAKE],
[GNU make >= 4.4],
[make],
[gmake make],
[^GNU Make (4\.[4-9]|[5-9]\.)],
[make_4_4_or_newer])

# Check other companion tools that we may or may not build.
CTNG_PROG_VERSION_REQ_ANY([LIBTOOL],
[GNU libtool >= 2.4],
Expand Down
2 changes: 1 addition & 1 deletion packages/make/4.3/version.desc
@@ -1 +1 @@
obsolete='yes'
# Not obsolete. Needed for a workaround for older glibc versions
1 change: 1 addition & 0 deletions packages/make/package.desc
Expand Up @@ -2,5 +2,6 @@ repository='git https://git.savannah.gnu.org/git/make.git'
bootstrap='autoreconf -i'
mirrors='$(CT_Mirrors GNU make)'
relevantpattern='*.*|.'
milestones='4.3 4.4'
archive_formats='.tar.lz .tar.gz'
signature_format='packed/.sig'

0 comments on commit e63c408

Please sign in to comment.