summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorJens Rehsack <sno@netbsd.org>2020-02-24 15:39:20 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-02-29 13:04:49 +0000
commit1735b8ae625c06d1c7479f3f8d1794a551e6ca0d (patch)
tree0358d2f2c859e53f2485113daaca3a0bcc14abf8 /meta
parent58cbf4837674286c3626881b45f1af1e8058e4bf (diff)
downloadpoky-1735b8ae625c06d1c7479f3f8d1794a551e6ca0d.tar.gz
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>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/make/make.inc4
-rw-r--r--meta/recipes-devtools/make/make/0001-glob-Do-not-assume-glibc-glob-internals.patch70
-rw-r--r--meta/recipes-devtools/make/make/0001-m4-getloadavg.m4-restrict-AIX-specific-test-on-AIX.patch38
-rw-r--r--meta/recipes-devtools/make/make/0001-src-dir.c-fix-buffer-overflow-warning.patch41
-rw-r--r--meta/recipes-devtools/make/make/0002-glob-Do-not-assume-glibc-glob-internals.patch38
-rw-r--r--meta/recipes-devtools/make/make/0002-modules-fcntl-allow-being-detected-by-importing-proj.patch33
-rw-r--r--meta/recipes-devtools/make/make/0002-w32-compat-dirent.c-follow-header.patch36
-rw-r--r--meta/recipes-devtools/make/make/0003-posixfcn-fcntl-gnulib-make-emulated.patch79
-rw-r--r--meta/recipes-devtools/make/make_4.2.1.bb12
-rw-r--r--meta/recipes-devtools/make/make_4.3.bb18
10 files changed, 246 insertions, 123 deletions
diff --git a/meta/recipes-devtools/make/make.inc b/meta/recipes-devtools/make/make.inc
index b8905bc6d3..4142cf23d3 100644
--- a/meta/recipes-devtools/make/make.inc
+++ b/meta/recipes-devtools/make/make.inc
@@ -5,9 +5,7 @@ called the makefile, which lists each of the non-source files and how to compute
5HOMEPAGE = "http://www.gnu.org/software/make/" 5HOMEPAGE = "http://www.gnu.org/software/make/"
6SECTION = "devel" 6SECTION = "devel"
7 7
8SRC_URI = "${GNU_MIRROR}/make/make-${PV}.tar.bz2 \ 8SRC_URI = "${GNU_MIRROR}/make/make-${PV}.tar.lz \
9 file://0001-glob-Do-not-assume-glibc-glob-internals.patch \
10 file://0002-glob-Do-not-assume-glibc-glob-internals.patch \
11 " 9 "
12 10
13inherit autotools gettext pkgconfig texinfo 11inherit autotools gettext pkgconfig texinfo
diff --git a/meta/recipes-devtools/make/make/0001-glob-Do-not-assume-glibc-glob-internals.patch b/meta/recipes-devtools/make/make/0001-glob-Do-not-assume-glibc-glob-internals.patch
deleted file mode 100644
index 2b6e4d40c3..0000000000
--- a/meta/recipes-devtools/make/make/0001-glob-Do-not-assume-glibc-glob-internals.patch
+++ /dev/null
@@ -1,70 +0,0 @@
1From c90a7dda6c572f79b8e78da44b6ebf8704edef65 Mon Sep 17 00:00:00 2001
2From: Paul Eggert <eggert@cs.ucla.edu>
3Date: Sun, 24 Sep 2017 09:12:58 -0400
4Subject: [PATCH 1/2] glob: Do not assume glibc glob internals.
5
6It has been proposed that glibc glob start using gl_lstat,
7which the API allows it to do. GNU 'make' should not get in
8the way of this. See:
9https://sourceware.org/ml/libc-alpha/2017-09/msg00409.html
10
11* dir.c (local_lstat): New function, like local_stat.
12(dir_setup_glob): Use it to initialize gl_lstat too, as the API
13requires.
14---
15Upstream-Status: Backport
16Signed-off-by: Khem Raj <raj.khem@gmail.com>
17
18 dir.c | 29 +++++++++++++++++++++++++++--
19 1 file changed, 27 insertions(+), 2 deletions(-)
20
21diff --git a/dir.c b/dir.c
22index f34bbf5..12eef30 100644
23--- a/dir.c
24+++ b/dir.c
25@@ -1299,15 +1299,40 @@ local_stat (const char *path, struct stat *buf)
26 }
27 #endif
28
29+/* Similarly for lstat. */
30+#if !defined(lstat) && !defined(WINDOWS32) || defined(VMS)
31+# ifndef VMS
32+# ifndef HAVE_SYS_STAT_H
33+int lstat (const char *path, struct stat *sbuf);
34+# endif
35+# else
36+ /* We are done with the fake lstat. Go back to the real lstat */
37+# ifdef lstat
38+# undef lstat
39+# endif
40+# endif
41+# define local_lstat lstat
42+#elif defined(WINDOWS32)
43+/* Windows doesn't support lstat(). */
44+# define local_lstat local_stat
45+#else
46+static int
47+local_lstat (const char *path, struct stat *buf)
48+{
49+ int e;
50+ EINTRLOOP (e, lstat (path, buf));
51+ return e;
52+}
53+#endif
54+
55 void
56 dir_setup_glob (glob_t *gl)
57 {
58 gl->gl_opendir = open_dirstream;
59 gl->gl_readdir = read_dirstream;
60 gl->gl_closedir = free;
61+ gl->gl_lstat = local_lstat;
62 gl->gl_stat = local_stat;
63- /* We don't bother setting gl_lstat, since glob never calls it.
64- The slot is only there for compatibility with 4.4 BSD. */
65 }
66
67 void
68--
692.16.1
70
diff --git a/meta/recipes-devtools/make/make/0001-m4-getloadavg.m4-restrict-AIX-specific-test-on-AIX.patch b/meta/recipes-devtools/make/make/0001-m4-getloadavg.m4-restrict-AIX-specific-test-on-AIX.patch
new file mode 100644
index 0000000000..096bcfdf78
--- /dev/null
+++ b/meta/recipes-devtools/make/make/0001-m4-getloadavg.m4-restrict-AIX-specific-test-on-AIX.patch
@@ -0,0 +1,38 @@
1From 8309601775d9442416329a77f7dcfd8aa799e9a6 Mon Sep 17 00:00:00 2001
2From: Jens Rehsack <sno@netbsd.org>
3Date: Fri, 21 Feb 2020 17:39:56 +0100
4Subject: [PATCH 1/2] m4/getloadavg.m4: restrict AIX specific test on AIX
5
6When cross compiling for a system without getloadavg, do not try add
7additional linker paths unless it's absolutely necessary.
8
9Signed-off-by: Jens Rehsack <sno@netbsd.org>
10---
11Upstream-Status: Pending
12 m4/getloadavg.m4 | 3 +++
13 1 file changed, 3 insertions(+)
14
15diff --git a/m4/getloadavg.m4 b/m4/getloadavg.m4
16index 3bd2a14..696c5de 100644
17--- a/m4/getloadavg.m4
18+++ b/m4/getloadavg.m4
19@@ -42,6 +42,8 @@ AC_CHECK_FUNC([getloadavg], [],
20 fi
21
22 if test $gl_func_getloadavg_done = no; then
23+ AS_CASE([$host_os],
24+ [aix*], [
25 # There is a commonly available library for RS/6000 AIX.
26 # Since it is not a standard part of AIX, it might be installed locally.
27 gl_getloadavg_LIBS=$LIBS
28@@ -49,6 +51,7 @@ AC_CHECK_FUNC([getloadavg], [],
29 AC_CHECK_LIB([getloadavg], [getloadavg],
30 [LIBS="-lgetloadavg $LIBS" gl_func_getloadavg_done=yes],
31 [LIBS=$gl_getloadavg_LIBS])
32+ ], [:])
33 fi
34
35 # Set up the replacement function if necessary.
36--
372.17.1
38
diff --git a/meta/recipes-devtools/make/make/0001-src-dir.c-fix-buffer-overflow-warning.patch b/meta/recipes-devtools/make/make/0001-src-dir.c-fix-buffer-overflow-warning.patch
new file mode 100644
index 0000000000..57970824f6
--- /dev/null
+++ b/meta/recipes-devtools/make/make/0001-src-dir.c-fix-buffer-overflow-warning.patch
@@ -0,0 +1,41 @@
1From cd7091a7d88306004ca98c5dafcc40f44589b105 Mon Sep 17 00:00:00 2001
2From: Jens Rehsack <sno@netbsd.org>
3Date: Mon, 24 Feb 2020 10:52:21 +0100
4Subject: [PATCH 1/3] src/dir.c: fix buffer-overflow warning
5
6Fix compiler warning:
7 src/dir.c:1294:7: warning: 'strncpy' specified bound depends on the
8 length of the source argument [-Wstringop-overflow=]
9
10The existing code assumes `path` will never exceed `MAXPATHLEN`. Also the
11size of the buffer is increased by 1 to hold a path with the length of
12`MAXPATHLEN` and trailing `0`.
13
14Signed-off-by: Jens Rehsack <sno@netbsd.org>
15---
16Upstream-Status: Pending (https://savannah.gnu.org/bugs/?57888)
17
18 src/dir.c | 6 +++---
19 1 file changed, 3 insertions(+), 3 deletions(-)
20
21diff --git a/src/dir.c b/src/dir.c
22index 862a18e..cad4c4a 100644
23--- a/src/dir.c
24+++ b/src/dir.c
25@@ -1289,10 +1289,10 @@ local_stat (const char *path, struct stat *buf)
26 if (plen > 1 && path[plen - 1] == '.'
27 && (path[plen - 2] == '/' || path[plen - 2] == '\\'))
28 {
29- char parent[MAXPATHLEN];
30+ char parent[MAXPATHLEN+1];
31
32- strncpy (parent, path, plen - 2);
33- parent[plen - 2] = '\0';
34+ strncpy (parent, path, MAXPATHLEN);
35+ parent[MIN(plen - 2, MAXPATHLEN)] = '\0';
36 if (stat (parent, buf) < 0 || !_S_ISDIR (buf->st_mode))
37 return -1;
38 }
39--
402.17.1
41
diff --git a/meta/recipes-devtools/make/make/0002-glob-Do-not-assume-glibc-glob-internals.patch b/meta/recipes-devtools/make/make/0002-glob-Do-not-assume-glibc-glob-internals.patch
deleted file mode 100644
index d49acd9f6e..0000000000
--- a/meta/recipes-devtools/make/make/0002-glob-Do-not-assume-glibc-glob-internals.patch
+++ /dev/null
@@ -1,38 +0,0 @@
1From 9858702dbd1e137262c06765919937660879f63c Mon Sep 17 00:00:00 2001
2From: Paul Eggert <eggert@cs.ucla.edu>
3Date: Sun, 24 Sep 2017 09:12:58 -0400
4Subject: [PATCH 2/2] glob: Do not assume glibc glob internals.
5
6It has been proposed that glibc glob start using gl_lstat,
7which the API allows it to do. GNU 'make' should not get in
8the way of this. See:
9https://sourceware.org/ml/libc-alpha/2017-09/msg00409.html
10
11* dir.c (local_lstat): New function, like local_stat.
12(dir_setup_glob): Use it to initialize gl_lstat too, as the API
13requires.
14---
15Upstream-Status: Backport
16
17 configure.ac | 3 +--
18 1 file changed, 1 insertion(+), 2 deletions(-)
19
20diff --git a/configure.ac b/configure.ac
21index 64ec870..e87901c 100644
22--- a/configure.ac
23+++ b/configure.ac
24@@ -399,10 +399,9 @@ AC_CACHE_CHECK([if system libc has GNU glob], [make_cv_sys_gnu_glob],
25 #include <glob.h>
26 #include <fnmatch.h>
27
28-#define GLOB_INTERFACE_VERSION 1
29 #if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1
30 # include <gnu-versions.h>
31-# if _GNU_GLOB_INTERFACE_VERSION == GLOB_INTERFACE_VERSION
32+if _GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2
33 gnu glob
34 # endif
35 #endif],
36--
372.16.1
38
diff --git a/meta/recipes-devtools/make/make/0002-modules-fcntl-allow-being-detected-by-importing-proj.patch b/meta/recipes-devtools/make/make/0002-modules-fcntl-allow-being-detected-by-importing-proj.patch
new file mode 100644
index 0000000000..b3d97f9a3a
--- /dev/null
+++ b/meta/recipes-devtools/make/make/0002-modules-fcntl-allow-being-detected-by-importing-proj.patch
@@ -0,0 +1,33 @@
1From fb8aaed3b040e589cd880fd714dda5ec00687217 Mon Sep 17 00:00:00 2001
2From: Jens Rehsack <sno@netbsd.org>
3Date: Mon, 24 Feb 2020 12:10:06 +0100
4Subject: [PATCH 2/2] modules: fcntl: allow being detected by importing
5 projects
6
7GNU project `make` relies on gnulib but provides some own compatibility
8functions - including an `fcntl`, which fails on mingw.
9The intension of gnulib is providing these functions and being wider tested,
10but silently injecting a function opens battle of compatibility layers.
11
12So adding a hint into target `config.h` to allow deciding whether using
13an own compatibility implementation or not.
14
15Signed-off-by: Jens Rehsack <sno@netbsd.org>
16---
17Upstream-Status: Pending
18
19 m4/gnulib-comp.m4 | 1 +
20 1 file changed, 1 insertion(+)
21
22diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4
23index 3ee0811..cf75541 100644
24--- a/m4/gnulib-comp.m4
25+++ b/m4/gnulib-comp.m4
26@@ -147,6 +147,7 @@
27 gl_FUNC_FCNTL
28 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
29 AC_LIBOBJ([fcntl])
30+ AC_DEFINE(HAVE_GNULIB_FCNTL, 1, [Define to 1 if you have the `fcntl' function via gnulib.])
31 fi
32 gl_FCNTL_MODULE_INDICATOR([fcntl])
33 gl_FCNTL_H
diff --git a/meta/recipes-devtools/make/make/0002-w32-compat-dirent.c-follow-header.patch b/meta/recipes-devtools/make/make/0002-w32-compat-dirent.c-follow-header.patch
new file mode 100644
index 0000000000..9ecc44543e
--- /dev/null
+++ b/meta/recipes-devtools/make/make/0002-w32-compat-dirent.c-follow-header.patch
@@ -0,0 +1,36 @@
1From 4dd8b4f43aa0078707ad9a7932f4e137bc4383ed Mon Sep 17 00:00:00 2001
2From: Jens Rehsack <sno@netbsd.org>
3Date: Mon, 24 Feb 2020 11:12:43 +0100
4Subject: [PATCH 2/3] w32: compat: dirent.c: follow header
5
6src/w32/include/dirent.h completely delegates to mingw dirent implementation,
7gnulib detects it as fine and completely usable - trust in that.
8
9Signed-off-by: Jens Rehsack <sno@netbsd.org>
10---
11Upstream-Status: Pending (https://savannah.gnu.org/bugs/?57888)
12
13 src/w32/compat/dirent.c | 3 ++-
14 1 file changed, 2 insertions(+), 1 deletion(-)
15
16diff --git a/src/w32/compat/dirent.c b/src/w32/compat/dirent.c
17index b8ec615..de80f72 100644
18--- a/src/w32/compat/dirent.c
19+++ b/src/w32/compat/dirent.c
20@@ -23,7 +23,7 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
21 #include <stdlib.h>
22 #include "dirent.h"
23
24-
25+#ifndef __MINGW32__
26 DIR*
27 opendir(const char* pDirName)
28 {
29@@ -193,3 +193,4 @@ seekdir(DIR* pDir, long nPosition)
30
31 return;
32 }
33+#endif /* !__MINGW32__ */
34--
352.17.1
36
diff --git a/meta/recipes-devtools/make/make/0003-posixfcn-fcntl-gnulib-make-emulated.patch b/meta/recipes-devtools/make/make/0003-posixfcn-fcntl-gnulib-make-emulated.patch
new file mode 100644
index 0000000000..70414c51f4
--- /dev/null
+++ b/meta/recipes-devtools/make/make/0003-posixfcn-fcntl-gnulib-make-emulated.patch
@@ -0,0 +1,79 @@
1From 3d074c8fca5fcf3e6b83d33788f35a8f1b3a44a2 Mon Sep 17 00:00:00 2001
2From: Jens Rehsack <sno@netbsd.org>
3Date: Fri, 21 Feb 2020 19:29:49 +0100
4Subject: [PATCH 3/3] posixfcn: fcntl: gnulib > make-emulated
5
6Rate the fcntl emulation from gnulib higher than the own one.
7
8Signed-off-by: Jens Rehsack <sno@netbsd.org>
9---
10Upstream-Status: Pending (https://savannah.gnu.org/bugs/?57888)
11
12 src/output.h | 19 ++++++++++++++-----
13 src/w32/compat/posixfcn.c | 2 ++
14 2 files changed, 16 insertions(+), 5 deletions(-)
15
16diff --git a/src/output.h b/src/output.h
17index a506505..d3ce6b7 100644
18--- a/src/output.h
19+++ b/src/output.h
20@@ -67,14 +67,21 @@ void output_dump (struct output *out);
21
22 # ifdef WINDOWS32
23 /* For emulations in w32/compat/posixfcn.c. */
24-# define F_GETFD 1
25-# define F_SETLKW 2
26+# ifndef F_GETFD
27+# define F_GETFD 1
28+# endif
29+# ifndef F_SETLKW
30+# define F_SETLKW 2
31+# endif
32 /* Implementation note: None of the values of l_type below can be zero
33 -- they are compared with a static instance of the struct, so zero
34 means unknown/invalid, see w32/compat/posixfcn.c. */
35-# define F_WRLCK 1
36-# define F_UNLCK 2
37-
38+# ifndef F_WRLCK
39+# define F_WRLCK 1
40+# endif
41+# ifndef F_UNLCK
42+# define F_UNLCK 2
43+# endif
44 struct flock
45 {
46 short l_type;
47@@ -89,7 +96,9 @@ struct flock
48 typedef intptr_t sync_handle_t;
49
50 /* Public functions emulated/provided in posixfcn.c. */
51+# ifndef HAVE_GNULIB_FCNTL
52 int fcntl (intptr_t fd, int cmd, ...);
53+# endif
54 intptr_t create_mutex (void);
55 int same_stream (FILE *f1, FILE *f2);
56
57diff --git a/src/w32/compat/posixfcn.c b/src/w32/compat/posixfcn.c
58index 975dfb7..d337b9c 100644
59--- a/src/w32/compat/posixfcn.c
60+++ b/src/w32/compat/posixfcn.c
61@@ -29,6 +29,7 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
62 #ifndef NO_OUTPUT_SYNC
63 /* Support for OUTPUT_SYNC and related functionality. */
64
65+#ifndef HAVE_GNULIB_FCNTL
66 /* Emulation of fcntl that supports only F_GETFD and F_SETLKW. */
67 int
68 fcntl (intptr_t fd, int cmd, ...)
69@@ -142,6 +143,7 @@ fcntl (intptr_t fd, int cmd, ...)
70 return -1;
71 }
72 }
73+#endif /* GNULIB_TEST_FCNTL */
74
75 static intptr_t mutex_handle = -1;
76
77--
782.17.1
79
diff --git a/meta/recipes-devtools/make/make_4.2.1.bb b/meta/recipes-devtools/make/make_4.2.1.bb
deleted file mode 100644
index c6e6a0cd58..0000000000
--- a/meta/recipes-devtools/make/make_4.2.1.bb
+++ /dev/null
@@ -1,12 +0,0 @@
1LICENSE = "GPLv3 & LGPLv2"
2LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
3 file://tests/COPYING;md5=d32239bcb673463ab874e80d47fae504 \
4 file://glob/COPYING.LIB;md5=4a770b67e6be0f60da244beb2de0fce4"
5require make.inc
6
7EXTRA_OECONF += "--without-guile"
8
9SRC_URI[md5sum] = "15b012617e7c44c0ed482721629577ac"
10SRC_URI[sha256sum] = "d6e262bf3601b42d2b1e4ef8310029e1dcf20083c5446b4b7aa67081fdffc589"
11
12BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/make/make_4.3.bb b/meta/recipes-devtools/make/make_4.3.bb
new file mode 100644
index 0000000000..70caf0ae16
--- /dev/null
+++ b/meta/recipes-devtools/make/make_4.3.bb
@@ -0,0 +1,18 @@
1LICENSE = "GPLv3"
2LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
3require make.inc
4
5SRC_URI += "\
6 file://0001-m4-getloadavg.m4-restrict-AIX-specific-test-on-AIX.patch \
7 file://0002-modules-fcntl-allow-being-detected-by-importing-proj.patch \
8 file://0001-src-dir.c-fix-buffer-overflow-warning.patch \
9 file://0002-w32-compat-dirent.c-follow-header.patch \
10 file://0003-posixfcn-fcntl-gnulib-make-emulated.patch \
11"
12
13EXTRA_OECONF += "--without-guile"
14
15SRC_URI[md5sum] = "d5c40e7bd1e97a7404f5d3be982f479a"
16SRC_URI[sha256sum] = "de1a441c4edf952521db30bfca80baae86a0ff1acd0a00402999344f04c45e82"
17
18BBCLASSEXTEND = "native nativesdk"