From 9c4a278bbd68ddc288e1aec121125cdf026276f6 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 1 Feb 2018 22:07:37 +0000 Subject: [PATCH] Add upstream patch to fix incorrect use of glibc 2.27 glob internals. With glibc 2.27: glob/libglob.a(glob.o): In function `glob_in_dir': /home/rjones/d/fedora/make/master/make-4.2.1/glob/glob.c:1367: undefined reference to `__alloca' /home/rjones/d/fedora/make/master/make-4.2.1/glob/glob.c:1342: undefined reference to `__alloca' /home/rjones/d/fedora/make/master/make-4.2.1/glob/glob.c:1283: undefined reference to `__alloca' /home/rjones/d/fedora/make/master/make-4.2.1/glob/glob.c:1256: undefined reference to `__alloca' glob/libglob.a(glob.o): In function `glob': /home/rjones/d/fedora/make/master/make-4.2.1/glob/glob.c:581: undefined reference to `__alloca' glob/libglob.a(glob.o):/home/rjones/d/fedora/make/master/make-4.2.1/glob/glob.c:732: more undefined references to `__alloca' follow collect2: error: ld returned 1 exit status This is fixed upstream by: http://git.savannah.gnu.org/cgit/make.git/patch/?id=48c8a116a914a325a0497721f5d8b58d5bba34d4 Note that the additional BuildRequires: autoconf, automake can be removed after this patch is available in an upstream tarball. --- make-4.2.1-glob-fix.patch | 28 ++++++++++++++++++++++++++++ make.spec | 12 +++++++++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 make-4.2.1-glob-fix.patch diff --git a/make-4.2.1-glob-fix.patch b/make-4.2.1-glob-fix.patch new file mode 100644 index 0000000..be3abae --- /dev/null +++ b/make-4.2.1-glob-fix.patch @@ -0,0 +1,28 @@ +From 48c8a116a914a325a0497721f5d8b58d5bba34d4 Mon Sep 17 00:00:00 2001 +From: Paul Smith +Date: Sun, 19 Nov 2017 15:09:16 -0500 +Subject: * configure.ac: Support GLIBC glob interface version 2 + +--- + configure.ac | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 8c72568..4710832 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -404,10 +404,9 @@ AC_CACHE_CHECK([if system libc has GNU glob], [make_cv_sys_gnu_glob], + #include + #include + +-#define GLOB_INTERFACE_VERSION 1 + #if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1 + # include +-# if _GNU_GLOB_INTERFACE_VERSION == GLOB_INTERFACE_VERSION ++# if _GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2 + gnu glob + # endif + #endif], +-- +cgit v1.0-41-gc330 + diff --git a/make.spec b/make.spec index 7690ce6..b173b36 100644 --- a/make.spec +++ b/make.spec @@ -3,7 +3,7 @@ Summary: A GNU tool which simplifies the build process for users Name: make Epoch: 1 Version: 4.2.1 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv3+ Group: Development/Tools URL: http://www.gnu.org/software/make/ @@ -24,6 +24,12 @@ Patch3: make-4.2-j8k.patch # The default value of .SHELL_FLAGS is -c. Patch4: make-4.0-weird-shell.patch +# Upstream patch: http://git.savannah.gnu.org/cgit/make.git/patch/?id=48c8a116a914a325a0497721f5d8b58d5bba34d4 +# Fixes incorrect use of glibc 2.27 glob internals. +Patch5: make-4.2.1-glob-fix.patch +# Unfortunately the above patches configure.ac, so: +BuildRequires: autoconf, automake + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires(post): /sbin/install-info Requires(preun): /sbin/install-info @@ -53,6 +59,7 @@ The make-devel package contains gnumake.h. %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 rm -f tests/scripts/features/parallelism.orig @@ -103,6 +110,9 @@ fi %{_includedir}/gnumake.h %changelog +* Thu Feb 01 2018 Richard W.M. Jones - 1:4.2.1-5 +- Add upstream patch to fix incorrect use of glibc 2.27 glob internals. + * Thu Aug 03 2017 Fedora Release Engineering - 1:4.2.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild