diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-02-11 16:09:52 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-02-11 16:09:52 +0000 |
commit | f78108598211053d41752a83e0345441bb9014ae (patch) | |
tree | dd2fc7ae0a1aea7bda4942ab0c453d1e55284b37 /sys-devel/make/files | |
parent | dc45b83b28fb83e9659492066e347b8dc60bc9e3 (diff) |
gentoo resync : 11.02.2018
Diffstat (limited to 'sys-devel/make/files')
20 files changed, 121 insertions, 1004 deletions
diff --git a/sys-devel/make/files/3.80-memory.patch b/sys-devel/make/files/3.80-memory.patch deleted file mode 100644 index 663acf52d77c..000000000000 --- a/sys-devel/make/files/3.80-memory.patch +++ /dev/null @@ -1,77 +0,0 @@ -Index: variable.h -=================================================================== -RCS file: /cvsroot/make/make/variable.h,v -retrieving revision 1.24 -diff -u -B -b -r1.24 variable.h ---- variable.h 8 Aug 2002 00:11:19 -0000 1.24 -+++ variable.h 25 Oct 2002 21:37:32 -0000 -@@ -107,6 +107,8 @@ - extern char *expand_argument PARAMS ((char *str, char *end)); - extern char *variable_expand_string PARAMS ((char *line, char *string, - long length)); -+extern void install_variable_buffer PARAMS ((char **bufp, unsigned int *lenp)); -+extern void restore_variable_buffer PARAMS ((char *buf, unsigned int len)); - - /* function.c */ - extern int handle_function PARAMS ((char **op, char **stringp)); -Index: expand.c -=================================================================== -RCS file: /cvsroot/make/make/expand.c,v -retrieving revision 1.33 -diff -u -B -b -r1.33 expand.c ---- expand.c 14 Oct 2002 21:54:04 -0000 1.33 -+++ expand.c 25 Oct 2002 21:37:32 -0000 -@@ -545,3 +545,28 @@ - - return value; - } -+ -+/* Install a new variable_buffer context, returning the current one for -+ safe-keeping. */ -+ -+void -+install_variable_buffer (char **bufp, unsigned int *lenp) -+{ -+ *bufp = variable_buffer; -+ *lenp = variable_buffer_length; -+ -+ variable_buffer = 0; -+ initialize_variable_output (); -+} -+ -+/* Restore a previously-saved variable_buffer setting (free the current one). -+ */ -+ -+void -+restore_variable_buffer (char *buf, unsigned int len) -+{ -+ free (variable_buffer); -+ -+ variable_buffer = buf; -+ variable_buffer_length = len; -+} -Index: function.c -=================================================================== -RCS file: /cvsroot/make/make/function.c,v -retrieving revision 1.71 -diff -u -B -b -r1.71 function.c ---- function.c 14 Oct 2002 21:54:04 -0000 1.71 -+++ function.c 25 Oct 2002 21:37:32 -0000 -@@ -1196,7 +1196,17 @@ - static char * - func_eval (char *o, char **argv, const char *funcname) - { -+ char *buf; -+ unsigned int len; -+ -+ /* Eval the buffer. Pop the current variable buffer setting so that the -+ eval'd code can use its own without conflicting. */ -+ -+ install_variable_buffer (&buf, &len); -+ - eval_buffer (argv[0]); -+ -+ restore_variable_buffer (buf, len); - - return o; - }
\ No newline at end of file diff --git a/sys-devel/make/files/make-3.80-conditional-eval.patch b/sys-devel/make/files/make-3.80-conditional-eval.patch deleted file mode 100644 index f4c1581f316f..000000000000 --- a/sys-devel/make/files/make-3.80-conditional-eval.patch +++ /dev/null @@ -1,157 +0,0 @@ -Fix from upstream - -https://savannah.gnu.org/bugs/index.php?func=detailitem&item_id=1516 -http://bugs.gentoo.org/123317 - -Index: read.c -=================================================================== -RCS file: /cvsroot/make/make/read.c,v -retrieving revision 1.124 -retrieving revision 1.125 -diff -u -p -r1.124 -r1.125 ---- read.c 14 Oct 2002 21:54:04 -0000 1.124 -+++ read.c 25 Oct 2002 22:01:47 -0000 1.125 -@@ -272,6 +272,34 @@ read_all_makefiles (char **makefiles) - return read_makefiles; - } - -+/* Install a new conditional and return the previous one. */ -+ -+static struct conditionals * -+install_conditionals (struct conditionals *new) -+{ -+ struct conditionals *save = conditionals; -+ -+ bzero ((char *) new, sizeof (*new)); -+ conditionals = new; -+ -+ return save; -+} -+ -+/* Free the current conditionals and reinstate a saved one. */ -+ -+static void -+restore_conditionals (struct conditionals *saved) -+{ -+ /* Free any space allocated by conditional_line. */ -+ if (conditionals->ignoring) -+ free (conditionals->ignoring); -+ if (conditionals->seen_else) -+ free (conditionals->seen_else); -+ -+ /* Restore state. */ -+ conditionals = saved; -+} -+ - static int - eval_makefile (char *filename, int flags) - { -@@ -388,6 +416,8 @@ int - eval_buffer (char *buffer) - { - struct ebuffer ebuf; -+ struct conditionals *saved; -+ struct conditionals new; - const struct floc *curfile; - int r; - -@@ -402,8 +432,12 @@ eval_buffer (char *buffer) - curfile = reading_file; - reading_file = &ebuf.floc; - -+ saved = install_conditionals (&new); -+ - r = eval (&ebuf, 1); - -+ restore_conditionals (saved); -+ - reading_file = curfile; - - return r; -@@ -412,13 +446,8 @@ eval_buffer (char *buffer) - - /* Read file FILENAME as a makefile and add its contents to the data base. - -- SET_DEFAULT is true if we are allowed to set the default goal. -+ SET_DEFAULT is true if we are allowed to set the default goal. */ - -- FILENAME is added to the `read_makefiles' chain. -- -- Returns 0 if a file was not found or not read. -- Returns 1 if FILENAME was found and read. -- Returns 2 if FILENAME was read, and we kept a reference (don't free it). */ - - static int - eval (struct ebuffer *ebuf, int set_default) -@@ -782,9 +811,7 @@ eval (struct ebuffer *ebuf, int set_defa - - /* Save the state of conditionals and start - the included makefile with a clean slate. */ -- save = conditionals; -- bzero ((char *) &new_conditionals, sizeof new_conditionals); -- conditionals = &new_conditionals; -+ save = install_conditionals (&new_conditionals); - - /* Record the rules that are waiting so they will determine - the default goal before those in the included makefile. */ -@@ -810,14 +837,8 @@ eval (struct ebuffer *ebuf, int set_defa - } - } - -- /* Free any space allocated by conditional_line. */ -- if (conditionals->ignoring) -- free (conditionals->ignoring); -- if (conditionals->seen_else) -- free (conditionals->seen_else); -- -- /* Restore state. */ -- conditionals = save; -+ /* Restore conditional state. */ -+ restore_conditionals (save); - - goto rule_complete; - } -Index: tests/scripts/functions/eval -=================================================================== -RCS file: /cvsroot/make/make/tests/scripts/functions/eval,v -retrieving revision 1.1 -retrieving revision 1.2 -diff -u -p -r1.1 -r1.2 ---- tests/scripts/functions/eval 8 Jul 2002 02:26:48 -0000 1.1 -+++ tests/scripts/functions/eval 25 Oct 2002 22:01:47 -0000 1.2 -@@ -57,4 +57,35 @@ $answer = "A = A B = B\n"; - - &compare_output($answer,&get_logfile(1)); - -+# Test to make sure eval'ing inside conditionals works properly -+ -+$makefile3 = &get_tmpfile; -+ -+open(MAKEFILE,"> $makefile3"); -+ -+print MAKEFILE <<'EOF'; -+FOO = foo -+ -+all:: ; @echo it -+ -+define Y -+ all:: ; @echo worked -+endef -+ -+ifdef BAR -+$(eval $(Y)) -+endif -+ -+EOF -+ -+close(MAKEFILE); -+ -+&run_make_with_options($makefile3, "", &get_logfile); -+$answer = "it\n"; -+&compare_output($answer,&get_logfile(1)); -+ -+&run_make_with_options($makefile3, "BAR=1", &get_logfile); -+$answer = "it\nworked\n"; -+&compare_output($answer,&get_logfile(1)); -+ - 1; diff --git a/sys-devel/make/files/make-3.80-parallel-build-failure.patch b/sys-devel/make/files/make-3.80-parallel-build-failure.patch deleted file mode 100644 index 717e0f3556ce..000000000000 --- a/sys-devel/make/files/make-3.80-parallel-build-failure.patch +++ /dev/null @@ -1,59 +0,0 @@ -http://lists.gnu.org/archive/html/bug-make/2005-07/msg00050.html -http://lists.gnu.org/archive/html/bug-make/2005-08/msg00019.html -http://bugs.gentoo.org/107613 - -2005-08-07 Paul D. Smith <psmith@gnu.org> - - Fix a bug reported by Michael Matz <matz@suse.de>: patch included. - If make is running in parallel without -k and two jobs die in a - row, but not too close to each other, then make will quit without - waiting for the rest of the jobs to die. - - * main.c (die): Don't reset err before calling reap_children() the - second time: we still want it to be in the error condition. - * job.c (reap_children): Use a static variable, rather than err, - to control whether or not the error message should be printed. - -Index: job.c -=================================================================== -RCS file: /cvsroot/make/make/job.c,v -retrieving revision 1.166 -retrieving revision 1.167 -diff -u -p -r1.166 -r1.167 ---- job.c 26 Jun 2005 03:31:30 -0000 1.166 -+++ job.c 8 Aug 2005 05:08:00 -0000 1.167 -@@ -475,9 +479,14 @@ reap_children (int block, int err) - - if (err && block) - { -- /* We might block for a while, so let the user know why. */ -+ static int printed = 0; -+ -+ /* We might block for a while, so let the user know why. -+ Only print this message once no matter how many jobs are left. */ - fflush (stdout); -- error (NILF, _("*** Waiting for unfinished jobs....")); -+ if (!printed) -+ error (NILF, _("*** Waiting for unfinished jobs....")); -+ printed = 1; - } - - /* We have one less dead child to reap. As noted in -Index: main.c -=================================================================== -RCS file: /cvsroot/make/make/main.c,v -retrieving revision 1.210 -retrieving revision 1.211 -diff -u -p -r1.210 -r1.211 ---- main.c 12 Jul 2005 04:35:13 -0000 1.210 -+++ main.c 8 Aug 2005 05:08:00 -0000 1.211 -@@ -2990,7 +2996,8 @@ die (int status) - print_version (); - - /* Wait for children to die. */ -- for (err = (status != 0); job_slots_used > 0; err = 0) -+ err = (status != 0); -+ while (job_slots_used > 0) - reap_children (1, err); - - /* Let the remote job module clean up its state. */ diff --git a/sys-devel/make/files/make-3.81-jobserver.patch b/sys-devel/make/files/make-3.81-jobserver.patch deleted file mode 100644 index cd787ca769d2..000000000000 --- a/sys-devel/make/files/make-3.81-jobserver.patch +++ /dev/null @@ -1,19 +0,0 @@ -related to bug #193258, but this is the final patch that Fedora went with - ---- make-3.81/main.c 2007-09-24 15:28:34.000000000 +0200 -+++ make-3.81-pm/main.c 2007-09-24 15:32:50.000000000 +0200 -@@ -1669,8 +1669,12 @@ 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 --git a/sys-devel/make/files/make-3.81-long-cmdline.patch b/sys-devel/make/files/make-3.81-long-cmdline.patch deleted file mode 100644 index 9ceb5e8195e2..000000000000 --- a/sys-devel/make/files/make-3.81-long-cmdline.patch +++ /dev/null @@ -1,100 +0,0 @@ -http://bugs.gentoo.org/301116 - -tweaked a little to avoid regenerating autotools - -2009-07-29 Ralf Wildenhues <Ralf.Wildenhues <at> gmx.de> - - * configure.in: Check for sys/user.h and linux/binfmts.h - headers. - * job.c: Include them if available. - (construct_command_argv_internal): When constructing the command - line with 'sh -c', use multiple arguments together with eval - expansion to evade the Linux per-argument length limit - MAX_ARG_STRLEN if it is defined. - Problem reported against Automake by Xan Lopez <xan <at> gnome.org>. - ---- job.c.orig 2010-01-15 18:36:53.000000000 +0200 -+++ job.c 2010-01-15 18:41:09.000000000 +0200 -@@ -29,6 +29,15 @@ - - #include <string.h> - -+#if defined(__linux__) /* defined (HAVE_LINUX_BINFMTS_H) && defined (HAVE_SYS_USER_H) */ -+#include <sys/user.h> -+#include <unistd.h> -+#ifndef PAGE_SIZE -+#define PAGE_SIZE sysconf(_SC_PAGE_SIZE) -+#endif -+#include <linux/binfmts.h> -+#endif -+ - /* Default shell to use. */ - #ifdef WINDOWS32 - #include <windows.h> -@@ -2697,9 +2702,19 @@ - #endif - unsigned int line_len = strlen (line); - -+#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 - char *new_line = (char *) alloca (shell_len + (sizeof (minus_c) - 1) -- + (line_len * 2) + 1); -+ + (line_len*2) + 1 + EVAL_LEN); -+ - char *command_ptr = NULL; /* used for batch_mode_shell mode */ -+ char *args_ptr; - - # ifdef __EMX__ /* is this necessary? */ - if (!unixy_shell) -@@ -2712,6 +2727,30 @@ - bcopy (minus_c, ap, sizeof (minus_c) - 1); - ap += sizeof (minus_c) - 1; - 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') -@@ -2760,6 +2799,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 + sizeof (minus_c) - 1) - /* Line was empty. */ diff --git a/sys-devel/make/files/make-3.81-tests-lang.patch b/sys-devel/make/files/make-3.81-tests-lang.patch deleted file mode 100644 index f4e514712a0e..000000000000 --- a/sys-devel/make/files/make-3.81-tests-lang.patch +++ /dev/null @@ -1,55 +0,0 @@ -Fix from upstream for running tests when LC_ALL is set to non-C - -http://bugs.gentoo.org/149147 - -Index: make/tests/run_make_tests.pl -=================================================================== -RCS file: /cvsroot/make/make/tests/run_make_tests.pl,v -retrieving revision 1.22 -retrieving revision 1.23 -diff -u -p -r1.22 -r1.23 ---- make/tests/run_make_tests.pl 8 Mar 2006 20:15:09 -0000 1.22 -+++ make/tests/run_make_tests.pl 1 Oct 2006 05:38:38 -0000 1.23 -@@ -228,11 +228,6 @@ sub set_more_defaults - local($string); - local($index); - -- # Make sure we're in the C locale for those systems that support it, -- # so sorting, etc. is predictable. -- # -- $ENV{LANG} = 'C'; -- - # find the type of the port. We do this up front to have a single - # point of change if it needs to be tweaked. - # -Index: make/tests/test_driver.pl -=================================================================== -RCS file: /cvsroot/make/make/tests/test_driver.pl,v -retrieving revision 1.19 -retrieving revision 1.20 -diff -u -p -r1.19 -r1.20 ---- make/tests/test_driver.pl 10 Mar 2006 02:20:45 -0000 1.19 -+++ make/tests/test_driver.pl 1 Oct 2006 05:38:38 -0000 1.20 -@@ -78,9 +78,9 @@ sub resetENV - sub toplevel - { - # Pull in benign variables from the user's environment -- # -+ - foreach (# UNIX-specific things -- 'TZ', 'LANG', 'TMPDIR', 'HOME', 'USER', 'LOGNAME', 'PATH', -+ 'TZ', 'TMPDIR', 'HOME', 'USER', 'LOGNAME', 'PATH', - # Purify things - 'PURIFYOPTIONS', - # Windows NT-specific stuff -@@ -92,6 +92,10 @@ sub toplevel - $makeENV{$_} = $ENV{$_} if $ENV{$_}; - } - -+ # Make sure our compares are not foiled by locale differences -+ -+ $makeENV{LC_ALL} = 'C'; -+ - # Replace the environment with the new one - # - %origENV = %ENV; diff --git a/sys-devel/make/files/make-3.81-tests-recursion.patch b/sys-devel/make/files/make-3.81-tests-recursion.patch deleted file mode 100644 index 490e2a912cd8..000000000000 --- a/sys-devel/make/files/make-3.81-tests-recursion.patch +++ /dev/null @@ -1,14 +0,0 @@ -http://bugs.gentoo.org/329153 -https://savannah.gnu.org/bugs/index.php?29968 - ---- tests/scripts/features/recursion 2005/02/10 00:10:58 1.2 -+++ tests/scripts/features/recursion 2010/07/01 07:16:00 1.3 -@@ -16,7 +16,7 @@ - @echo MAKELEVEL = $(MAKELEVEL) - @echo THE END - ', -- ('CFLAGS=-O -w' . ($parallel_jobs ? '-j 2' : '')), -+ ('CFLAGS=-O -w' . ($parallel_jobs ? ' -j 2' : '')), - ($vos - ? "#MAKE#: Entering directory `#PWD#' - make 'CFLAGS=-O' -f #MAKEFILE# foo diff --git a/sys-devel/make/files/make-3.82-MAKEFLAGS-reexec.patch b/sys-devel/make/files/make-3.82-MAKEFLAGS-reexec.patch deleted file mode 100644 index a2f59657d4ca..000000000000 --- a/sys-devel/make/files/make-3.82-MAKEFLAGS-reexec.patch +++ /dev/null @@ -1,14 +0,0 @@ -http://bugs.gentoo.org/331975 -https://savannah.gnu.org/bugs/?30723 - ---- main.c 2010/07/19 07:10:53 1.243 -+++ main.c 2010/08/10 07:35:34 1.244 -@@ -2093,7 +2093,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 --git a/sys-devel/make/files/make-3.82-archives-many-objs.patch b/sys-devel/make/files/make-3.82-archives-many-objs.patch deleted file mode 100644 index abdcd3228014..000000000000 --- a/sys-devel/make/files/make-3.82-archives-many-objs.patch +++ /dev/null @@ -1,60 +0,0 @@ -http://bugs.gentoo.org/334889 -https://savannah.gnu.org/bugs/?30612 - -revision 1.194 -date: 2010-08-13 22:50:14 -0400; author: psmith; state: Exp; lines: +9 -6; commitid: 4UaslPqQHZTs5wKu; -- Fix Savannah bug #30612: handling of archive references with >1 object - -Index: read.c -=================================================================== -RCS file: /sources/make/make/read.c,v -retrieving revision 1.193 -retrieving revision 1.194 -diff -u -p -r1.193 -r1.194 ---- read.c 13 Jul 2010 01:20:42 -0000 1.193 -+++ read.c 14 Aug 2010 02:50:14 -0000 1.194 -@@ -3028,7 +3028,7 @@ parse_file_seq (char **stringp, unsigned - { - /* 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 @@ parse_file_seq (char **stringp, unsigned - 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,10 @@ parse_file_seq (char **stringp, unsigned - 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/sys-devel/make/files/make-3.82-construct-command-line.patch b/sys-devel/make/files/make-3.82-construct-command-line.patch deleted file mode 100644 index c504c45291ba..000000000000 --- a/sys-devel/make/files/make-3.82-construct-command-line.patch +++ /dev/null @@ -1,71 +0,0 @@ -https://savannah.gnu.org/bugs/?23922 - -From 6f3684710a0f832533191f8657a57bc2fbba90ba Mon Sep 17 00:00:00 2001 -From: eliz <eliz> -Date: Sat, 7 May 2011 08:29:13 +0000 -Subject: [PATCH] job.c (construct_command_argv_internal): Don't assume - shellflags is always non-NULL. Escape-protect characters - special to the shell when copying the value of SHELL into - new_line. Fixes Savannah bug #23922. - ---- - ChangeLog | 7 +++++++ - job.c | 23 ++++++++++++++++------- - 2 files changed, 23 insertions(+), 7 deletions(-) - -diff --git a/job.c b/job.c -index 67b402d..c2ce84d 100644 ---- a/job.c -+++ b/job.c -@@ -2844,12 +2844,12 @@ construct_command_argv_internal (char *line, char **restp, char *shell, - - unsigned int shell_len = strlen (shell); - unsigned int line_len = strlen (line); -- unsigned int sflags_len = strlen (shellflags); -+ unsigned int sflags_len = shellflags ? strlen (shellflags) : 0; - char *command_ptr = NULL; /* used for batch_mode_shell mode */ - char *new_line; - - # ifdef __EMX__ /* is this necessary? */ -- if (!unixy_shell) -+ if (!unixy_shell && shellflags) - shellflags[0] = '/'; /* "/c" */ - # endif - -@@ -2911,19 +2911,28 @@ construct_command_argv_internal (char *line, char **restp, char *shell, - - new_argv = xmalloc (4 * sizeof (char *)); - new_argv[0] = xstrdup(shell); -- new_argv[1] = xstrdup(shellflags); -+ new_argv[1] = xstrdup(shellflags ? shellflags : ""); - new_argv[2] = line; - new_argv[3] = NULL; - return new_argv; - } - -- new_line = alloca (shell_len + 1 + sflags_len + 1 -+ new_line = alloca ((shell_len*2) + 1 + sflags_len + 1 - + (line_len*2) + 1); - ap = new_line; -- memcpy (ap, shell, shell_len); -- ap += shell_len; -+ /* Copy SHELL, escaping any characters special to the shell. If -+ we don't escape them, construct_command_argv_internal will -+ recursively call itself ad nauseam, or until stack overflow, -+ whichever happens first. */ -+ for (p = shell; *p != '\0'; ++p) -+ { -+ if (strchr (sh_chars, *p) != 0) -+ *(ap++) = '\\'; -+ *(ap++) = *p; -+ } - *(ap++) = ' '; -- memcpy (ap, shellflags, sflags_len); -+ if (shellflags) -+ memcpy (ap, shellflags, sflags_len); - ap += sflags_len; - *(ap++) = ' '; - command_ptr = ap; --- -1.7.12 - diff --git a/sys-devel/make/files/make-3.82-copy-on-expand.patch b/sys-devel/make/files/make-3.82-copy-on-expand.patch deleted file mode 100644 index 3f202b4db96b..000000000000 --- a/sys-devel/make/files/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/sys-devel/make/files/make-3.82-glob-speedup.patch b/sys-devel/make/files/make-3.82-glob-speedup.patch deleted file mode 100644 index c826c2c0e1fa..000000000000 --- a/sys-devel/make/files/make-3.82-glob-speedup.patch +++ /dev/null @@ -1,104 +0,0 @@ -change from upstream to speed up by skipping unused globs -https://bugs.gentoo.org/382845 - -http://cvs.savannah.gnu.org/viewvc/make/read.c?root=make&r1=1.198&r2=1.200 - -Revision 1.200 -Sat May 7 14:36:12 2011 UTC (4 months, 1 week ago) by psmith -Branch: MAIN -Changes since 1.199: +1 -1 lines -Inverted the boolean test from what I wanted it to be. Added a -regression test to make sure this continues to work. - -Revision 1.199 -Mon May 2 00:18:06 2011 UTC (4 months, 2 weeks ago) by psmith -Branch: MAIN -Changes since 1.198: +35 -25 lines -Avoid invoking glob() unless the filename has potential globbing -characters in it, for performance improvements. - ---- a/read.c 2011/04/29 15:27:39 1.198 -+++ b/read.c 2011/05/07 14:36:12 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) diff --git a/sys-devel/make/files/make-3.82-intermediate-parallel.patch b/sys-devel/make/files/make-3.82-intermediate-parallel.patch deleted file mode 100644 index df9b8d475b95..000000000000 --- a/sys-devel/make/files/make-3.82-intermediate-parallel.patch +++ /dev/null @@ -1,62 +0,0 @@ -https://savannah.gnu.org/bugs/?30653 -https://bugs.gentoo.org/431250 - -From d1ba0ee36b2bdd91434b5df90f0f4cceda7d6979 Mon Sep 17 00:00:00 2001 -From: psmith <psmith> -Date: Mon, 10 Sep 2012 02:36:05 +0000 -Subject: [PATCH] Force intermediate targets to be considered if their - non-intermediate parent needs to be remade. Fixes Savannah - bug #30653. - ---- - ChangeLog | 4 ++++ - remake.c | 4 ++++ - tests/scripts/features/parallelism | 17 +++++++++++++++++ - 3 files changed, 25 insertions(+) - -diff --git a/remake.c b/remake.c -index c0bf709..b1ddd23 100644 ---- a/remake.c -+++ b/remake.c -@@ -612,6 +612,10 @@ update_file_1 (struct file *file, unsigned int depth) - 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); - -diff --git a/tests/scripts/features/parallelism b/tests/scripts/features/parallelism -index d4250f0..76d24a7 100644 ---- a/tests/scripts/features/parallelism -+++ b/tests/scripts/features/parallelism -@@ -214,6 +214,23 @@ rm main.x"); - 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 --- -1.7.12 - diff --git a/sys-devel/make/files/make-3.82-long-command-line.patch b/sys-devel/make/files/make-3.82-long-command-line.patch deleted file mode 100644 index 9266786e4da7..000000000000 --- a/sys-devel/make/files/make-3.82-long-command-line.patch +++ /dev/null @@ -1,54 +0,0 @@ -https://savannah.gnu.org/bugs/?36451 - -From a95796de3a491d8acfc8ea94c217b90531161786 Mon Sep 17 00:00:00 2001 -From: psmith <psmith> -Date: Sun, 9 Sep 2012 23:25:07 +0000 -Subject: [PATCH] Keep the command line on the heap to avoid stack overflow. - Fixes Savannah bug #36451. - ---- - ChangeLog | 3 +++ - job.c | 13 +++++++++---- - 2 files changed, 12 insertions(+), 4 deletions(-) - -diff --git a/job.c b/job.c -index 754576b..f7b7d51 100644 ---- a/job.c -+++ b/job.c -@@ -2984,8 +2984,8 @@ construct_command_argv_internal (char *line, char **restp, char *shell, - return new_argv; - } - -- new_line = alloca ((shell_len*2) + 1 + sflags_len + 1 -- + (line_len*2) + 1); -+ new_line = xmalloc ((shell_len*2) + 1 + sflags_len + 1 -+ + (line_len*2) + 1); - ap = new_line; - /* Copy SHELL, escaping any characters special to the shell. If - we don't escape them, construct_command_argv_internal will -@@ -3052,8 +3052,11 @@ construct_command_argv_internal (char *line, char **restp, char *shell, - *ap++ = *p; - } - if (ap == new_line + shell_len + sflags_len + 2) -- /* Line was empty. */ -- return 0; -+ { -+ /* Line was empty. */ -+ free (new_line); -+ return 0; -+ } - *ap = '\0'; - - #ifdef WINDOWS32 -@@ -3194,6 +3197,8 @@ construct_command_argv_internal (char *line, char **restp, char *shell, - fatal (NILF, _("%s (line %d) Bad shell context (!unixy && !batch_mode_shell)\n"), - __FILE__, __LINE__); - #endif -+ -+ free (new_line); - } - #endif /* ! AMIGA */ - --- -1.7.12 - diff --git a/sys-devel/make/files/make-3.82-memory-corruption.patch b/sys-devel/make/files/make-3.82-memory-corruption.patch deleted file mode 100644 index b28c07353ec2..000000000000 --- a/sys-devel/make/files/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/sys-devel/make/files/make-3.82-oneshell.patch b/sys-devel/make/files/make-3.82-oneshell.patch deleted file mode 100644 index fbade127ce61..000000000000 --- a/sys-devel/make/files/make-3.82-oneshell.patch +++ /dev/null @@ -1,24 +0,0 @@ -fix from upstream cvs - ----------------------------- -revision 1.245 -date: 2010-08-13 22:50:14 -0400; author: psmith; state: Exp; lines: +1 -1; commitid: 4UaslPqQHZTs5wKu; -- Add oneshell to $(.FEATURES) (forgot that!) - -Index: main.c -=================================================================== -RCS file: /sources/make/make/main.c,v -retrieving revision 1.244 -retrieving revision 1.245 -diff -u -p -r1.244 -r1.245 ---- main.c 10 Aug 2010 07:35:34 -0000 1.244 -+++ main.c 14 Aug 2010 02:50:14 -0000 1.245 -@@ -1138,7 +1138,7 @@ main (int argc, char **argv, char **envp - 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 diff --git a/sys-devel/make/files/make-3.82-parallel-remake.patch b/sys-devel/make/files/make-3.82-parallel-remake.patch deleted file mode 100644 index a19fe7b7d629..000000000000 --- a/sys-devel/make/files/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/sys-devel/make/files/make-4.2.1-glob-internals.patch b/sys-devel/make/files/make-4.2.1-glob-internals.patch new file mode 100644 index 000000000000..9f70ae2084f0 --- /dev/null +++ b/sys-devel/make/files/make-4.2.1-glob-internals.patch @@ -0,0 +1,67 @@ +From 193f1e81edd6b1b56b0eb0ff8aa4b41c7b4257b4 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] 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. +--- + dir.c | 29 +++++++++++++++++++++++++++-- + 1 file changed, 27 insertions(+), 2 deletions(-) + +diff --git a/dir.c b/dir.c +index adbb8a9..c343e4c 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 + diff --git a/sys-devel/make/files/make-4.2.1-glob-v2.patch b/sys-devel/make/files/make-4.2.1-glob-v2.patch new file mode 100644 index 000000000000..a9aeb787cd72 --- /dev/null +++ b/sys-devel/make/files/make-4.2.1-glob-v2.patch @@ -0,0 +1,28 @@ +From 48c8a116a914a325a0497721f5d8b58d5bba34d4 Mon Sep 17 00:00:00 2001 +From: Paul Smith <psmith@gnu.org> +Date: Sun, 19 Nov 2017 15:09:16 -0500 +Subject: [PATCH] * configure.ac: Support GLIBC glob interface version 2 + +--- + configure.ac | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 8c72568..4710832 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -404,10 +404,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 + diff --git a/sys-devel/make/files/make-4.2.1-perl526.patch b/sys-devel/make/files/make-4.2.1-perl526.patch new file mode 100644 index 000000000000..a935d1314ebb --- /dev/null +++ b/sys-devel/make/files/make-4.2.1-perl526.patch @@ -0,0 +1,26 @@ +From d9d4e06084a4c7da480bd49a3487aadf6ba77b54 Mon Sep 17 00:00:00 2001 +From: Enrique Olaizola <enrique_olaizola16@hotmail.com> +Date: Sat, 27 May 2017 14:24:33 -0400 +Subject: [PATCH] * tests/run_make_tests.pl: [SV 50902] Find Perl modules + +--- + tests/run_make_tests.pl | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/tests/run_make_tests.pl b/tests/run_make_tests.pl +index a74417a..a844094 100644 +--- a/tests/run_make_tests.pl ++++ b/tests/run_make_tests.pl +@@ -64,6 +64,9 @@ if ($^O eq 'VMS') + $CMD_rmfile = 'delete_file -no_ask'; + } + ++use FindBin; ++use lib "$FindBin::Bin"; ++ + require "test_driver.pl"; + require "config-flags.pm"; + +-- +2.16.1 + |