* [gentoo-commits] proj/gnome:master commit in: sys-devel/make/files/, sys-devel/make/
@ 2012-08-24 21:35 Priit Laes
0 siblings, 0 replies; 3+ messages in thread
From: Priit Laes @ 2012-08-24 21:35 UTC (permalink / raw
To: gentoo-commits
commit: 041d7491dac071333a961c18c95cb96d2c6dd46d
Author: Priit Laes <plaes <AT> plaes <DOT> org>
AuthorDate: Fri Aug 24 21:32:22 2012 +0000
Commit: Priit Laes <plaes <AT> plaes <DOT> org>
CommitDate: Fri Aug 24 21:35:13 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=041d7491
Add sys-devel/make-3.82-r4 with bunch of extra patches to overlay
Dependency for webkit-gtk-1.9.x
---
.../make/files/make-3.82-MAKEFLAGS-reexec.patch | 14 +++
.../make/files/make-3.82-archives-many-objs.patch | 60 +++++++++++
.../make/files/make-3.82-copy-on-expand.patch | 58 +++++++++++
sys-devel/make/files/make-3.82-glob-speedup.patch | 104 +++++++++++++++++++
sys-devel/make/files/make-3.82-long-cmdline.patch | 105 ++++++++++++++++++++
.../make/files/make-3.82-memory-corruption.patch | 37 +++++++
sys-devel/make/files/make-3.82-oneshell.patch | 24 +++++
.../make/files/make-3.82-parallel-build.patch | 29 ++++++
.../make/files/make-3.82-parallel-remake.patch | 39 +++++++
sys-devel/make/make-3.82-r4.ebuild | 49 +++++++++
10 files changed, 519 insertions(+), 0 deletions(-)
diff --git a/sys-devel/make/files/make-3.82-MAKEFLAGS-reexec.patch b/sys-devel/make/files/make-3.82-MAKEFLAGS-reexec.patch
new file mode 100644
index 0000000..a2f5965
--- /dev/null
+++ b/sys-devel/make/files/make-3.82-MAKEFLAGS-reexec.patch
@@ -0,0 +1,14 @@
+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
new file mode 100644
index 0000000..abdcd32
--- /dev/null
+++ b/sys-devel/make/files/make-3.82-archives-many-objs.patch
@@ -0,0 +1,60 @@
+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-copy-on-expand.patch b/sys-devel/make/files/make-3.82-copy-on-expand.patch
new file mode 100644
index 0000000..3f202b4
--- /dev/null
+++ b/sys-devel/make/files/make-3.82-copy-on-expand.patch
@@ -0,0 +1,58 @@
+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
new file mode 100644
index 0000000..c826c2c
--- /dev/null
+++ b/sys-devel/make/files/make-3.82-glob-speedup.patch
@@ -0,0 +1,104 @@
+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-long-cmdline.patch b/sys-devel/make/files/make-3.82-long-cmdline.patch
new file mode 100644
index 0000000..f8a3ccc
--- /dev/null
+++ b/sys-devel/make/files/make-3.82-long-cmdline.patch
@@ -0,0 +1,105 @@
+http://bugs.gentoo.org/301116
+http://bugs.gentoo.org/300867
+
+tweaked a little to avoid regenerating autotools, then rebased onto make-3.82
+
+2009-07-29 Ralf Wildenhues <Ralf.Wildenhues@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@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,6 +2702,15 @@
+ argument list. */
+
+ unsigned int shell_len = strlen (shell);
++#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 *args_ptr;
+ unsigned int line_len = strlen (line);
+ unsigned int sflags_len = strlen (shellflags);
+ char *command_ptr = NULL; /* used for batch_mode_shell mode */
+@@ -2700,7 +2700,7 @@
+ }
+
+ 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;
+@@ -2712,6 +2727,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')
+@@ -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 + sflags_len + 2)
+ /* Line was empty. */
diff --git a/sys-devel/make/files/make-3.82-memory-corruption.patch b/sys-devel/make/files/make-3.82-memory-corruption.patch
new file mode 100644
index 0000000..b28c073
--- /dev/null
+++ b/sys-devel/make/files/make-3.82-memory-corruption.patch
@@ -0,0 +1,37 @@
+--- 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
new file mode 100644
index 0000000..fbade12
--- /dev/null
+++ b/sys-devel/make/files/make-3.82-oneshell.patch
@@ -0,0 +1,24 @@
+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-build.patch b/sys-devel/make/files/make-3.82-parallel-build.patch
new file mode 100644
index 0000000..77c5587
--- /dev/null
+++ b/sys-devel/make/files/make-3.82-parallel-build.patch
@@ -0,0 +1,29 @@
+Patch by Kamil Mierzejewski and Jeremy Devenport to fix parallel
+build issues present in GNU make 3.82
+
+diff -u make-3.82-orig/remake.c make-3.82/remake.c
+--- make-3.82-orig/remake.c 2010-07-13 03:20:42.000000000 +0200
++++ make-3.82/remake.c 2012-03-21 12:47:52.000000000 +0100
+@@ -301,7 +301,7 @@
+ /* Check for the case where a target has been tried and failed but
+ the diagnostics hasn't been issued. If we need the diagnostics
+ then we will have to continue. */
+- if (!(f->updated && f->update_status > 0 && !f->dontcare && f->no_diag))
++ if (!(f->updated && f->update_status > 0 && !f->dontcare && f->no_diag) && f->command_state!=cs_not_started )
+ {
+ DBF (DB_VERBOSE, _("Pruning file `%s'.\n"));
+ return f->command_state == cs_finished ? f->update_status : 0;
+@@ -614,6 +614,12 @@
+ d->file->dontcare = file->dontcare;
+ }
+
++ /* We may have already encountered this file earlier in the same
++ * pass before we knew we'd be updating this target. In that
++ * case calling update_file now would result in the file being
++ * inappropriately pruned so we toggle the considered bit back
++ * off first. */
++ d->file->considered = !considered;
+
+ dep_status |= update_file (d->file, depth);
+
+
diff --git a/sys-devel/make/files/make-3.82-parallel-remake.patch b/sys-devel/make/files/make-3.82-parallel-remake.patch
new file mode 100644
index 0000000..a19fe7b
--- /dev/null
+++ b/sys-devel/make/files/make-3.82-parallel-remake.patch
@@ -0,0 +1,39 @@
+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/make-3.82-r4.ebuild b/sys-devel/make/make-3.82-r4.ebuild
new file mode 100644
index 0000000..93dc851
--- /dev/null
+++ b/sys-devel/make/make-3.82-r4.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/make/make-3.82-r4.ebuild,v 1.1 2011/12/03 00:57:25 vapier Exp $
+
+EAPI="2"
+
+inherit flag-o-matic eutils
+
+DESCRIPTION="Standard tool to compile source trees"
+HOMEPAGE="http://www.gnu.org/software/make/make.html"
+SRC_URI="mirror://gnu//make/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
+IUSE="nls static"
+
+DEPEND="nls? ( sys-devel/gettext )"
+RDEPEND="nls? ( virtual/libintl )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-archives-many-objs.patch #334889
+ epatch "${FILESDIR}"/${P}-MAKEFLAGS-reexec.patch #31975
+ epatch "${FILESDIR}"/${P}-memory-corruption.patch #355907
+ epatch "${FILESDIR}"/${P}-glob-speedup.patch #382845
+ epatch "${FILESDIR}"/${P}-copy-on-expand.patch
+ epatch "${FILESDIR}"/${P}-oneshell.patch
+ epatch "${FILESDIR}"/${P}-parallel-build.patch
+ epatch "${FILESDIR}"/${P}-parallel-remake.patch
+ epatch "${FILESDIR}"/${P}-long-cmdline.patch #300867 #301116
+}
+
+src_configure() {
+ use static && append-ldflags -static
+ econf \
+ --program-prefix=g \
+ $(use_enable nls)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS ChangeLog NEWS README*
+ if [[ ${USERLAND} == "GNU" ]] ; then
+ # we install everywhere as 'gmake' but on GNU systems,
+ # symlink 'make' to 'gmake'
+ dosym gmake /usr/bin/make
+ dosym gmake.1 /usr/share/man/man1/make.1
+ fi
+}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] proj/gnome:master commit in: sys-devel/make/files/, sys-devel/make/
@ 2012-10-10 14:26 Priit Laes
0 siblings, 0 replies; 3+ messages in thread
From: Priit Laes @ 2012-10-10 14:26 UTC (permalink / raw
To: gentoo-commits
commit: 6aaf5378fee6898d9684099df19c0f4d7dfe28ce
Author: Priit Laes <plaes <AT> plaes <DOT> org>
AuthorDate: Wed Oct 10 14:24:11 2012 +0000
Commit: Priit Laes <plaes <AT> plaes <DOT> org>
CommitDate: Wed Oct 10 14:24:11 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=6aaf5378
sys-devel/make: Revbump to include gx86 changes
---
.../files/make-3.82-construct-command-line.patch | 71 ++++++++++++++++++++
.../files/make-3.82-intermediate-parallel.patch | 62 +++++++++++++++++
...e.patch => make-3.82-long-cmdline-webkit.patch} | 30 ++++----
...line.patch => make-3.82-long-cmdline.patch.old} | 0
.../make/files/make-3.82-long-command-line.patch | 54 +++++++++++++++
...ld.patch => make-3.82-parallel-build.patch.old} | 0
.../{make-3.82-r4.ebuild => make-3.82-r5.ebuild} | 11 +++-
7 files changed, 211 insertions(+), 17 deletions(-)
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
new file mode 100644
index 0000000..c504c45
--- /dev/null
+++ b/sys-devel/make/files/make-3.82-construct-command-line.patch
@@ -0,0 +1,71 @@
+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-intermediate-parallel.patch b/sys-devel/make/files/make-3.82-intermediate-parallel.patch
new file mode 100644
index 0000000..df9b8d4
--- /dev/null
+++ b/sys-devel/make/files/make-3.82-intermediate-parallel.patch
@@ -0,0 +1,62 @@
+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-cmdline.patch b/sys-devel/make/files/make-3.82-long-cmdline-webkit.patch
similarity index 80%
copy from sys-devel/make/files/make-3.82-long-cmdline.patch
copy to sys-devel/make/files/make-3.82-long-cmdline-webkit.patch
index f8a3ccc..685fdb7 100644
--- a/sys-devel/make/files/make-3.82-long-cmdline.patch
+++ b/sys-devel/make/files/make-3.82-long-cmdline-webkit.patch
@@ -14,8 +14,8 @@ tweaked a little to avoid regenerating autotools, then rebased onto make-3.82
MAX_ARG_STRLEN if it is defined.
Problem reported against Automake by Xan Lopez <xan@gnome.org>.
---- job.c.orig 2010-01-15 18:36:53.000000000 +0200
-+++ job.c 2010-01-15 18:41:09.000000000 +0200
+--- job.c.orig 2012-10-10 15:23:11.000000000 +0300
++++ job.c 2012-10-10 15:27:10.000000000 +0300
@@ -29,6 +29,15 @@
#include <string.h>
@@ -32,7 +32,7 @@ tweaked a little to avoid regenerating autotools, then rebased onto make-3.82
/* Default shell to use. */
#ifdef WINDOWS32
#include <windows.h>
-@@ -2697,6 +2702,15 @@
+@@ -2791,6 +2800,15 @@
argument list. */
unsigned int shell_len = strlen (shell);
@@ -46,18 +46,18 @@ tweaked a little to avoid regenerating autotools, then rebased onto make-3.82
+#endif
+ char *args_ptr;
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 */
-@@ -2700,7 +2700,7 @@
+@@ -2866,7 +2884,7 @@
}
- new_line = alloca (shell_len + 1 + sflags_len + 1
-- + (line_len*2) + 1);
-+ + (line_len*2) + 1 + EVAL_LEN);
+ new_line = xmalloc ((shell_len*2) + 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;
-@@ -2712,6 +2727,30 @@
+ /* Copy SHELL, escaping any characters special to the shell. If
+ we don't escape them, construct_command_argv_internal will
+@@ -2884,6 +2902,30 @@
ap += sflags_len;
*(ap++) = ' ';
command_ptr = ap;
@@ -81,14 +81,14 @@ tweaked a little to avoid regenerating autotools, then rebased onto make-3.82
+ *ap++ = *p;
+ }
+ *ap++ = ' ';
-+ }
++ }
+#endif
-+ args_ptr = ap;
++ args_ptr = ap;
+
for (p = line; *p != '\0'; ++p)
{
if (restp != NULL && *p == '\n')
-@@ -2760,6 +2799,14 @@
+@@ -2931,6 +2973,14 @@
}
#endif
*ap++ = *p;
@@ -102,4 +102,4 @@ tweaked a little to avoid regenerating autotools, then rebased onto make-3.82
+#endif
}
if (ap == new_line + shell_len + sflags_len + 2)
- /* Line was empty. */
+ {
diff --git a/sys-devel/make/files/make-3.82-long-cmdline.patch b/sys-devel/make/files/make-3.82-long-cmdline.patch.old
similarity index 100%
rename from sys-devel/make/files/make-3.82-long-cmdline.patch
rename to sys-devel/make/files/make-3.82-long-cmdline.patch.old
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
new file mode 100644
index 0000000..9266786
--- /dev/null
+++ b/sys-devel/make/files/make-3.82-long-command-line.patch
@@ -0,0 +1,54 @@
+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-parallel-build.patch b/sys-devel/make/files/make-3.82-parallel-build.patch.old
similarity index 100%
rename from sys-devel/make/files/make-3.82-parallel-build.patch
rename to sys-devel/make/files/make-3.82-parallel-build.patch.old
diff --git a/sys-devel/make/make-3.82-r4.ebuild b/sys-devel/make/make-3.82-r5.ebuild
similarity index 80%
rename from sys-devel/make/make-3.82-r4.ebuild
rename to sys-devel/make/make-3.82-r5.ebuild
index 93dc851..d480d0f 100644
--- a/sys-devel/make/make-3.82-r4.ebuild
+++ b/sys-devel/make/make-3.82-r5.ebuild
@@ -25,9 +25,16 @@ src_prepare() {
epatch "${FILESDIR}"/${P}-glob-speedup.patch #382845
epatch "${FILESDIR}"/${P}-copy-on-expand.patch
epatch "${FILESDIR}"/${P}-oneshell.patch
- epatch "${FILESDIR}"/${P}-parallel-build.patch
epatch "${FILESDIR}"/${P}-parallel-remake.patch
- epatch "${FILESDIR}"/${P}-long-cmdline.patch #300867 #301116
+ epatch "${FILESDIR}"/${P}-intermediate-parallel.patch #431250
+ epatch "${FILESDIR}"/${P}-construct-command-line.patch
+ epatch "${FILESDIR}"/${P}-long-command-line.patch
+
+ # Custom patches from our overlay
+ epatch "${FILESDIR}"/${P}-long-cmdline-webkit.patch #300867 #301116
+
+ # Applied partially
+ # epatch "${FILESDIR}"/${P}-parallel-build.patch.old
}
src_configure() {
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] proj/gnome:master commit in: sys-devel/make/files/, sys-devel/make/
@ 2014-12-26 22:04 Gilles Dartiguelongue
0 siblings, 0 replies; 3+ messages in thread
From: Gilles Dartiguelongue @ 2014-12-26 22:04 UTC (permalink / raw
To: gentoo-commits
commit: 2ccfb5be401c3fdd2c51b8b93b9987406165de25
Author: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 26 21:56:06 2014 +0000
Commit: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
CommitDate: Fri Dec 26 21:56:06 2014 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=2ccfb5be
sys-devel/make: remove unused ebuild
This was added long ago to support crazy long lines in webkit-gtk build.
Since 4.0 got released, we haven't had any new reports about this
problem and newest webkit-gtk releases are using cmake for building.
---
.../make/files/make-3.82-MAKEFLAGS-reexec.patch | 14 ---
.../make/files/make-3.82-archives-many-objs.patch | 60 ------------
.../files/make-3.82-construct-command-line.patch | 71 --------------
.../make/files/make-3.82-copy-on-expand.patch | 58 ------------
sys-devel/make/files/make-3.82-glob-speedup.patch | 104 --------------------
.../files/make-3.82-intermediate-parallel.patch | 62 ------------
.../make/files/make-3.82-long-cmdline-webkit.patch | 105 ---------------------
.../make/files/make-3.82-long-command-line.patch | 54 -----------
.../make/files/make-3.82-memory-corruption.patch | 37 --------
sys-devel/make/files/make-3.82-oneshell.patch | 24 -----
.../make/files/make-3.82-parallel-build.patch.old | 29 ------
.../make/files/make-3.82-parallel-remake.patch | 39 --------
sys-devel/make/make-3.82-r5.ebuild | 56 -----------
sys-devel/make/metadata.xml | 5 -
14 files changed, 718 deletions(-)
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 a2f5965..0000000
--- 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 abdcd32..0000000
--- 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 c504c45..0000000
--- 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 3f202b4..0000000
--- 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 c826c2c..0000000
--- 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 df9b8d4..0000000
--- 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-cmdline-webkit.patch b/sys-devel/make/files/make-3.82-long-cmdline-webkit.patch
deleted file mode 100644
index 685fdb7..0000000
--- a/sys-devel/make/files/make-3.82-long-cmdline-webkit.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-http://bugs.gentoo.org/301116
-http://bugs.gentoo.org/300867
-
-tweaked a little to avoid regenerating autotools, then rebased onto make-3.82
-
-2009-07-29 Ralf Wildenhues <Ralf.Wildenhues@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@gnome.org>.
-
---- job.c.orig 2012-10-10 15:23:11.000000000 +0300
-+++ job.c 2012-10-10 15:27:10.000000000 +0300
-@@ -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>
-@@ -2791,6 +2800,15 @@
- argument list. */
-
- unsigned int shell_len = strlen (shell);
-+#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 *args_ptr;
- unsigned int line_len = strlen (line);
- unsigned int sflags_len = shellflags ? strlen (shellflags) : 0;
- char *command_ptr = NULL; /* used for batch_mode_shell mode */
-@@ -2866,7 +2884,7 @@
- }
-
- new_line = xmalloc ((shell_len*2) + 1 + sflags_len + 1
-- + (line_len*2) + 1);
-+ + (line_len*2) + 1 + EVAL_LEN);
- ap = new_line;
- /* Copy SHELL, escaping any characters special to the shell. If
- we don't escape them, construct_command_argv_internal will
-@@ -2884,6 +2902,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')
-@@ -2931,6 +2973,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)
- {
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 9266786..0000000
--- 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 b28c073..0000000
--- 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 fbade12..0000000
--- 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-build.patch.old b/sys-devel/make/files/make-3.82-parallel-build.patch.old
deleted file mode 100644
index 77c5587..0000000
--- a/sys-devel/make/files/make-3.82-parallel-build.patch.old
+++ /dev/null
@@ -1,29 +0,0 @@
-Patch by Kamil Mierzejewski and Jeremy Devenport to fix parallel
-build issues present in GNU make 3.82
-
-diff -u make-3.82-orig/remake.c make-3.82/remake.c
---- make-3.82-orig/remake.c 2010-07-13 03:20:42.000000000 +0200
-+++ make-3.82/remake.c 2012-03-21 12:47:52.000000000 +0100
-@@ -301,7 +301,7 @@
- /* Check for the case where a target has been tried and failed but
- the diagnostics hasn't been issued. If we need the diagnostics
- then we will have to continue. */
-- if (!(f->updated && f->update_status > 0 && !f->dontcare && f->no_diag))
-+ if (!(f->updated && f->update_status > 0 && !f->dontcare && f->no_diag) && f->command_state!=cs_not_started )
- {
- DBF (DB_VERBOSE, _("Pruning file `%s'.\n"));
- return f->command_state == cs_finished ? f->update_status : 0;
-@@ -614,6 +614,12 @@
- d->file->dontcare = file->dontcare;
- }
-
-+ /* We may have already encountered this file earlier in the same
-+ * pass before we knew we'd be updating this target. In that
-+ * case calling update_file now would result in the file being
-+ * inappropriately pruned so we toggle the considered bit back
-+ * off first. */
-+ d->file->considered = !considered;
-
- dep_status |= update_file (d->file, depth);
-
-
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 a19fe7b..0000000
--- 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/make-3.82-r5.ebuild b/sys-devel/make/make-3.82-r5.ebuild
deleted file mode 100644
index d480d0f..0000000
--- a/sys-devel/make/make-3.82-r5.ebuild
+++ /dev/null
@@ -1,56 +0,0 @@
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/make/make-3.82-r4.ebuild,v 1.1 2011/12/03 00:57:25 vapier Exp $
-
-EAPI="2"
-
-inherit flag-o-matic eutils
-
-DESCRIPTION="Standard tool to compile source trees"
-HOMEPAGE="http://www.gnu.org/software/make/make.html"
-SRC_URI="mirror://gnu//make/${P}.tar.bz2"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
-IUSE="nls static"
-
-DEPEND="nls? ( sys-devel/gettext )"
-RDEPEND="nls? ( virtual/libintl )"
-
-src_prepare() {
- epatch "${FILESDIR}"/${P}-archives-many-objs.patch #334889
- epatch "${FILESDIR}"/${P}-MAKEFLAGS-reexec.patch #31975
- epatch "${FILESDIR}"/${P}-memory-corruption.patch #355907
- epatch "${FILESDIR}"/${P}-glob-speedup.patch #382845
- epatch "${FILESDIR}"/${P}-copy-on-expand.patch
- epatch "${FILESDIR}"/${P}-oneshell.patch
- epatch "${FILESDIR}"/${P}-parallel-remake.patch
- epatch "${FILESDIR}"/${P}-intermediate-parallel.patch #431250
- epatch "${FILESDIR}"/${P}-construct-command-line.patch
- epatch "${FILESDIR}"/${P}-long-command-line.patch
-
- # Custom patches from our overlay
- epatch "${FILESDIR}"/${P}-long-cmdline-webkit.patch #300867 #301116
-
- # Applied partially
- # epatch "${FILESDIR}"/${P}-parallel-build.patch.old
-}
-
-src_configure() {
- use static && append-ldflags -static
- econf \
- --program-prefix=g \
- $(use_enable nls)
-}
-
-src_install() {
- emake DESTDIR="${D}" install || die
- dodoc AUTHORS ChangeLog NEWS README*
- if [[ ${USERLAND} == "GNU" ]] ; then
- # we install everywhere as 'gmake' but on GNU systems,
- # symlink 'make' to 'gmake'
- dosym gmake /usr/bin/make
- dosym gmake.1 /usr/share/man/man1/make.1
- fi
-}
diff --git a/sys-devel/make/metadata.xml b/sys-devel/make/metadata.xml
deleted file mode 100644
index 96a2d58..0000000
--- a/sys-devel/make/metadata.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-<herd>base-system</herd>
-</pkgmetadata>
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-12-26 22:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-10 14:26 [gentoo-commits] proj/gnome:master commit in: sys-devel/make/files/, sys-devel/make/ Priit Laes
-- strict thread matches above, loose matches on Subject: below --
2014-12-26 22:04 Gilles Dartiguelongue
2012-08-24 21:35 Priit Laes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox