mirror of
https://git.yoctoproject.org/poky
synced 2026-04-29 09:32:11 +02:00
make: 4.2.1 -> 4.3
Announcement: https://lists.gnu.org/archive/html/bug-make/2020-01/msg00057.html 1) Remove upstream provided patches 0001-glob-Do-not-assume-glibc-glob-internals.patch and 0002-glob-Do-not-assume-glibc-glob-internals.patch. 2) License has been changed to GPLv3 only 3) Important bug-fix is * https://lists.gnu.org/archive/html/bug-make/2018-09/msg00006.html 4) Backward-incompatibilities: * Number signs (#) appearing inside a macro reference or function invocation no longer introduce comments and should not be escaped with backslashes * Previously appending using '+=' to an empty variable would result in a value starting with a space. Now the initial space is only added if the variable already contains some value. Similarly, appending an empty string does not add a trailing space. Fix incompatibility issues between gnulib bundled with updated make fix issues in w32 compat sources. (From OE-Core rev: 4a5d4cf0cc8a4a6af76f23dd8a29627042230f98) Signed-off-by: Jens Rehsack <sno@netbsd.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
58cbf48376
commit
1735b8ae62
@@ -5,9 +5,7 @@ called the makefile, which lists each of the non-source files and how to compute
|
||||
HOMEPAGE = "http://www.gnu.org/software/make/"
|
||||
SECTION = "devel"
|
||||
|
||||
SRC_URI = "${GNU_MIRROR}/make/make-${PV}.tar.bz2 \
|
||||
file://0001-glob-Do-not-assume-glibc-glob-internals.patch \
|
||||
file://0002-glob-Do-not-assume-glibc-glob-internals.patch \
|
||||
SRC_URI = "${GNU_MIRROR}/make/make-${PV}.tar.lz \
|
||||
"
|
||||
|
||||
inherit autotools gettext pkgconfig texinfo
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
From c90a7dda6c572f79b8e78da44b6ebf8704edef65 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Eggert <eggert@cs.ucla.edu>
|
||||
Date: Sun, 24 Sep 2017 09:12:58 -0400
|
||||
Subject: [PATCH 1/2] glob: Do not assume glibc glob internals.
|
||||
|
||||
It has been proposed that glibc glob start using gl_lstat,
|
||||
which the API allows it to do. GNU 'make' should not get in
|
||||
the way of this. See:
|
||||
https://sourceware.org/ml/libc-alpha/2017-09/msg00409.html
|
||||
|
||||
* dir.c (local_lstat): New function, like local_stat.
|
||||
(dir_setup_glob): Use it to initialize gl_lstat too, as the API
|
||||
requires.
|
||||
---
|
||||
Upstream-Status: Backport
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
|
||||
dir.c | 29 +++++++++++++++++++++++++++--
|
||||
1 file changed, 27 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dir.c b/dir.c
|
||||
index f34bbf5..12eef30 100644
|
||||
--- a/dir.c
|
||||
+++ b/dir.c
|
||||
@@ -1299,15 +1299,40 @@ local_stat (const char *path, struct stat *buf)
|
||||
}
|
||||
#endif
|
||||
|
||||
+/* Similarly for lstat. */
|
||||
+#if !defined(lstat) && !defined(WINDOWS32) || defined(VMS)
|
||||
+# ifndef VMS
|
||||
+# ifndef HAVE_SYS_STAT_H
|
||||
+int lstat (const char *path, struct stat *sbuf);
|
||||
+# endif
|
||||
+# else
|
||||
+ /* We are done with the fake lstat. Go back to the real lstat */
|
||||
+# ifdef lstat
|
||||
+# undef lstat
|
||||
+# endif
|
||||
+# endif
|
||||
+# define local_lstat lstat
|
||||
+#elif defined(WINDOWS32)
|
||||
+/* Windows doesn't support lstat(). */
|
||||
+# define local_lstat local_stat
|
||||
+#else
|
||||
+static int
|
||||
+local_lstat (const char *path, struct stat *buf)
|
||||
+{
|
||||
+ int e;
|
||||
+ EINTRLOOP (e, lstat (path, buf));
|
||||
+ return e;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
void
|
||||
dir_setup_glob (glob_t *gl)
|
||||
{
|
||||
gl->gl_opendir = open_dirstream;
|
||||
gl->gl_readdir = read_dirstream;
|
||||
gl->gl_closedir = free;
|
||||
+ gl->gl_lstat = local_lstat;
|
||||
gl->gl_stat = local_stat;
|
||||
- /* We don't bother setting gl_lstat, since glob never calls it.
|
||||
- The slot is only there for compatibility with 4.4 BSD. */
|
||||
}
|
||||
|
||||
void
|
||||
--
|
||||
2.16.1
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
From 8309601775d9442416329a77f7dcfd8aa799e9a6 Mon Sep 17 00:00:00 2001
|
||||
From: Jens Rehsack <sno@netbsd.org>
|
||||
Date: Fri, 21 Feb 2020 17:39:56 +0100
|
||||
Subject: [PATCH 1/2] m4/getloadavg.m4: restrict AIX specific test on AIX
|
||||
|
||||
When cross compiling for a system without getloadavg, do not try add
|
||||
additional linker paths unless it's absolutely necessary.
|
||||
|
||||
Signed-off-by: Jens Rehsack <sno@netbsd.org>
|
||||
---
|
||||
Upstream-Status: Pending
|
||||
m4/getloadavg.m4 | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/m4/getloadavg.m4 b/m4/getloadavg.m4
|
||||
index 3bd2a14..696c5de 100644
|
||||
--- a/m4/getloadavg.m4
|
||||
+++ b/m4/getloadavg.m4
|
||||
@@ -42,6 +42,8 @@ AC_CHECK_FUNC([getloadavg], [],
|
||||
fi
|
||||
|
||||
if test $gl_func_getloadavg_done = no; then
|
||||
+ AS_CASE([$host_os],
|
||||
+ [aix*], [
|
||||
# There is a commonly available library for RS/6000 AIX.
|
||||
# Since it is not a standard part of AIX, it might be installed locally.
|
||||
gl_getloadavg_LIBS=$LIBS
|
||||
@@ -49,6 +51,7 @@ AC_CHECK_FUNC([getloadavg], [],
|
||||
AC_CHECK_LIB([getloadavg], [getloadavg],
|
||||
[LIBS="-lgetloadavg $LIBS" gl_func_getloadavg_done=yes],
|
||||
[LIBS=$gl_getloadavg_LIBS])
|
||||
+ ], [:])
|
||||
fi
|
||||
|
||||
# Set up the replacement function if necessary.
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
From cd7091a7d88306004ca98c5dafcc40f44589b105 Mon Sep 17 00:00:00 2001
|
||||
From: Jens Rehsack <sno@netbsd.org>
|
||||
Date: Mon, 24 Feb 2020 10:52:21 +0100
|
||||
Subject: [PATCH 1/3] src/dir.c: fix buffer-overflow warning
|
||||
|
||||
Fix compiler warning:
|
||||
src/dir.c:1294:7: warning: 'strncpy' specified bound depends on the
|
||||
length of the source argument [-Wstringop-overflow=]
|
||||
|
||||
The existing code assumes `path` will never exceed `MAXPATHLEN`. Also the
|
||||
size of the buffer is increased by 1 to hold a path with the length of
|
||||
`MAXPATHLEN` and trailing `0`.
|
||||
|
||||
Signed-off-by: Jens Rehsack <sno@netbsd.org>
|
||||
---
|
||||
Upstream-Status: Pending (https://savannah.gnu.org/bugs/?57888)
|
||||
|
||||
src/dir.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/dir.c b/src/dir.c
|
||||
index 862a18e..cad4c4a 100644
|
||||
--- a/src/dir.c
|
||||
+++ b/src/dir.c
|
||||
@@ -1289,10 +1289,10 @@ local_stat (const char *path, struct stat *buf)
|
||||
if (plen > 1 && path[plen - 1] == '.'
|
||||
&& (path[plen - 2] == '/' || path[plen - 2] == '\\'))
|
||||
{
|
||||
- char parent[MAXPATHLEN];
|
||||
+ char parent[MAXPATHLEN+1];
|
||||
|
||||
- strncpy (parent, path, plen - 2);
|
||||
- parent[plen - 2] = '\0';
|
||||
+ strncpy (parent, path, MAXPATHLEN);
|
||||
+ parent[MIN(plen - 2, MAXPATHLEN)] = '\0';
|
||||
if (stat (parent, buf) < 0 || !_S_ISDIR (buf->st_mode))
|
||||
return -1;
|
||||
}
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
From 9858702dbd1e137262c06765919937660879f63c Mon Sep 17 00:00:00 2001
|
||||
From: Paul Eggert <eggert@cs.ucla.edu>
|
||||
Date: Sun, 24 Sep 2017 09:12:58 -0400
|
||||
Subject: [PATCH 2/2] glob: Do not assume glibc glob internals.
|
||||
|
||||
It has been proposed that glibc glob start using gl_lstat,
|
||||
which the API allows it to do. GNU 'make' should not get in
|
||||
the way of this. See:
|
||||
https://sourceware.org/ml/libc-alpha/2017-09/msg00409.html
|
||||
|
||||
* dir.c (local_lstat): New function, like local_stat.
|
||||
(dir_setup_glob): Use it to initialize gl_lstat too, as the API
|
||||
requires.
|
||||
---
|
||||
Upstream-Status: Backport
|
||||
|
||||
configure.ac | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 64ec870..e87901c 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -399,10 +399,9 @@ AC_CACHE_CHECK([if system libc has GNU glob], [make_cv_sys_gnu_glob],
|
||||
#include <glob.h>
|
||||
#include <fnmatch.h>
|
||||
|
||||
-#define GLOB_INTERFACE_VERSION 1
|
||||
#if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1
|
||||
# include <gnu-versions.h>
|
||||
-# if _GNU_GLOB_INTERFACE_VERSION == GLOB_INTERFACE_VERSION
|
||||
+if _GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2
|
||||
gnu glob
|
||||
# endif
|
||||
#endif],
|
||||
--
|
||||
2.16.1
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
From fb8aaed3b040e589cd880fd714dda5ec00687217 Mon Sep 17 00:00:00 2001
|
||||
From: Jens Rehsack <sno@netbsd.org>
|
||||
Date: Mon, 24 Feb 2020 12:10:06 +0100
|
||||
Subject: [PATCH 2/2] modules: fcntl: allow being detected by importing
|
||||
projects
|
||||
|
||||
GNU project `make` relies on gnulib but provides some own compatibility
|
||||
functions - including an `fcntl`, which fails on mingw.
|
||||
The intension of gnulib is providing these functions and being wider tested,
|
||||
but silently injecting a function opens battle of compatibility layers.
|
||||
|
||||
So adding a hint into target `config.h` to allow deciding whether using
|
||||
an own compatibility implementation or not.
|
||||
|
||||
Signed-off-by: Jens Rehsack <sno@netbsd.org>
|
||||
---
|
||||
Upstream-Status: Pending
|
||||
|
||||
m4/gnulib-comp.m4 | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4
|
||||
index 3ee0811..cf75541 100644
|
||||
--- a/m4/gnulib-comp.m4
|
||||
+++ b/m4/gnulib-comp.m4
|
||||
@@ -147,6 +147,7 @@
|
||||
gl_FUNC_FCNTL
|
||||
if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
|
||||
AC_LIBOBJ([fcntl])
|
||||
+ AC_DEFINE(HAVE_GNULIB_FCNTL, 1, [Define to 1 if you have the `fcntl' function via gnulib.])
|
||||
fi
|
||||
gl_FCNTL_MODULE_INDICATOR([fcntl])
|
||||
gl_FCNTL_H
|
||||
@@ -0,0 +1,36 @@
|
||||
From 4dd8b4f43aa0078707ad9a7932f4e137bc4383ed Mon Sep 17 00:00:00 2001
|
||||
From: Jens Rehsack <sno@netbsd.org>
|
||||
Date: Mon, 24 Feb 2020 11:12:43 +0100
|
||||
Subject: [PATCH 2/3] w32: compat: dirent.c: follow header
|
||||
|
||||
src/w32/include/dirent.h completely delegates to mingw dirent implementation,
|
||||
gnulib detects it as fine and completely usable - trust in that.
|
||||
|
||||
Signed-off-by: Jens Rehsack <sno@netbsd.org>
|
||||
---
|
||||
Upstream-Status: Pending (https://savannah.gnu.org/bugs/?57888)
|
||||
|
||||
src/w32/compat/dirent.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/w32/compat/dirent.c b/src/w32/compat/dirent.c
|
||||
index b8ec615..de80f72 100644
|
||||
--- a/src/w32/compat/dirent.c
|
||||
+++ b/src/w32/compat/dirent.c
|
||||
@@ -23,7 +23,7 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
#include <stdlib.h>
|
||||
#include "dirent.h"
|
||||
|
||||
-
|
||||
+#ifndef __MINGW32__
|
||||
DIR*
|
||||
opendir(const char* pDirName)
|
||||
{
|
||||
@@ -193,3 +193,4 @@ seekdir(DIR* pDir, long nPosition)
|
||||
|
||||
return;
|
||||
}
|
||||
+#endif /* !__MINGW32__ */
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
From 3d074c8fca5fcf3e6b83d33788f35a8f1b3a44a2 Mon Sep 17 00:00:00 2001
|
||||
From: Jens Rehsack <sno@netbsd.org>
|
||||
Date: Fri, 21 Feb 2020 19:29:49 +0100
|
||||
Subject: [PATCH 3/3] posixfcn: fcntl: gnulib > make-emulated
|
||||
|
||||
Rate the fcntl emulation from gnulib higher than the own one.
|
||||
|
||||
Signed-off-by: Jens Rehsack <sno@netbsd.org>
|
||||
---
|
||||
Upstream-Status: Pending (https://savannah.gnu.org/bugs/?57888)
|
||||
|
||||
src/output.h | 19 ++++++++++++++-----
|
||||
src/w32/compat/posixfcn.c | 2 ++
|
||||
2 files changed, 16 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/output.h b/src/output.h
|
||||
index a506505..d3ce6b7 100644
|
||||
--- a/src/output.h
|
||||
+++ b/src/output.h
|
||||
@@ -67,14 +67,21 @@ void output_dump (struct output *out);
|
||||
|
||||
# ifdef WINDOWS32
|
||||
/* For emulations in w32/compat/posixfcn.c. */
|
||||
-# define F_GETFD 1
|
||||
-# define F_SETLKW 2
|
||||
+# ifndef F_GETFD
|
||||
+# define F_GETFD 1
|
||||
+# endif
|
||||
+# ifndef F_SETLKW
|
||||
+# define F_SETLKW 2
|
||||
+# endif
|
||||
/* Implementation note: None of the values of l_type below can be zero
|
||||
-- they are compared with a static instance of the struct, so zero
|
||||
means unknown/invalid, see w32/compat/posixfcn.c. */
|
||||
-# define F_WRLCK 1
|
||||
-# define F_UNLCK 2
|
||||
-
|
||||
+# ifndef F_WRLCK
|
||||
+# define F_WRLCK 1
|
||||
+# endif
|
||||
+# ifndef F_UNLCK
|
||||
+# define F_UNLCK 2
|
||||
+# endif
|
||||
struct flock
|
||||
{
|
||||
short l_type;
|
||||
@@ -89,7 +96,9 @@ struct flock
|
||||
typedef intptr_t sync_handle_t;
|
||||
|
||||
/* Public functions emulated/provided in posixfcn.c. */
|
||||
+# ifndef HAVE_GNULIB_FCNTL
|
||||
int fcntl (intptr_t fd, int cmd, ...);
|
||||
+# endif
|
||||
intptr_t create_mutex (void);
|
||||
int same_stream (FILE *f1, FILE *f2);
|
||||
|
||||
diff --git a/src/w32/compat/posixfcn.c b/src/w32/compat/posixfcn.c
|
||||
index 975dfb7..d337b9c 100644
|
||||
--- a/src/w32/compat/posixfcn.c
|
||||
+++ b/src/w32/compat/posixfcn.c
|
||||
@@ -29,6 +29,7 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
#ifndef NO_OUTPUT_SYNC
|
||||
/* Support for OUTPUT_SYNC and related functionality. */
|
||||
|
||||
+#ifndef HAVE_GNULIB_FCNTL
|
||||
/* Emulation of fcntl that supports only F_GETFD and F_SETLKW. */
|
||||
int
|
||||
fcntl (intptr_t fd, int cmd, ...)
|
||||
@@ -142,6 +143,7 @@ fcntl (intptr_t fd, int cmd, ...)
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
+#endif /* GNULIB_TEST_FCNTL */
|
||||
|
||||
static intptr_t mutex_handle = -1;
|
||||
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
LICENSE = "GPLv3 & LGPLv2"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
|
||||
file://tests/COPYING;md5=d32239bcb673463ab874e80d47fae504 \
|
||||
file://glob/COPYING.LIB;md5=4a770b67e6be0f60da244beb2de0fce4"
|
||||
require make.inc
|
||||
|
||||
EXTRA_OECONF += "--without-guile"
|
||||
|
||||
SRC_URI[md5sum] = "15b012617e7c44c0ed482721629577ac"
|
||||
SRC_URI[sha256sum] = "d6e262bf3601b42d2b1e4ef8310029e1dcf20083c5446b4b7aa67081fdffc589"
|
||||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
||||
18
meta/recipes-devtools/make/make_4.3.bb
Normal file
18
meta/recipes-devtools/make/make_4.3.bb
Normal file
@@ -0,0 +1,18 @@
|
||||
LICENSE = "GPLv3"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
|
||||
require make.inc
|
||||
|
||||
SRC_URI += "\
|
||||
file://0001-m4-getloadavg.m4-restrict-AIX-specific-test-on-AIX.patch \
|
||||
file://0002-modules-fcntl-allow-being-detected-by-importing-proj.patch \
|
||||
file://0001-src-dir.c-fix-buffer-overflow-warning.patch \
|
||||
file://0002-w32-compat-dirent.c-follow-header.patch \
|
||||
file://0003-posixfcn-fcntl-gnulib-make-emulated.patch \
|
||||
"
|
||||
|
||||
EXTRA_OECONF += "--without-guile"
|
||||
|
||||
SRC_URI[md5sum] = "d5c40e7bd1e97a7404f5d3be982f479a"
|
||||
SRC_URI[sha256sum] = "de1a441c4edf952521db30bfca80baae86a0ff1acd0a00402999344f04c45e82"
|
||||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
||||
Reference in New Issue
Block a user