summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/make
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/make')
-rw-r--r--meta/recipes-devtools/make/make/0001-makeinst-Do-not-undef-POSIX-on-clang-arm.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-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/sigpipe.patch42
-rw-r--r--meta/recipes-devtools/make/make_4.3.bb18
-rw-r--r--meta/recipes-devtools/make/make_4.4.bb14
8 files changed, 56 insertions, 245 deletions
diff --git a/meta/recipes-devtools/make/make/0001-makeinst-Do-not-undef-POSIX-on-clang-arm.patch b/meta/recipes-devtools/make/make/0001-makeinst-Do-not-undef-POSIX-on-clang-arm.patch
deleted file mode 100644
index 2da7c983dc..0000000000
--- a/meta/recipes-devtools/make/make/0001-makeinst-Do-not-undef-POSIX-on-clang-arm.patch
+++ /dev/null
@@ -1,38 +0,0 @@
1From 86b7947156a0c33e768d0a265e38f2881a70a7e2 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 6 Mar 2020 23:19:37 -0800
4Subject: [PATCH] makeinst: Do not undef POSIX on clang/arm
5
6if __arm internal compiler macro is defined then make assumes that the
7system is not posix and goes ahead and undefs POSIX, which results in
8miscompiling make with clang, since clang does define __arm unlike gcc
9which does not, but they both support posix just fine, so here check for
10compiler not being clang when __arm is defined before undefining posix
11
12Fixes error like
13../make-4.3/src/job.c:507:27: error: too many arguments to function call, expected 0, have 1
14 sigsetmask (siggetmask (0) & ~fatal_signal_mask)
15 ~~~~~~~~~~ ^
16
17Upstream-Status: Pending
18Signed-off-by: Khem Raj <raj.khem@gmail.com>
19---
20 src/makeint.h | 2 +-
21 1 file changed, 1 insertion(+), 1 deletion(-)
22
23diff --git a/src/makeint.h b/src/makeint.h
24index c428a36..fadf963 100644
25--- a/src/makeint.h
26+++ b/src/makeint.h
27@@ -115,7 +115,7 @@ extern int errno;
28 #endif
29
30 /* Some systems define _POSIX_VERSION but are not really POSIX.1. */
31-#if (defined (butterfly) || defined (__arm) || (defined (__mips) && defined (_SYSTYPE_SVR3)) || (defined (sequent) && defined (i386)))
32+#if (defined (butterfly) || (defined (__arm) && !defined(__clang__)) || (defined (__mips) && defined (_SYSTYPE_SVR3)) || (defined (sequent) && defined (i386)))
33 # undef POSIX
34 #endif
35
36--
372.25.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
deleted file mode 100644
index 57970824f6..0000000000
--- a/meta/recipes-devtools/make/make/0001-src-dir.c-fix-buffer-overflow-warning.patch
+++ /dev/null
@@ -1,41 +0,0 @@
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-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
deleted file mode 100644
index b3d97f9a3a..0000000000
--- a/meta/recipes-devtools/make/make/0002-modules-fcntl-allow-being-detected-by-importing-proj.patch
+++ /dev/null
@@ -1,33 +0,0 @@
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
deleted file mode 100644
index 9ecc44543e..0000000000
--- a/meta/recipes-devtools/make/make/0002-w32-compat-dirent.c-follow-header.patch
+++ /dev/null
@@ -1,36 +0,0 @@
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
deleted file mode 100644
index 70414c51f4..0000000000
--- a/meta/recipes-devtools/make/make/0003-posixfcn-fcntl-gnulib-make-emulated.patch
+++ /dev/null
@@ -1,79 +0,0 @@
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/sigpipe.patch b/meta/recipes-devtools/make/make/sigpipe.patch
new file mode 100644
index 0000000000..a7270fdbda
--- /dev/null
+++ b/meta/recipes-devtools/make/make/sigpipe.patch
@@ -0,0 +1,42 @@
1From 92ab2e642d2c04b3dcb5a736ae6193680bfd5f74 Mon Sep 17 00:00:00 2001
2From: Paul Smith <psmith@gnu.org>
3Date: Sun, 6 Nov 2022 15:22:02 -0500
4Subject: * src/main.c (main): [SV 63307] Handle SIGPIPE as a fatal signal
5
6Always ignoring SIGPIPE is visible to child processes.
7
8Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/make.git/commit/?id=92ab2e642d2c04b3dcb5a736ae6193680bfd5f74]
9Signed-off-by: Alexander Kanavin <alex@linutronix.de>
10---
11 src/main.c | 8 +++-----
12 1 file changed, 3 insertions(+), 5 deletions(-)
13
14diff --git a/src/main.c b/src/main.c
15index eec9365..f2caf7a 100644
16--- a/src/main.c
17+++ b/src/main.c
18@@ -1182,11 +1182,6 @@ main (int argc, char **argv, char **envp)
19 /* Useful for attaching debuggers, etc. */
20 SPIN ("main-entry");
21
22- /* Don't die if our stdout sends us SIGPIPE. */
23-#ifdef SIGPIPE
24- bsd_signal (SIGPIPE, SIG_IGN);
25-#endif
26-
27 #ifdef HAVE_ATEXIT
28 if (ANY_SET (check_io_state (), IO_STDOUT_OK))
29 atexit (close_stdout);
30@@ -1265,6 +1260,9 @@ main (int argc, char **argv, char **envp)
31 #ifdef SIGQUIT
32 FATAL_SIG (SIGQUIT);
33 #endif
34+#ifdef SIGPIPE
35+ FATAL_SIG (SIGPIPE);
36+#endif
37 FATAL_SIG (SIGINT);
38 FATAL_SIG (SIGTERM);
39
40--
41cgit v1.1
42
diff --git a/meta/recipes-devtools/make/make_4.3.bb b/meta/recipes-devtools/make/make_4.3.bb
deleted file mode 100644
index 9350bed05a..0000000000
--- a/meta/recipes-devtools/make/make_4.3.bb
+++ /dev/null
@@ -1,18 +0,0 @@
1LICENSE = "GPL-3.0-only"
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 file://0001-makeinst-Do-not-undef-POSIX-on-clang-arm.patch \
12"
13
14EXTRA_OECONF += "--without-guile"
15
16SRC_URI[sha256sum] = "e05fdde47c5f7ca45cb697e973894ff4f5d79e13b750ed57d7b66d8defc78e19"
17
18BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/make/make_4.4.bb b/meta/recipes-devtools/make/make_4.4.bb
new file mode 100644
index 0000000000..6642c708d8
--- /dev/null
+++ b/meta/recipes-devtools/make/make_4.4.bb
@@ -0,0 +1,14 @@
1LICENSE = "GPL-3.0-only"
2LIC_FILES_CHKSUM = "file://COPYING;md5=c678957b0c8e964aa6c70fd77641a71e"
3require make.inc
4
5SRC_URI += " \
6 file://0001-m4-getloadavg.m4-restrict-AIX-specific-test-on-AIX.patch \
7 file://sigpipe.patch \
8 "
9
10EXTRA_OECONF += "--without-guile"
11
12SRC_URI[sha256sum] = "581f4d4e872da74b3941c874215898a7d35802f03732bdccee1d4a7979105d18"
13
14BBCLASSEXTEND = "native nativesdk"