aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/make/APKBUILD52
-rw-r--r--main/make/fix-atexit-exit.patch8
-rw-r--r--main/make/make-3.82-arg-list-length.patch89
-rw-r--r--main/make/make-3.82-copy-on-expand.patch58
-rw-r--r--main/make/make-3.82-dont-prune-intermediate.patch57
-rw-r--r--main/make/make-3.82-expensive_glob.patch116
-rw-r--r--main/make/make-3.82-jobserver.patch19
-rw-r--r--main/make/make-3.82-memory-corruption.patch37
-rw-r--r--main/make/make-3.82-parallel-remake.patch39
-rw-r--r--main/make/make-3.82-savannah-bugs-30612-30723.patch75
-rw-r--r--main/make/make-3.82-weird-shell.patch16
-rw-r--r--main/make/use-malloc.patch32
12 files changed, 13 insertions, 585 deletions
diff --git a/main/make/APKBUILD b/main/make/APKBUILD
index 0d67c34dbb..4b21db7f4c 100644
--- a/main/make/APKBUILD
+++ b/main/make/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=make
-pkgver=3.82
-pkgrel=7
+pkgver=4.0
+pkgrel=0
pkgdesc="GNU make utility to maintain groups of programs"
url="http://www.gnu.org/software/make"
arch="all"
@@ -9,16 +9,7 @@ license="GPL3+"
depends=""
subpackages="$pkgname-doc"
source="ftp://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.bz2
- make-3.82-savannah-bugs-30612-30723.patch
- make-3.82-copy-on-expand.patch
- make-3.82-memory-corruption.patch
- make-3.82-jobserver.patch
- make-3.82-expensive_glob.patch
- make-3.82-parallel-remake.patch
- make-3.82-dont-prune-intermediate.patch
- make-3.82-arg-list-length.patch
fix-atexit-exit.patch
- use-malloc.patch
"
_builddir="$srcdir"/$pkgname-$pkgver
@@ -52,36 +43,9 @@ package() {
make DESTDIR="$pkgdir" install || return 1
}
-md5sums="1a11100f3c63fcf5753818e59d63088f make-3.82.tar.bz2
-74e598a2052f7d98e3495ea9d917ecf4 make-3.82-savannah-bugs-30612-30723.patch
-9545e667ab5eafdef5b658941290cc26 make-3.82-copy-on-expand.patch
-0436e740edbc81cf27fd598241b8dcf0 make-3.82-memory-corruption.patch
-923a06973f4bbc9f27c2ca88a6940d45 make-3.82-jobserver.patch
-f2ed48ea701e8ab6e5b870a3d125b71a make-3.82-expensive_glob.patch
-89f8032d2f314eb6338739f024d8ecec make-3.82-parallel-remake.patch
-97c9f064c4006c41f29d67febda858af make-3.82-dont-prune-intermediate.patch
-1d175e00f931b7d866d2fddcf0c0b302 make-3.82-arg-list-length.patch
-e81f80bec1a613299fb5aa8f244e620a fix-atexit-exit.patch
-c5b90dd539b5950ac2cf502f266c66aa use-malloc.patch"
-sha256sums="e2c1a73f179c40c71e2fe8abf8a8a0688b8499538512984da4a76958d0402966 make-3.82.tar.bz2
-3860600de372c1f9f979f57170b14ae682847d6b9ecef24bb78d8a166e611338 make-3.82-savannah-bugs-30612-30723.patch
-d85e18a4e53456f7c1c3e9c413e6bc150cf67cd6a3830aae4130f52ce841fedc make-3.82-copy-on-expand.patch
-79b8e0c1edb1a4d0199dab98ac171c9b58f21fd3fc15659938cf3c8e76806178 make-3.82-memory-corruption.patch
-505ca52d0ecfa452a93139bbe1485ea9441c38f3dea0e99687c6bf0fe728a3d6 make-3.82-jobserver.patch
-df7775de5c97ecfe35df0c6abdf30d607484effbd2ebcee9d285c1c1c2b9935c make-3.82-expensive_glob.patch
-17d7749144be57e7bdec7e2d1bd8cc4f183350ff4271adf91cc3654e3b8c99ba make-3.82-parallel-remake.patch
-bba70ca6589f5afe8f1cf5b2f9cbec54fdbbf5685188ff0ebe5100034ee17b58 make-3.82-dont-prune-intermediate.patch
-797cd4461687372e74881dd28059ad96fd2cdbf0f14c7aa3470019a8d8c1966f make-3.82-arg-list-length.patch
-625ea26da3d85b4c705f7de38ce95637eb5e845cfd2713e76702e8f431ebe3de fix-atexit-exit.patch
-f3c6711071100e0e6f935a74dc60c05a66f77b011c13f2116853c3e5e6099187 use-malloc.patch"
-sha512sums="3260be0d1a9a7c5eb0dbb87179a9a9521fdfc7809ca51f13ee5a37ba5e63d21ad50a4249ec7d3929a9d0ce8c8f6cf302558743964f0f7ff742efe283b91df9de make-3.82.tar.bz2
-3ce82573396ccdbe22f24b7bea1bd1b74b2dd902bf13cbfa501215f24b736674db78d35e637a9e1cc261471fc15eb5d6862c0e3d93197ec9905ac0b0949d09ac make-3.82-savannah-bugs-30612-30723.patch
-65437ed314dc16b36fc88ddd86ca04961144753d89da0fba634a8161c4560efc3ecfe7c1cebef7c3a971ac7aba8ea7fc7dd1593daf5ee4222712ae7513048379 make-3.82-copy-on-expand.patch
-20b0e0141046812bf253ba5a15f7079deeae86ee8103002621c4e1916c71f03cf9146308119478837b3a4009c4fd5372ef472b595577ea7b358fc21ee819dbb8 make-3.82-memory-corruption.patch
-71bce157e6ee14a4b01705fce23839f0519d4fab052704fef6c0a4b5245a37954b595b0a93e4a320ef878efdd4802950c75782f10cb86a1277782144a6acc590 make-3.82-jobserver.patch
-130b7afd1bc78ddf93c4d6f1d8b56e35365bbfb49e13de098fa6548b4c5e9628d188864d085899b87d81823c3c5faf862a64c59a7b48f20f3601e74b0592b606 make-3.82-expensive_glob.patch
-89217ad37e77944cee4cb81b074bbdb8f047132cb7987c2af3c6b577b13bae079d0dcad548402bcf85865d890acabec4447dcaceb8f44c58cec2325bd59427d5 make-3.82-parallel-remake.patch
-0e522677e8f62cca4aca26fbe22b1a5da5006a5459fe7b0a22c2d8ca358457ea8c0652eae052d3372967b631e68bdecdf0662e2219755b29e480766d0f0a23cd make-3.82-dont-prune-intermediate.patch
-b9623dd57116b2e660e004676338fb3c28557f0f1d4756b29b8b50eddb1beed4a7df7bd2bf1c9066c10110c2ff0331c012ade40bfd47b7ec4839ba94d6442d8a make-3.82-arg-list-length.patch
-1031f252065325aa5bf66d9248a29b10d3f95ccfd8101de43a31b983411edf29f7b77bb5e4d7662a5d1dae8cd6b5f11d74676f4b8e4f010e676a6c8203216d51 fix-atexit-exit.patch
-e583971aae1569c04529db347e56eb84ec4cc9edf17e0b66999c595a211206939adf47bb3b72d66bb92b59159f59009f9a345dadcb9a2667639a2b901878e25d use-malloc.patch"
+md5sums="571d470a7647b455e3af3f92d79f1c18 make-4.0.tar.bz2
+5d7764fa6d9c0cb9764e8d4d2c77d5c3 fix-atexit-exit.patch"
+sha256sums="e60686c7afede62cc8c86ad3012cf081ea4887daf9d223ce7115703b2bb2dbdb make-4.0.tar.bz2
+5547bdccf4e4941de9e155c8bdb01e5b9a7a8536dcdce0b277f5f5e29f416076 fix-atexit-exit.patch"
+sha512sums="82de265963cd08701491e02a4917cd2097762657257a9508119e5847050d0cb15580c163159463e822860435c5910190677d8e4aba644ba75df2895f26117376 make-4.0.tar.bz2
+da0a54038eb40a8cd8d092298fc8a6b16c33f72dc9a7739bc9bafbb0c66eb17e25f078f75010d34f0df9c62f505a3c3ab0a9795259064a9e5785d25ffbc79318 fix-atexit-exit.patch"
diff --git a/main/make/fix-atexit-exit.patch b/main/make/fix-atexit-exit.patch
index dd7cc25f79..1507a2a3b0 100644
--- a/main/make/fix-atexit-exit.patch
+++ b/main/make/fix-atexit-exit.patch
@@ -4,9 +4,9 @@ POSIX says the behaviour is undefined if atexit callback calls
exit(). On glibc it works, but on musl it does not. Call instead
_exit() which is guaranteed to work.
---- make-3.82.orig/misc.c
-+++ make-3.82/misc.c
-@@ -954,6 +954,6 @@
+--- make-4.0/output.c.orig 2013-10-06 02:12:24.000000000 +0300
++++ make-4.0/output.c 2013-10-18 15:43:23.502563018 +0300
+@@ -515,7 +515,7 @@
error (NILF, _("write error: %s"), strerror (errno));
else
error (NILF, _("write error"));
@@ -14,3 +14,5 @@ _exit() which is guaranteed to work.
+ _exit (EXIT_FAILURE);
}
}
+
+
diff --git a/main/make/make-3.82-arg-list-length.patch b/main/make/make-3.82-arg-list-length.patch
deleted file mode 100644
index 1b59da79eb..0000000000
--- a/main/make/make-3.82-arg-list-length.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-diff -u make-3.82-orig/job.c make-3.82/job.c
---- make-3.82-orig/job.c 2010-07-24 10:27:50.000000000 +0200
-+++ make-3.82/job.c 2012-03-21 12:34:20.000000000 +0100
-@@ -29,6 +29,11 @@
-
- #include <string.h>
-
-+//#if defined (HAVE_LINUX_BINFMTS_H) && defined (HAVE_SYS_USER_H)
-+#include <sys/user.h>
-+#include <linux/binfmts.h>
-+//#endif
-+
- /* Default shell to use. */
- #ifdef WINDOWS32
- #include <windows.h>
-@@ -2795,6 +2800,7 @@
- unsigned int sflags_len = strlen (shellflags);
- char *command_ptr = NULL; /* used for batch_mode_shell mode */
- char *new_line;
-+ char *args_ptr;
-
- # ifdef __EMX__ /* is this necessary? */
- if (!unixy_shell)
-@@ -2865,8 +2871,17 @@
- return new_argv;
- }
-
-+#ifdef MAX_ARG_STRLEN
-+ static char eval_line[] = "eval\\ \\\"set\\ x\\;\\ shift\\;\\ ";
-+#define ARG_NUMBER_DIGITS 5
-+#define EVAL_LEN (sizeof(eval_line)-1 + shell_len + 4 \
-+ + (7 + ARG_NUMBER_DIGITS) * 2 * line_len / (MAX_ARG_STRLEN - 2))
-+#else
-+#define EVAL_LEN 0
-+#endif
-+
- new_line = alloca (shell_len + 1 + sflags_len + 1
-- + (line_len*2) + 1);
-+ + (line_len*2) + 1 + EVAL_LEN);
- ap = new_line;
- memcpy (ap, shell, shell_len);
- ap += shell_len;
-@@ -2875,6 +2890,30 @@
- ap += sflags_len;
- *(ap++) = ' ';
- command_ptr = ap;
-+
-+#if !defined (WINDOWS32) && defined (MAX_ARG_STRLEN)
-+ if (unixy_shell && line_len > MAX_ARG_STRLEN)
-+ {
-+ unsigned j;
-+ memcpy (ap, eval_line, sizeof (eval_line) - 1);
-+ ap += sizeof (eval_line) - 1;
-+ for (j = 1; j <= 2 * line_len / (MAX_ARG_STRLEN - 2); j++)
-+ ap += sprintf (ap, "\\$\\{%u\\}", j);
-+ *ap++ = '\\';
-+ *ap++ = '"';
-+ *ap++ = ' ';
-+ /* Copy only the first word of SHELL to $0. */
-+ for (p = shell; *p != '\0'; ++p)
-+ {
-+ if (isspace ((unsigned char)*p))
-+ break;
-+ *ap++ = *p;
-+ }
-+ *ap++ = ' ';
-+ }
-+#endif
-+ args_ptr = ap;
-+
- for (p = line; *p != '\0'; ++p)
- {
- if (restp != NULL && *p == '\n')
-@@ -2922,6 +2961,14 @@
- }
- #endif
- *ap++ = *p;
-+
-+#if !defined (WINDOWS32) && defined (MAX_ARG_STRLEN)
-+ if (unixy_shell && line_len > MAX_ARG_STRLEN && (ap - args_ptr > MAX_ARG_STRLEN - 2))
-+ {
-+ *ap++ = ' ';
-+ args_ptr = ap;
-+ }
-+#endif
- }
- if (ap == new_line + shell_len + sflags_len + 2)
- /* Line was empty. */
-
diff --git a/main/make/make-3.82-copy-on-expand.patch b/main/make/make-3.82-copy-on-expand.patch
deleted file mode 100644
index bcefa763be..0000000000
--- a/main/make/make-3.82-copy-on-expand.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-fix from upstream cvs
-
-----------------------------
-revision 1.58
-date: 2011-08-29 12:20:19 -0400; author: psmith; state: Exp; lines: +7 -13; commitid: MdH0jSxpuIy7mqxv;
-Save strings we're expanding in case an embedded eval causes them
-to be freed (if they're the value of a variable that's reset for example).
-See Savannah patch #7534
-
-Index: expand.c
-===================================================================
-RCS file: /sources/make/make/expand.c,v
-retrieving revision 1.57
-retrieving revision 1.58
-diff -u -p -r1.57 -r1.58
---- ./expand.c 7 May 2011 20:03:49 -0000 1.57
-+++ ./expand.c 29 Aug 2011 16:20:19 -0000 1.58
-@@ -197,7 +197,7 @@ variable_expand_string (char *line, cons
- {
- struct variable *v;
- const char *p, *p1;
-- char *abuf = NULL;
-+ char *save;
- char *o;
- unsigned int line_offset;
-
-@@ -212,16 +212,11 @@ variable_expand_string (char *line, cons
- return (variable_buffer);
- }
-
-- /* If we want a subset of the string, allocate a temporary buffer for it.
-- Most of the functions we use here don't work with length limits. */
-- if (length > 0 && string[length] != '\0')
-- {
-- abuf = xmalloc(length+1);
-- memcpy(abuf, string, length);
-- abuf[length] = '\0';
-- string = abuf;
-- }
-- p = string;
-+ /* We need a copy of STRING: due to eval, it's possible that it will get
-+ freed as we process it (it might be the value of a variable that's reset
-+ for example). Also having a nil-terminated string is handy. */
-+ save = length < 0 ? xstrdup (string) : xstrndup (string, length);
-+ p = save;
-
- while (1)
- {
-@@ -411,8 +406,7 @@ variable_expand_string (char *line, cons
- ++p;
- }
-
-- if (abuf)
-- free (abuf);
-+ free (save);
-
- variable_buffer_output (o, "", 1);
- return (variable_buffer + line_offset);
diff --git a/main/make/make-3.82-dont-prune-intermediate.patch b/main/make/make-3.82-dont-prune-intermediate.patch
deleted file mode 100644
index f5c1d8e481..0000000000
--- a/main/make/make-3.82-dont-prune-intermediate.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-2012-09-09 Paul Smith <psmith@gnu.org>
-
- * remake.c (update_file_1): Force intermediate files to be
- considered, not pruned, if their non-intermediate parent needs to
- be remade. Fixes Savannah bug #30653.
-
-Index: remake.c
-===================================================================
-RCS file: /sources/make/make/remake.c,v
-retrieving revision 1.153
-retrieving revision 1.154
-diff -u -r1.153 -r1.154
---- ./remake.c 5 Mar 2012 14:10:45 -0000 1.153
-+++ ./remake.c 10 Sep 2012 02:36:05 -0000 1.154
-@@ -612,6 +612,10 @@
- d->file->dontcare = file->dontcare;
- }
-
-+ /* We may have already considered this file, when we didn't know
-+ we'd need to update it. Force update_file() to consider it and
-+ not prune it. */
-+ d->file->considered = !considered;
-
- dep_status |= update_file (d->file, depth);
-
-Index: tests/scripts/features/parallelism
-===================================================================
-RCS file: /sources/make/make/tests/scripts/features/parallelism,v
-retrieving revision 1.19
-retrieving revision 1.20
-diff -u -r1.19 -r1.20
---- ./tests/scripts/features/parallelism 4 Mar 2012 00:24:32 -0000 1.19
-+++ ./tests/scripts/features/parallelism 10 Sep 2012 02:36:05 -0000 1.20
-@@ -214,6 +214,23 @@
- rmfiles(qw(foo.y foo.y.in main.bar));
- }
-
-+# Ensure intermediate/secondary files are not pruned incorrectly.
-+# See Savannah bug #30653
-+
-+utouch(-15, 'file2');
-+utouch(-10, 'file4');
-+utouch(-5, 'file1');
-+
-+run_make_test(q!
-+.INTERMEDIATE: file3
-+file4: file3 ; @mv -f $< $@
-+file3: file2 ; touch $@
-+file2: file1 ; @touch $@
-+!,
-+ '--no-print-directory -j2', "touch file3");
-+
-+#rmfiles('file1', 'file2', 'file3', 'file4');
-+
- if ($all_tests) {
- # Jobserver FD handling is messed up in some way.
- # Savannah bug #28189
diff --git a/main/make/make-3.82-expensive_glob.patch b/main/make/make-3.82-expensive_glob.patch
deleted file mode 100644
index 65806fdf2b..0000000000
--- a/main/make/make-3.82-expensive_glob.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-Index: read.c
-===================================================================
-RCS file: /sources/make/make/read.c,v
-retrieving revision 1.198
-retrieving revision 1.200
-diff -u -r1.198 -r1.200
---- ./read.c 29 Apr 2011 15:27:39 -0000 1.198
-+++ ./read.c 7 May 2011 14:36:12 -0000 1.200
-@@ -2901,6 +2901,7 @@
- const char *name;
- const char **nlist = 0;
- char *tildep = 0;
-+ int globme = 1;
- #ifndef NO_ARCHIVES
- char *arname = 0;
- char *memname = 0;
-@@ -3109,32 +3110,40 @@
- }
- #endif /* !NO_ARCHIVES */
-
-- switch (glob (name, GLOB_NOSORT|GLOB_ALTDIRFUNC, NULL, &gl))
-- {
-- case GLOB_NOSPACE:
-- fatal (NILF, _("virtual memory exhausted"));
--
-- case 0:
-- /* Success. */
-- i = gl.gl_pathc;
-- nlist = (const char **)gl.gl_pathv;
-- break;
--
-- case GLOB_NOMATCH:
-- /* If we want only existing items, skip this one. */
-- if (flags & PARSEFS_EXISTS)
-- {
-- i = 0;
-- break;
-- }
-- /* FALLTHROUGH */
--
-- default:
-- /* By default keep this name. */
-+ /* glob() is expensive: don't call it unless we need to. */
-+ if (!(flags & PARSEFS_EXISTS) && strpbrk (name, "?*[") == NULL)
-+ {
-+ globme = 0;
- i = 1;
- nlist = &name;
-- break;
-- }
-+ }
-+ else
-+ switch (glob (name, GLOB_NOSORT|GLOB_ALTDIRFUNC, NULL, &gl))
-+ {
-+ case GLOB_NOSPACE:
-+ fatal (NILF, _("virtual memory exhausted"));
-+
-+ case 0:
-+ /* Success. */
-+ i = gl.gl_pathc;
-+ nlist = (const char **)gl.gl_pathv;
-+ break;
-+
-+ case GLOB_NOMATCH:
-+ /* If we want only existing items, skip this one. */
-+ if (flags & PARSEFS_EXISTS)
-+ {
-+ i = 0;
-+ break;
-+ }
-+ /* FALLTHROUGH */
-+
-+ default:
-+ /* By default keep this name. */
-+ i = 1;
-+ nlist = &name;
-+ break;
-+ }
-
- /* For each matched element, add it to the list. */
- while (i-- > 0)
-@@ -3174,7 +3183,8 @@
- #endif /* !NO_ARCHIVES */
- NEWELT (concat (2, prefix, nlist[i]));
-
-- globfree (&gl);
-+ if (globme)
-+ globfree (&gl);
-
- #ifndef NO_ARCHIVES
- if (arname)
-Index: tests/scripts/functions/wildcard
-===================================================================
-RCS file: /sources/make/make/tests/scripts/functions/wildcard,v
-retrieving revision 1.6
-retrieving revision 1.7
-diff -u -r1.6 -r1.7
---- ./tests/scripts/functions/wildcard 13 Jun 2009 21:21:49 -0000 1.6
-+++ ./tests/scripts/functions/wildcard 7 May 2011 14:36:11 -0000 1.7
-@@ -88,4 +88,16 @@
- !,
- '', "\n");
-
-+# TEST #5: wildcard used to verify file existence
-+
-+touch('xxx.yyy');
-+
-+run_make_test(q!exists: ; @echo file=$(wildcard xxx.yyy)!,
-+ '', "file=xxx.yyy\n");
-+
-+unlink('xxx.yyy');
-+
-+run_make_test(q!exists: ; @echo file=$(wildcard xxx.yyy)!,
-+ '', "file=\n");
-+
- 1;
diff --git a/main/make/make-3.82-jobserver.patch b/main/make/make-3.82-jobserver.patch
deleted file mode 100644
index 2a855031dd..0000000000
--- a/main/make/make-3.82-jobserver.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-diff -up make-3.82/main.c\~ make-3.82/main.c
---- make-3.82/main.c~ 2010-08-12 14:59:20.000000000 +0200
-+++ make-3.82/main.c 2010-08-12 15:00:07.000000000 +0200
-@@ -1756,8 +1756,11 @@ main (int argc, char **argv, char **envp
-
- if (job_slots > 0)
- {
-- close (job_fds[0]);
-- close (job_fds[1]);
-+ if (restarts == 0)
-+ {
-+ close (job_fds[0]);
-+ close (job_fds[1]);
-+ }
- job_fds[0] = job_fds[1] = -1;
- free (jobserver_fds->list);
- free (jobserver_fds);
-
-Diff finished. Thu Aug 12 15:00:22 2010
diff --git a/main/make/make-3.82-memory-corruption.patch b/main/make/make-3.82-memory-corruption.patch
deleted file mode 100644
index b52dd6e0b9..0000000000
--- a/main/make/make-3.82-memory-corruption.patch
+++ /dev/null
@@ -1,37 +0,0 @@
---- ./function.c 2011/04/18 01:25:20 1.121
-+++ ./function.c 2011/05/02 12:35:01 1.122
-@@ -706,7 +706,7 @@
- const char *word_iterator = argv[0];
- char buf[20];
-
-- while (find_next_token (&word_iterator, (unsigned int *) 0) != 0)
-+ while (find_next_token (&word_iterator, NULL) != 0)
- ++i;
-
- sprintf (buf, "%d", i);
-@@ -1133,21 +1133,14 @@
-
- /* Find the maximum number of words we'll have. */
- t = argv[0];
-- wordi = 1;
-- while (*t != '\0')
-+ wordi = 0;
-+ while ((p = find_next_token (&t, NULL)) != 0)
- {
-- char c = *(t++);
--
-- if (! isspace ((unsigned char)c))
-- continue;
--
-+ ++t;
- ++wordi;
--
-- while (isspace ((unsigned char)*t))
-- ++t;
- }
-
-- words = xmalloc (wordi * sizeof (char *));
-+ words = xmalloc ((wordi == 0 ? 1 : wordi) * sizeof (char *));
-
- /* Now assign pointers to each string in the array. */
- t = argv[0];
diff --git a/main/make/make-3.82-parallel-remake.patch b/main/make/make-3.82-parallel-remake.patch
deleted file mode 100644
index 923e60ba24..0000000000
--- a/main/make/make-3.82-parallel-remake.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-fix from upstream cvs
-
-----------------------------
-revision 1.247
-date: 2011-09-18 19:39:26 -0400; author: psmith; state: Exp; lines: +5 -3; commitid: 07NxO4T5PiWC82Av;
-When we re-exec the master makefile in a jobserver environment, ensure
-that MAKEFLAGS is set properly so the re-exec'd make runs in parallel.
-See Savannah bug #33873.
-
-Index: main.c
-===================================================================
-RCS file: /sources/make/make/main.c,v
-retrieving revision 1.246
-retrieving revision 1.247
-diff -u -p -r1.246 -r1.247
---- ./main.c 29 Aug 2010 23:05:27 -0000 1.246
-+++ ./main.c 18 Sep 2011 23:39:26 -0000 1.247
-@@ -2089,6 +2089,11 @@ main (int argc, char **argv, char **envp
-
- ++restarts;
-
-+ /* If we're re-exec'ing the first make, put back the number of
-+ job slots so define_makefiles() will get it right. */
-+ if (master_job_slots)
-+ job_slots = master_job_slots;
-+
- /* Reset makeflags in case they were changed. */
- {
- const char *pv = define_makeflags (1, 1);
-@@ -2825,9 +2830,6 @@ define_makeflags (int all, int makefile)
- && (*(unsigned int *) cs->value_ptr ==
- *(unsigned int *) cs->noarg_value))
- ADD_FLAG ("", 0); /* Optional value omitted; see below. */
-- else if (cs->c == 'j')
-- /* Special case for `-j'. */
-- ADD_FLAG ("1", 1);
- else
- {
- char *buf = alloca (30);
diff --git a/main/make/make-3.82-savannah-bugs-30612-30723.patch b/main/make/make-3.82-savannah-bugs-30612-30723.patch
deleted file mode 100644
index 1b09825479..0000000000
--- a/main/make/make-3.82-savannah-bugs-30612-30723.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-diff -Naur make-3.82-orig/main.c make-3.82/main.c
---- make-3.82-orig/main.c 2010-07-19 14:10:53.000000000 +0700
-+++ make-3.82/main.c 2011-01-12 21:31:30.114891591 +0700
-@@ -1,3 +1,4 @@
-+
- /* Argument parsing and main program of GNU Make.
- Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
- 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-@@ -1138,7 +1139,7 @@
- a macro and some compilers (MSVC) don't like conditionals in macros. */
- {
- const char *features = "target-specific order-only second-expansion"
-- " else-if shortest-stem undefine"
-+ " else-if shortest-stem undefine oneshell"
- #ifndef NO_ARCHIVES
- " archives"
- #endif
-@@ -2093,7 +2094,7 @@
- const char *pv = define_makeflags (1, 1);
- char *p = alloca (sizeof ("MAKEFLAGS=") + strlen (pv) + 1);
- sprintf (p, "MAKEFLAGS=%s", pv);
-- putenv (p);
-+ putenv (allocated_variable_expand (p));
- }
-
- if (ISDB (DB_BASIC))
-diff -Naur make-3.82-orig/read.c make-3.82/read.c
---- make-3.82-orig/read.c 2010-07-13 08:20:42.000000000 +0700
-+++ make-3.82/read.c 2011-01-12 21:31:23.497486028 +0700
-@@ -3028,7 +3028,7 @@
- {
- /* This looks like the first element in an open archive group.
- A valid group MUST have ')' as the last character. */
-- const char *e = p + nlen;
-+ const char *e = p;
- do
- {
- e = next_token (e);
-@@ -3084,19 +3084,19 @@
- Go to the next item in the string. */
- if (flags & PARSEFS_NOGLOB)
- {
-- NEWELT (concat (2, prefix, tp));
-+ NEWELT (concat (2, prefix, tmpbuf));
- continue;
- }
-
- /* If we get here we know we're doing glob expansion.
- TP is a string in tmpbuf. NLEN is no longer used.
- We may need to do more work: after this NAME will be set. */
-- name = tp;
-+ name = tmpbuf;
-
- /* Expand tilde if applicable. */
-- if (tp[0] == '~')
-+ if (tmpbuf[0] == '~')
- {
-- tildep = tilde_expand (tp);
-+ tildep = tilde_expand (tmpbuf);
- if (tildep != 0)
- name = tildep;
- }
-@@ -3152,7 +3152,11 @@
- else
- {
- /* We got a chain of items. Attach them. */
-- (*newp)->next = found;
-+ if (*newp)
-+ (*newp)->next = found;
-+ else
-+ *newp = found;
-+
-
- /* Find and set the new end. Massage names if necessary. */
- while (1)
diff --git a/main/make/make-3.82-weird-shell.patch b/main/make/make-3.82-weird-shell.patch
deleted file mode 100644
index dfdaf89c9e..0000000000
--- a/main/make/make-3.82-weird-shell.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff -up make-3.82/job.c\~ make-3.82/job.c
---- make-3.82/job.c~ 2010-08-11 16:13:33.000000000 +0200
-+++ make-3.82/job.c 2010-08-12 14:20:08.000000000 +0200
-@@ -2442,7 +2442,11 @@ construct_command_argv_internal (char *l
-
- /* See if it is safe to parse commands internally. */
- if (shell == 0)
-- shell = default_shell;
-+ {
-+ shell = default_shell;
-+ if (shellflags == 0)
-+ shellflags = "-c";
-+ }
- #ifdef WINDOWS32
- else if (strcmp (shell, default_shell))
- {
diff --git a/main/make/use-malloc.patch b/main/make/use-malloc.patch
deleted file mode 100644
index dfda84c606..0000000000
--- a/main/make/use-malloc.patch
+++ /dev/null
@@ -1,32 +0,0 @@
---- ./job.c.orig
-+++ ./job.c
-@@ -2880,7 +2880,7 @@
- #define EVAL_LEN 0
- #endif
-
-- new_line = alloca (shell_len + 1 + sflags_len + 1
-+ new_line = xmalloc (shell_len + 1 + sflags_len + 1
- + (line_len*2) + 1 + EVAL_LEN);
- ap = new_line;
- memcpy (ap, shell, shell_len);
-@@ -2970,9 +2970,11 @@
- }
- #endif
- }
-- if (ap == new_line + shell_len + sflags_len + 2)
-+ if (ap == new_line + shell_len + sflags_len + 2) {
- /* Line was empty. */
-+ free (new_line);
- return 0;
-+ }
- *ap = '\0';
-
- #ifdef WINDOWS32
-@@ -3112,6 +3114,7 @@
- fatal (NILF, _("%s (line %d) Bad shell context (!unixy && !batch_mode_shell)\n"),
- __FILE__, __LINE__);
- #endif
-+ free (new_line);
- }
- #endif /* ! AMIGA */
-