Merge remote-tracking branch 'origin/stdenv-updates'

This commit is contained in:
Eelco Dolstra
2013-03-07 23:09:05 +01:00
694 changed files with 7108 additions and 8258 deletions

View File

@@ -8,9 +8,11 @@ stdenv.mkDerivation (rec {
sha256 = "1nsqk70ry3221sd62s4f0njcrncppszs4xxjcak13lxyfq2y0fs7";
};
patches = [ ./glibc-2.17.patch ];
# Perl is needed for `cg_annotate'.
# GDB is needed to provide a sane default for `--db-command'.
buildNativeInputs = [ perl ];
nativeBuildInputs = [ perl ];
buildInputs = stdenv.lib.optional (!stdenv.isDarwin) gdb;
configureFlags =

View File

@@ -0,0 +1,78 @@
commit 3781ac11ff374b3517011c1710ec517d52f25cd2
Author: tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9>
Date: Mon Jan 14 09:48:49 2013 +0000
Accept glibc 2.17 as valid.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13228 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/configure.in b/configure.in
index e0fb12d..0f3b3df 100644
--- a/configure.in
+++ b/configure.in
@@ -906,6 +906,13 @@ case "${GLIBC_VERSION}" in
DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
;;
+ 2.17)
+ AC_MSG_RESULT(2.17 family)
+ AC_DEFINE([GLIBC_2_17], 1, [Define to 1 if you're using glibc 2.17.x])
+ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
+ ;;
darwin)
AC_MSG_RESULT(Darwin)
AC_DEFINE([DARWIN_LIBC], 1, [Define to 1 if you're using Darwin])
@@ -919,7 +926,7 @@ case "${GLIBC_VERSION}" in
*)
AC_MSG_RESULT([unsupported version ${GLIBC_VERSION}])
- AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.16])
+ AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.17])
AC_MSG_ERROR([or Darwin libc])
;;
esac
diff -ur valgrind-3.8.1/config.h.in valgrind-3.8.1/config.h.in
--- valgrind-3.8.1/config.h.in 2013-01-16 17:15:33.531018561 +0100
+++ valgrind-3.8.1/config.h.in 2013-01-16 17:19:21.000000000 +0100
@@ -48,6 +48,9 @@
/* Define to 1 if you're using glibc 2.16.x */
#undef GLIBC_2_16
+/* Define to 1 if you're using glibc 2.17.x */
+#undef GLIBC_2_17
+
/* Define to 1 if you're using glibc 2.2.x */
#undef GLIBC_2_2
diff -ur valgrind-3.8.1/configure valgrind-3.8.1/configure
--- valgrind-3.8.1/configure 2013-01-16 17:15:33.563018480 +0100
+++ valgrind-3.8.1/configure 2013-01-16 17:19:21.373643238 +0100
@@ -6610,6 +6610,16 @@
DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
;;
+ 2.17)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.17 family" >&5
+$as_echo "2.17 family" >&6; }
+
+$as_echo "#define GLIBC_2_17 1" >>confdefs.h
+
+ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
+ ;;
darwin)
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Darwin" >&5
$as_echo "Darwin" >&6; }
@@ -6630,7 +6640,7 @@
*)
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported version ${GLIBC_VERSION}" >&5
$as_echo "unsupported version ${GLIBC_VERSION}" >&6; }
- as_fn_error "Valgrind requires glibc version 2.2 - 2.16" "$LINENO" 5
+ as_fn_error "Valgrind requires glibc version 2.2 - 2.17" "$LINENO" 5
as_fn_error "or Darwin libc" "$LINENO" 5
;;
esac

View File

@@ -47,7 +47,7 @@ cmakeConfigurePhase() {
eval "$postConfigure"
}
if [ -z "$dontUseCmakeConfigure" ]; then
if [ -z "$dontUseCmakeConfigure" -a ! -v configurePhase ]; then
configurePhase=cmakeConfigurePhase
fi

View File

@@ -23,6 +23,7 @@ stdenv.mkDerivation {
# /usr/include and friends.
./impure-dirs.patch
];
patchFlags = "-p0";
meta = {
description = "GNU Make, a program controlling the generation of non-source files from sources";

View File

@@ -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))

View File

@@ -0,0 +1,48 @@
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)

View File

@@ -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 job.c job.c
index 67b402d..c2ce84d 100644
--- job.c
+++ 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

View File

@@ -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);

View File

@@ -0,0 +1,17 @@
Fixed default libpatttern on Darwin, imported from prefix overlay.
Got merged upstream:
https://savannah.gnu.org/bugs/?37197
--- default.c.orig 2009-05-02 12:25:24 +0200
+++ default.c 2009-05-02 12:25:58 +0200
@@ -509,7 +509,11 @@
#ifdef __MSDOS__
".LIBPATTERNS", "lib%.a $(DJDIR)/lib/lib%.a",
#else
+#ifdef __APPLE__
+ ".LIBPATTERNS", "lib%.dylib lib%.a",
+#else
".LIBPATTERNS", "lib%.so lib%.a",
+#endif
#endif
#endif

View File

@@ -24,7 +24,21 @@ stdenv.mkDerivation {
# Likewise, when searching for included Makefiles, don't look in
# /usr/include and friends.
./impure-dirs.patch
# a bunch of patches from Gentoo, mostly should be from upstream (unreleased)
./archives-many-objs.patch
./MAKEFLAGS-reexec.patch
./memory-corruption.patch
./glob-speedup.patch
./copy-on-expand.patch
./oneshell.patch
./parallel-remake.patch
./intermediate-parallel.patch
./construct-command-line.patch
./long-command-line.patch
./darwin-library_search-dylib.patch
];
patchFlags = "-p0";
meta = {
description = "GNU Make, a program controlling the generation of non-source files from sources";

View File

@@ -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.
--- read.c 2011/04/29 15:27:39 1.198
+++ 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)

View File

@@ -1,6 +1,6 @@
diff -rc make-3.81-orig/read.c make-3.81/read.c
*** make-3.81-orig/read.c 2006-03-17 15:24:20.000000000 +0100
--- make-3.81/read.c 2007-05-24 17:16:31.000000000 +0200
diff -rc read.c read.c
*** read.c 2006-03-17 15:24:20.000000000 +0100
--- read.c 2007-05-24 17:16:31.000000000 +0200
***************
*** 99,107 ****
--- 99,109 ----
@@ -15,9 +15,9 @@ diff -rc make-3.81-orig/read.c make-3.81/read.c
#endif
0
};
diff -rc make-3.81-orig/remake.c make-3.81/remake.c
*** make-3.81-orig/remake.c 2006-03-20 03:36:37.000000000 +0100
--- make-3.81/remake.c 2007-05-24 17:06:54.000000000 +0200
diff -rc reremake.c
*** remake.c 2006-03-20 03:36:37.000000000 +0100
--- remake.c 2007-05-24 17:06:54.000000000 +0200
***************
*** 1452,1460 ****
--- 1452,1462 ----

View File

@@ -0,0 +1,46 @@
diff --git remake.c remake.c
index c0bf709..b1ddd23 100644
--- remake.c
+++ 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 tests/scripts/features/parallelism tests/scripts/features/parallelism
index d4250f0..76d24a7 100644
--- tests/scripts/features/parallelism
+++ 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

View File

@@ -1,6 +1,6 @@
diff -rc make-3.81-orig/job.c make-3.81/job.c
*** make-3.81-orig/job.c 2006-03-20 04:03:04.000000000 +0100
--- make-3.81/job.c 2009-01-19 19:37:28.000000000 +0100
diff -rc job.c job.c
*** job.c 2006-03-20 04:03:04.000000000 +0100
--- job.c 2009-01-19 19:37:28.000000000 +0100
***************
*** 1083,1089 ****
appear. */
@@ -18,9 +18,9 @@ diff -rc make-3.81-orig/job.c make-3.81/job.c
/* Tell update_goal_chain that a command has been started on behalf of
this target. It is important that this happens here and not in
diff -rc make-3.81-orig/main.c make-3.81/main.c
*** make-3.81-orig/main.c 2006-03-20 03:36:37.000000000 +0100
--- make-3.81/main.c 2009-01-19 19:41:41.000000000 +0100
diff -rc main.c main.c
*** main.c 2006-03-20 03:36:37.000000000 +0100
--- main.c 2009-01-19 19:41:41.000000000 +0100
***************
*** 886,891 ****
--- 886,900 ----
@@ -87,9 +87,9 @@ diff -rc make-3.81-orig/main.c make-3.81/main.c
+ int enable_nested_output = 0;
+ int stdout_nesting_level = 0;
+ int stderr_nesting_level = 0;
diff -rc make-3.81-orig/make.h make-3.81/make.h
*** make-3.81-orig/make.h 2006-02-16 00:54:43.000000000 +0100
--- make-3.81/make.h 2009-01-19 19:32:03.000000000 +0100
diff -rc make.h
*** make.h 2006-02-16 00:54:43.000000000 +0100
--- make.h 2009-01-19 19:32:03.000000000 +0100
***************
*** 609,611 ****
--- 609,614 ----
@@ -99,9 +99,9 @@ diff -rc make-3.81-orig/make.h make-3.81/make.h
+ extern int enable_nested_output;
+ extern int stdout_nesting_level;
+ extern int stderr_nesting_level;
diff -rc make-3.81-orig/remake.c make-3.81/remake.c
*** make-3.81-orig/remake.c 2006-03-20 03:36:37.000000000 +0100
--- make-3.81/remake.c 2009-01-19 19:39:40.000000000 +0100
diff -rc reremake.c
*** remake.c 2006-03-20 03:36:37.000000000 +0100
--- remake.c 2009-01-19 19:39:40.000000000 +0100
***************
*** 1120,1126 ****
--- 1120,1137 ----

View File

@@ -1,6 +1,6 @@
diff -rc make-3.81-orig/job.c make-3.81/job.c
*** make-3.81-orig/job.c 2006-03-20 04:03:04.000000000 +0100
--- make-3.81/job.c 2009-01-19 19:37:28.000000000 +0100
diff -rc job.c job.c
*** job.c 2006-03-20 04:03:04.000000000 +0100
--- job.c 2009-01-19 19:37:28.000000000 +0100
***************
*** 1083,1089 ****
appear. */
@@ -18,9 +18,9 @@ diff -rc make-3.81-orig/job.c make-3.81/job.c
/* Tell update_goal_chain that a command has been started on behalf of
this target. It is important that this happens here and not in
diff -rc make-3.81-orig/main.c make-3.81/main.c
*** make-3.81-orig/main.c 2006-03-20 03:36:37.000000000 +0100
--- make-3.81/main.c 2009-01-19 19:41:41.000000000 +0100
diff -rc main.c main.c
*** main.c 2006-03-20 03:36:37.000000000 +0100
--- main.c 2009-01-19 19:41:41.000000000 +0100
***************
*** 886,891 ****
--- 886,900 ----
@@ -87,9 +87,9 @@ diff -rc make-3.81-orig/main.c make-3.81/main.c
+ int enable_nested_output = 0;
+ int stdout_nesting_level = 0;
+ int stderr_nesting_level = 0;
diff -rc make-3.81-orig/make.h make-3.81/make.h
*** make-3.81-orig/make.h 2006-02-16 00:54:43.000000000 +0100
--- make-3.81/make.h 2009-01-19 19:32:03.000000000 +0100
diff -rc make.h
*** make.h 2006-02-16 00:54:43.000000000 +0100
--- make.h 2009-01-19 19:32:03.000000000 +0100
***************
*** 609,611 ****
--- 609,614 ----
@@ -99,9 +99,9 @@ diff -rc make-3.81-orig/make.h make-3.81/make.h
+ extern int enable_nested_output;
+ extern int stdout_nesting_level;
+ extern int stderr_nesting_level;
diff -rc make-3.81-orig/remake.c make-3.81/remake.c
*** make-3.81-orig/remake.c 2006-03-20 03:36:37.000000000 +0100
--- make-3.81/remake.c 2009-01-19 19:39:40.000000000 +0100
diff -rc reremake.c
*** remake.c 2006-03-20 03:36:37.000000000 +0100
--- remake.c 2009-01-19 19:39:40.000000000 +0100
***************
*** 1120,1126 ****
--- 1120,1137 ----

View File

@@ -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 job.c job.c
index 754576b..f7b7d51 100644
--- job.c
+++ 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

View File

@@ -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];

View File

@@ -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

View File

@@ -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);

View File

@@ -47,6 +47,6 @@ stdenv.mkDerivation {
'';
maintainers = [stdenv.lib.maintainers.simons];
platforms = if (qt4 != null) then stdenv.lib.platforms.linux else stdenv.lib.platforms.unix;
platforms = if qt4 != null then stdenv.lib.platforms.linux else stdenv.lib.platforms.unix;
};
}

View File

@@ -47,6 +47,6 @@ stdenv.mkDerivation {
'';
maintainers = [stdenv.lib.maintainers.simons];
platforms = if (qt4 != null) then stdenv.lib.platforms.linux else stdenv.lib.platforms.unix;
platforms = if qt4 != null then stdenv.lib.platforms.linux else stdenv.lib.platforms.unix;
};
}

View File

@@ -14,5 +14,5 @@ stdenv.mkDerivation {
pythonPath = [ libxml2Python ];
postInstall = "wrapPythonPrograms";
buildNativeInputs = [ pkgconfig intltool pythonPackages.wrapPython ];
nativeBuildInputs = [ pkgconfig intltool pythonPackages.wrapPython ];
}

View File

@@ -1,13 +1,13 @@
{ fetchurl, stdenv, guile, which }:
let version = "5.15"; in
let version = "5.17"; in
stdenv.mkDerivation {
name = "autogen-${version}";
src = fetchurl {
url = "mirror://gnu/autogen/rel${version}/autogen-${version}.tar.gz";
sha256 = "8a37effa66d285471851e445d3bdeb60c0940f9efd7852828ebb8116e1c5cc1f";
sha256 = "065mg9gfb605wxbsk3inf93528ygcjgg6j8ml51691f6ghj363ff";
};
buildInputs = [ guile which ];
@@ -22,7 +22,7 @@ let version = "5.15"; in
# The tests rely on being able to find `libopts.a'.
configureFlags = "--enable-static";
doCheck = true;
#doCheck = true; # 2 tests fail because of missing /dev/tty
meta = {
description = "GNU AutoGen, an automated text and program generation tool";
@@ -46,7 +46,7 @@ let version = "5.15"; in
documentation of program options.
'';
license = "GPLv3+";
licenses = ["GPLv3+" "LGPLv3+" ];
homepage = http://www.gnu.org/software/autogen/;

View File

@@ -1,4 +1,4 @@
{stdenv, fetchurl, perl, autoconf, makeWrapper, doCheck ? true}:
{ stdenv, fetchurl, perl, autoconf, makeWrapper }:
stdenv.mkDerivation rec {
name = "automake-1.11.6";
@@ -19,8 +19,6 @@ stdenv.mkDerivation rec {
buildInputs = [perl autoconf makeWrapper];
inherit doCheck;
# Disable indented log output from Make, otherwise "make.test" will
# fail.
preCheck = "unset NIX_INDENT_MAKE";

View File

@@ -1,7 +1,7 @@
{stdenv, fetchurl, perl, autoconf, makeWrapper, doCheck ? true}:
{ stdenv, fetchurl, perl, autoconf, makeWrapper, doCheck ? false }:
stdenv.mkDerivation rec {
name = "automake-1.12.2";
name = "automake-1.12.4";
# TODO: Remove the `aclocal' wrapper when $ACLOCAL_PATH support is
# available upstream; see
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "mirror://gnu/automake/${name}.tar.xz";
sha256 = "5fb56e918189b377a22368e19baaf70252bd85a9969ed5f8a8373f49e8faf07f";
sha256 = "0wppdm0wfizs6nmiwlkigcmh2pn33dywdkl7b407j3pvwn622vsi";
};
buildInputs = [perl autoconf makeWrapper];

View File

@@ -1,12 +1,12 @@
{ stdenv, fetchurl, noSysDirs, zlib, cross ? null, gold ? false, bison ? null, flex2535 ? null, bc ? null, dejagnu ? null }:
let basename = "binutils-2.21.1a"; in
let basename = "binutils-2.23.1"; in
stdenv.mkDerivation rec {
name = basename + stdenv.lib.optionalString (cross != null) "-${cross.config}";
src = fetchurl {
url = "mirror://gnu/binutils/${basename}.tar.bz2";
sha256 = "0m7nmd7gc9d9md43wbrv65hz6lbi2crqwryzpigv19ray1lzmv6d";
sha256 = "06bs5v5ndb4g5qx96d52lc818gkbskd1m0sz57314v887sqfbcia";
};
patches = [
@@ -14,6 +14,11 @@ stdenv.mkDerivation rec {
# RUNPATH instead of RPATH on binaries. This is important because
# RUNPATH can be overriden using LD_LIBRARY_PATH at runtime.
./new-dtags.patch
# Since binutils 2.22, DT_NEEDED flags aren't copied for dynamic outputs.
# That requires upstream changes for things to work. So we can patch it to
# get the old behaviour by now.
./dtneeded.patch
];
buildInputs =

View File

@@ -0,0 +1,12 @@
diff --git a/ld/ldmain.c b/ld/ldmain.c
index 15f8ebf..f71241e 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -298,6 +298,7 @@ main (int argc, char **argv)
lang_init ();
ldemul_before_parse ();
lang_has_input_file = FALSE;
+ input_flags.add_DT_NEEDED_for_dynamic = TRUE;
parse_args (argc, argv);
if (config.hash_table_size != 0)

View File

@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
configureFlags = "--with-ncurses=${ncurses}";
buildInputs = [ ncurses ];
buildNativeInputs = [ pkgconfig emacs ];
nativeBuildInputs = [ pkgconfig emacs ];
postInstall = ''
# Install Emacs mode.
@@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
crossAttrs = {
postInstall = "";
propagatedBuildInputs = [ ncurses.hostDrv ];
propagatedBuildInputs = [ ncurses.crossDrv ];
};
meta = {

View File

@@ -21,14 +21,14 @@ stdenv.mkDerivation rec {
# We need bzip2 in NativeInputs because otherwise we can't unpack the src,
# as the host-bzip2 will be in the path.
buildNativeInputs = [m4 bison flex gettext bzip2];
nativeBuildInputs = [m4 bison flex gettext bzip2];
buildInputs = [zlib bzip2];
crossAttrs = {
/* Having bzip2 will harm, because anything using elfutils
as buildInput cross-building, will not be able to run 'bzip2' */
propagatedBuildInputs = [ zlib.hostDrv ];
propagatedBuildInputs = [ zlib.crossDrv ];
# This program does not cross-build fine. So I only cross-build some parts
# I need for the linux perf tool.

View File

@@ -11,8 +11,8 @@ let
basename = "gdb-7.5.1";
# Whether (cross-)building for GNU/Hurd. This is an approximation since
# having `stdenv ? cross' doesn't tell us if we're building `hostDrv' and
# `buildDrv'.
# having `stdenv ? cross' doesn't tell us if we're building `crossDrv' and
# `nativeDrv'.
isGNU =
stdenv.system == "i686-gnu"
|| (stdenv ? cross && stdenv.cross.config == "i586-pc-gnu");
@@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
# I think python is not a native input, but I leave it
# here while I will not need it cross building
buildNativeInputs = [ texinfo python ]
nativeBuildInputs = [ texinfo python ]
++ stdenv.lib.optional isGNU mig;
buildInputs = [ ncurses readline gmp mpfr expat ]
@@ -51,8 +51,8 @@ stdenv.mkDerivation rec {
crossAttrs = {
# Do not add --with-python here to avoid cross building it.
configureFlags =
'' --with-gmp=${gmp.hostDrv} --with-mpfr=${mpfr.hostDrv} --with-system-readline
--with-expat --with-libexpat-prefix=${expat.hostDrv} --without-python
'' --with-gmp=${gmp.crossDrv} --with-mpfr=${mpfr.crossDrv} --with-system-readline
--with-expat --with-libexpat-prefix=${expat.crossDrv} --without-python
'' + stdenv.lib.optionalString (target != null)
" --target=${target.config}";
};

View File

@@ -13,7 +13,7 @@ stdenv.mkDerivation {
&& !stdenv.isSunOS; # XXX: `test-setlocale2.sh' fails
# Upstream is aware of it; it may be in the next release.
patches = [ ./s_isdir.patch ./readlink-EINVAL.patch ];
patches = [ ./s_isdir.patch ./readlink-EINVAL.patch ./no-gets.patch ];
meta = {
homepage = http://www.gnu.org/software/m4/;

View File

@@ -0,0 +1,26 @@
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-devel/m4/files/m4-1.4.16-no-gets.patch?revision=1.1
https://bugs.gentoo.org/424978
hack until m4 pulls a newer gnulib version
From 66712c23388e93e5c518ebc8515140fa0c807348 Mon Sep 17 00:00:00 2001
From: Eric Blake <eblake@redhat.com>
Date: Thu, 29 Mar 2012 13:30:41 -0600
Subject: [PATCH] stdio: don't assume gets any more
Gnulib intentionally does not have a gets module, and now that C11
and glibc have dropped it, we should be more proactive about warning
any user on a platform that still has a declaration of this dangerous
interface.
--- a/lib/stdio.in.h
+++ b/lib/stdio.in.h
@@ -125,7 +125,6 @@
so any use of gets warrants an unconditional warning. Assume it is
always declared, since it is required by C89. */
#undef gets
-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
#if @GNULIB_FOPEN@
# if @REPLACE_FOPEN@

View File

@@ -8,7 +8,7 @@ stdenv.mkDerivation (rec {
sha256 = "0649qfpzkswgcj9vqkkr9rn4nlcx80faxpyqscy2k1x9c94f93dk";
};
buildNativeInputs = [ lzma m4 perl ];
nativeBuildInputs = [ lzma m4 perl ];
# Don't fixup "#! /bin/sh" in Libtool, otherwise it will use the
# "fixed" path in generated files!

View File

@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
sha256 = "158iwk0pl2mfw93m1843xb7a2zb8p6lh0qim07rca6f1ff4dk764";
};
buildNativeInputs = [ perl ];
nativeBuildInputs = [ perl ];
meta = {
homepage = http://strace.sourceforge.net/;

View File

@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
};
buildInputs = [ ncurses ];
buildNativeInputs = [ lzma ];
nativeBuildInputs = [ lzma ];
# Disabled because we don't have zdiff in the stdenv bootstrap.
#doCheck = true;

View File

@@ -10,7 +10,7 @@ stdenv.mkDerivation {
sha256 = "7ae7d81becc25b1adabc9383bb5b9005dddb31510cdc404ce8a0d6ff6c3dc47e";
};
buildNativeInputs = [ flex bison qt4 ];
nativeBuildInputs = [ flex bison qt4 ];
buildInputs = [ qt4 ];

View File

@@ -1,13 +0,0 @@
{stdenv, fetchurl, m4}:
assert m4 != null;
stdenv.mkDerivation {
name = "bison-1.875";
src = fetchurl {
url = mirror://gnu/bison/bison-1.875.tar.bz2;
md5 = "b7f8027b249ebd4dd0cc948943a71af0";
};
buildInputs = [m4];
passthru = { glrSupport = true; };
}

View File

@@ -1,38 +0,0 @@
{stdenv, fetchurl, m4}:
assert m4 != null;
stdenv.mkDerivation {
name = "bison-2.3";
src = fetchurl {
url = mirror://gnu/bison/bison-2.3.tar.bz2;
md5 = "c18640c6ec31a169d351e3117ecce3ec";
};
buildNativeInputs = [m4];
propagatedBuildInputs = [m4];
meta = {
description = "GNU Bison, a Yacc-compatible parser generator";
longDescription = ''
Bison is a general-purpose parser generator that converts an
annotated context-free grammar into an LALR(1) or GLR parser for
that grammar. Once you are proficient with Bison, you can use
it to develop a wide range of language parsers, from those used
in simple desk calculators to complex programming languages.
Bison is upward compatible with Yacc: all properly-written Yacc
grammars ought to work with Bison with no change. Anyone
familiar with Yacc should be able to use Bison with little
trouble. You need to be fluent in C or C++ programming in order
to use Bison.
'';
homepage = http://www.gnu.org/software/bison/;
license = "GPLv2+";
};
passthru = { glrSupport = true; };
}

View File

@@ -1,40 +0,0 @@
{stdenv, fetchurl, m4}:
stdenv.mkDerivation rec {
name = "bison-2.4.3";
src = fetchurl {
url = "mirror://gnu/bison/${name}.tar.bz2";
sha256 = "019s3pdzggb71g7p7dgajhh53gh0h6nfl4yrzrs0jzsc37ph4lwk";
};
buildNativeInputs = [m4];
doCheck = true;
meta = {
description = "GNU Bison, a Yacc-compatible parser generator";
longDescription = ''
Bison is a general-purpose parser generator that converts an
annotated context-free grammar into an LALR(1) or GLR parser for
that grammar. Once you are proficient with Bison, you can use
it to develop a wide range of language parsers, from those used
in simple desk calculators to complex programming languages.
Bison is upward compatible with Yacc: all properly-written Yacc
grammars ought to work with Bison with no change. Anyone
familiar with Yacc should be able to use Bison with little
trouble. You need to be fluent in C or C++ programming in order
to use Bison.
'';
homepage = http://www.gnu.org/software/bison/;
license = "GPLv3+";
maintainers = [ stdenv.lib.maintainers.ludo ];
};
passthru = { glrSupport = true; };
}

View File

@@ -1,44 +0,0 @@
{ stdenv, fetchurl, m4, perl }:
stdenv.mkDerivation rec {
name = "bison-2.5";
src = fetchurl {
url = "mirror://gnu/bison/${name}.tar.bz2";
sha256 = "1f1rai3v6k6xjii94964iq0alhc2hxwapqa363nfj8rbxvv0sdqa";
};
buildNativeInputs = [ m4 ]
++ stdenv.lib.optional doCheck perl;
propagatedBuildInputs = [ m4 ];
M4 = "${m4}/bin/m4";
doCheck = true;
meta = {
description = "GNU Bison, a Yacc-compatible parser generator";
longDescription = ''
Bison is a general-purpose parser generator that converts an
annotated context-free grammar into an LALR(1) or GLR parser for
that grammar. Once you are proficient with Bison, you can use
it to develop a wide range of language parsers, from those used
in simple desk calculators to complex programming languages.
Bison is upward compatible with Yacc: all properly-written Yacc
grammars ought to work with Bison with no change. Anyone
familiar with Yacc should be able to use Bison with little
trouble. You need to be fluent in C or C++ programming in order
to use Bison.
'';
homepage = http://www.gnu.org/software/bison/;
license = "GPLv3+";
maintainers = [ stdenv.lib.maintainers.ludo ];
};
passthru = { glrSupport = true; };
}

View File

@@ -1,14 +1,14 @@
{ stdenv, fetchurl, m4, perl }:
stdenv.mkDerivation rec {
name = "bison-2.6.2";
name = "bison-2.6.5";
src = fetchurl {
url = "mirror://gnu/bison/${name}.tar.xz";
sha256 = "79503f80397c30ac81b62eca5ffeaccaed72fdfeddb76257efcf8c3ca24be03d";
sha256 = "8640d5b51aad462db6863711f333a9159836853e0b1e79fdef708c6efb5cd52b";
};
buildNativeInputs = [ m4 ] ++ stdenv.lib.optional doCheck perl;
nativeBuildInputs = [ m4 ] ++ stdenv.lib.optional doCheck perl;
propagatedBuildInputs = [ m4 ];
doCheck = true;

View File

@@ -11,7 +11,7 @@ stdenv.mkDerivation {
sha256 = "0ysff249mwhq0053bw3hxh58djc0gy7vjan2z1krrf9n5d5vvv0b";
};
buildInputs = [yacc];
propagatedBuildNativeInputs = [m4];
propagatedNativeBuildInputs = [m4];
crossAttrs = {
preConfigure = ''

View File

@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
sha256 = "1m14czhi3b388didn0a881glsx8bnsg9gnxgj5lghr4l5mgqyrd7";
};
buildNativeInputs = stdenv.lib.optional (stdenv.system == "x86_64-linux") upx;
nativeBuildInputs = stdenv.lib.optional (stdenv.system == "x86_64-linux") upx;
buildPhase = stdenv.lib.optionalString (stdenv.system == "x86_64-linux") ''
upx -d bin/phantomjs

View File

@@ -6,11 +6,11 @@
assert withGUI -> qt4 != null;
stdenv.mkDerivation rec {
name = "oprofile-0.9.7";
name = "oprofile-0.9.8";
src = fetchurl {
url = "mirror://sourceforge/oprofile/${name}.tar.gz";
sha256 = "09ymfgcvp6372xnxdbq664ba8f4nzz4cxlya7wi8s1gabmym0nyb";
sha256 = "1g31lwgpacql6w5z1z2f31pgwzn14rgsbh7kmmdmsgm2l47r0idb";
};
patchPhase = ''
@@ -23,8 +23,7 @@ stdenv.mkDerivation rec {
buildInputs = [ binutils zlib popt makeWrapper gawk which gnugrep pkgconfig ]
++ stdenv.lib.optionals withGUI [ qt4 ];
configureFlags =
[ "--with-kernel-support"
configureFlags = [
"--disable-shared" # needed because only the static libbfd is available
]
++ stdenv.lib.optional withGUI "--with-qt-dir=${qt4} --enable-gui=qt4";