diff options
Diffstat (limited to 'meta/recipes-devtools/make')
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 @@ | |||
1 | From 86b7947156a0c33e768d0a265e38f2881a70a7e2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 6 Mar 2020 23:19:37 -0800 | ||
4 | Subject: [PATCH] makeinst: Do not undef POSIX on clang/arm | ||
5 | |||
6 | if __arm internal compiler macro is defined then make assumes that the | ||
7 | system is not posix and goes ahead and undefs POSIX, which results in | ||
8 | miscompiling make with clang, since clang does define __arm unlike gcc | ||
9 | which does not, but they both support posix just fine, so here check for | ||
10 | compiler not being clang when __arm is defined before undefining posix | ||
11 | |||
12 | Fixes 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 | |||
17 | Upstream-Status: Pending | ||
18 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
19 | --- | ||
20 | src/makeint.h | 2 +- | ||
21 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
22 | |||
23 | diff --git a/src/makeint.h b/src/makeint.h | ||
24 | index 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 | -- | ||
37 | 2.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 @@ | |||
1 | From cd7091a7d88306004ca98c5dafcc40f44589b105 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jens Rehsack <sno@netbsd.org> | ||
3 | Date: Mon, 24 Feb 2020 10:52:21 +0100 | ||
4 | Subject: [PATCH 1/3] src/dir.c: fix buffer-overflow warning | ||
5 | |||
6 | Fix compiler warning: | ||
7 | src/dir.c:1294:7: warning: 'strncpy' specified bound depends on the | ||
8 | length of the source argument [-Wstringop-overflow=] | ||
9 | |||
10 | The existing code assumes `path` will never exceed `MAXPATHLEN`. Also the | ||
11 | size of the buffer is increased by 1 to hold a path with the length of | ||
12 | `MAXPATHLEN` and trailing `0`. | ||
13 | |||
14 | Signed-off-by: Jens Rehsack <sno@netbsd.org> | ||
15 | --- | ||
16 | Upstream-Status: Pending (https://savannah.gnu.org/bugs/?57888) | ||
17 | |||
18 | src/dir.c | 6 +++--- | ||
19 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
20 | |||
21 | diff --git a/src/dir.c b/src/dir.c | ||
22 | index 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 | -- | ||
40 | 2.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 @@ | |||
1 | From fb8aaed3b040e589cd880fd714dda5ec00687217 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jens Rehsack <sno@netbsd.org> | ||
3 | Date: Mon, 24 Feb 2020 12:10:06 +0100 | ||
4 | Subject: [PATCH 2/2] modules: fcntl: allow being detected by importing | ||
5 | projects | ||
6 | |||
7 | GNU project `make` relies on gnulib but provides some own compatibility | ||
8 | functions - including an `fcntl`, which fails on mingw. | ||
9 | The intension of gnulib is providing these functions and being wider tested, | ||
10 | but silently injecting a function opens battle of compatibility layers. | ||
11 | |||
12 | So adding a hint into target `config.h` to allow deciding whether using | ||
13 | an own compatibility implementation or not. | ||
14 | |||
15 | Signed-off-by: Jens Rehsack <sno@netbsd.org> | ||
16 | --- | ||
17 | Upstream-Status: Pending | ||
18 | |||
19 | m4/gnulib-comp.m4 | 1 + | ||
20 | 1 file changed, 1 insertion(+) | ||
21 | |||
22 | diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4 | ||
23 | index 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 @@ | |||
1 | From 4dd8b4f43aa0078707ad9a7932f4e137bc4383ed Mon Sep 17 00:00:00 2001 | ||
2 | From: Jens Rehsack <sno@netbsd.org> | ||
3 | Date: Mon, 24 Feb 2020 11:12:43 +0100 | ||
4 | Subject: [PATCH 2/3] w32: compat: dirent.c: follow header | ||
5 | |||
6 | src/w32/include/dirent.h completely delegates to mingw dirent implementation, | ||
7 | gnulib detects it as fine and completely usable - trust in that. | ||
8 | |||
9 | Signed-off-by: Jens Rehsack <sno@netbsd.org> | ||
10 | --- | ||
11 | Upstream-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 | |||
16 | diff --git a/src/w32/compat/dirent.c b/src/w32/compat/dirent.c | ||
17 | index 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 | -- | ||
35 | 2.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 @@ | |||
1 | From 3d074c8fca5fcf3e6b83d33788f35a8f1b3a44a2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jens Rehsack <sno@netbsd.org> | ||
3 | Date: Fri, 21 Feb 2020 19:29:49 +0100 | ||
4 | Subject: [PATCH 3/3] posixfcn: fcntl: gnulib > make-emulated | ||
5 | |||
6 | Rate the fcntl emulation from gnulib higher than the own one. | ||
7 | |||
8 | Signed-off-by: Jens Rehsack <sno@netbsd.org> | ||
9 | --- | ||
10 | Upstream-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 | |||
16 | diff --git a/src/output.h b/src/output.h | ||
17 | index 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 | |||
57 | diff --git a/src/w32/compat/posixfcn.c b/src/w32/compat/posixfcn.c | ||
58 | index 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 | -- | ||
78 | 2.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 @@ | |||
1 | From 92ab2e642d2c04b3dcb5a736ae6193680bfd5f74 Mon Sep 17 00:00:00 2001 | ||
2 | From: Paul Smith <psmith@gnu.org> | ||
3 | Date: Sun, 6 Nov 2022 15:22:02 -0500 | ||
4 | Subject: * src/main.c (main): [SV 63307] Handle SIGPIPE as a fatal signal | ||
5 | |||
6 | Always ignoring SIGPIPE is visible to child processes. | ||
7 | |||
8 | Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/make.git/commit/?id=92ab2e642d2c04b3dcb5a736ae6193680bfd5f74] | ||
9 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
10 | --- | ||
11 | src/main.c | 8 +++----- | ||
12 | 1 file changed, 3 insertions(+), 5 deletions(-) | ||
13 | |||
14 | diff --git a/src/main.c b/src/main.c | ||
15 | index 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 | -- | ||
41 | cgit 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 @@ | |||
1 | LICENSE = "GPL-3.0-only" | ||
2 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" | ||
3 | require make.inc | ||
4 | |||
5 | SRC_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 | |||
14 | EXTRA_OECONF += "--without-guile" | ||
15 | |||
16 | SRC_URI[sha256sum] = "e05fdde47c5f7ca45cb697e973894ff4f5d79e13b750ed57d7b66d8defc78e19" | ||
17 | |||
18 | BBCLASSEXTEND = "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 @@ | |||
1 | LICENSE = "GPL-3.0-only" | ||
2 | LIC_FILES_CHKSUM = "file://COPYING;md5=c678957b0c8e964aa6c70fd77641a71e" | ||
3 | require make.inc | ||
4 | |||
5 | SRC_URI += " \ | ||
6 | file://0001-m4-getloadavg.m4-restrict-AIX-specific-test-on-AIX.patch \ | ||
7 | file://sigpipe.patch \ | ||
8 | " | ||
9 | |||
10 | EXTRA_OECONF += "--without-guile" | ||
11 | |||
12 | SRC_URI[sha256sum] = "581f4d4e872da74b3941c874215898a7d35802f03732bdccee1d4a7979105d18" | ||
13 | |||
14 | BBCLASSEXTEND = "native nativesdk" | ||