From 6aaf5378fee6898d9684099df19c0f4d7dfe28ce Mon Sep 17 00:00:00 2001 From: Priit Laes Date: Wed, 10 Oct 2012 17:24:11 +0300 Subject: sys-devel/make: Revbump to include gx86 changes --- sys-devel/make/Manifest | 10 +- .../files/make-3.82-construct-command-line.patch | 71 ++++++++++++++ .../files/make-3.82-intermediate-parallel.patch | 62 ++++++++++++ .../make/files/make-3.82-long-cmdline-webkit.patch | 105 +++++++++++++++++++++ sys-devel/make/files/make-3.82-long-cmdline.patch | 105 --------------------- .../make/files/make-3.82-long-cmdline.patch.old | 105 +++++++++++++++++++++ .../make/files/make-3.82-long-command-line.patch | 54 +++++++++++ .../make/files/make-3.82-parallel-build.patch | 29 ------ .../make/files/make-3.82-parallel-build.patch.old | 29 ++++++ sys-devel/make/make-3.82-r4.ebuild | 49 ---------- sys-devel/make/make-3.82-r5.ebuild | 56 +++++++++++ 11 files changed, 489 insertions(+), 186 deletions(-) create mode 100644 sys-devel/make/files/make-3.82-construct-command-line.patch create mode 100644 sys-devel/make/files/make-3.82-intermediate-parallel.patch create mode 100644 sys-devel/make/files/make-3.82-long-cmdline-webkit.patch delete mode 100644 sys-devel/make/files/make-3.82-long-cmdline.patch create mode 100644 sys-devel/make/files/make-3.82-long-cmdline.patch.old create mode 100644 sys-devel/make/files/make-3.82-long-command-line.patch delete mode 100644 sys-devel/make/files/make-3.82-parallel-build.patch create mode 100644 sys-devel/make/files/make-3.82-parallel-build.patch.old delete mode 100644 sys-devel/make/make-3.82-r4.ebuild create mode 100644 sys-devel/make/make-3.82-r5.ebuild (limited to 'sys-devel/make') diff --git a/sys-devel/make/Manifest b/sys-devel/make/Manifest index 16df66d3..67f32b32 100644 --- a/sys-devel/make/Manifest +++ b/sys-devel/make/Manifest @@ -1,11 +1,15 @@ AUX make-3.82-MAKEFLAGS-reexec.patch 456 SHA256 0180a94ab07bb9c1348ab30301afcbbe382a281c4c6f143de16e3bea3d96e00c SHA512 675c528ea92c9df487c0a9d9058a304f970543f71991c70cc1399f3b6582316dac8b387aa1a744b0d6dcbe215775efea4e936b09553bccbfced3dcbc28af5532 WHIRLPOOL 5da896f02f24c5813a25cfccc4029b4f0a674c2f10d86057bdc59bf4f8be24bfba2886a91c63feadf5805ab26c85098c6c3c5be7c4b1ceddc1edee6328874a88 AUX make-3.82-archives-many-objs.patch 2110 SHA256 268db7c9e98f540ac9d5466bba17946f400463c1fd934d419e37fafaea7f0dd7 SHA512 c3669a4a2104621e3dab921793635c1443ec389ef160d1171d3181d58a1568d88ff35044b70298edef504f63e449ddb7fb27f9528cf588ca643dcdc3e40ebab7 WHIRLPOOL fc4e7b40bf67638c2e5ec476dd49a7ffd2dcd5aba465367ffbd734bec6b1c0a5b792cc704ba6414802318601ee558236d17b49bfdd7405610b0bb5f3bc0f9c06 +AUX make-3.82-construct-command-line.patch 2307 SHA256 5ba054cd764f493acc5f3f8acda9028e6fd2324508ca4dae7fbce04e491da0a5 SHA512 7c72bd7b9da986a8a37b047b7944a07b729fb16cd3413bce0e17008f2bbc4afabc48835580c4302d1381552873d1f07c93fbc4dfb6862eab0e46c62b0d35f557 WHIRLPOOL 59dae0e195a2fb6cdfb103f41870d31bae4d506df96b6e4abfbe96e39b35a6b6be9a25a7ce6663a67c3a842a09e8023e4c20754601dae1921514df77b6e3289a AUX make-3.82-copy-on-expand.patch 1812 SHA256 866a3942f9c747aecc5dd6c313f1fbd2f8f0b457a28197756c5713aefa45f543 SHA512 e7e31edfe3f11a91a4e2d0377a15328d6b54ab7b614c9d0c8ab6b18b5a8a5e2fa852ac7469bee685fcbdaa46d22f81fd585d0683a762afaa4160d7a7d5a558c8 WHIRLPOOL 4b8f123509131c495f15aacab0f906c864204c06554d07c5ac91d225ac6e4998d3fa1014a9780d8e3ef8a2c360c19a55bd84cd726f0ae0f150efdf92d3c60f11 AUX make-3.82-glob-speedup.patch 2833 SHA256 525896b152bb314cbf3c465575394584305ded895429bf4ade919d69dedfec06 SHA512 de6bacc4e389c2308a92b77b6f21f752ed078af6f5320481f84e8344532825a5b2225ddb9c8eba40badf9d377d1e5546906ab265e5c08a815cce01b0832dfe1c WHIRLPOOL ac2101cc81778c6a425566224594a89a958ce1d7dbd9bfb1e71bdea3ed794aa4c7de0b970f1603240f0f1072ef61c18a5fd839badd904dd2f551579dd45d7399 -AUX make-3.82-long-cmdline.patch 3004 SHA256 60d886307ba5a52b4cf9455278310f89a653f465ede00518ce0bf77f6ddd391a SHA512 b43303acdf540f6e985b2714f265ae923f551e67be1254d0344eb3ed9a4ccb399ab527a2500a9fe685b3489e47144674f889ee4c28b1acbdaa544206de5d61c3 WHIRLPOOL 9d96ce9d13fa73953d24a9d3c24186323c5c657df5dcf3c11a5bd51f664338eb65326245a9365d15fd3935ddb7354411fadbbf5664c35852ec523b6fe7edc482 +AUX make-3.82-intermediate-parallel.patch 1863 SHA256 05ba85e34ed727ea5bbeebcbeab467da1ec97edf7a9543b246896daa02b72a55 SHA512 6cebec44deda36e1a25fd5b0641ecfb90dc708d7d5dca2dd6108cc2bf0be142f26e96a5979a7b456c6f29517853e1abb7a755b078fef3c0f452437c7f0c38379 WHIRLPOOL 4ad303da4f73241ccb6a58f116b19d8f64fbe22bf2a6e0885c5df15ae95d3197fecda2a71a7b8f3be7a2de4362fd9de84359b7ee317154478b54b49389a994de +AUX make-3.82-long-cmdline-webkit.patch 3070 SHA256 f8c5019b1ec954465f4e99595108e59c122f81c7035bd5dd0194c47857bc1359 SHA512 245f53232bd9298cfd6d3cb88f6b17fdb7889670bf4f6c9ddf17fdfe1d808abb05f58965464196ab96b766f9f16dffd7f0d3c9418c672906d63caba2f492b40f WHIRLPOOL 5934975cac5a645a0a77aaf66adb8429b0fcbc4bf2bf9c4b72d4dc153ed4c621b20bbb81064cb57a28ee7886f7640bcf7160b779bc2348db5ba3bb58468509a6 +AUX make-3.82-long-cmdline.patch.old 3004 SHA256 60d886307ba5a52b4cf9455278310f89a653f465ede00518ce0bf77f6ddd391a SHA512 b43303acdf540f6e985b2714f265ae923f551e67be1254d0344eb3ed9a4ccb399ab527a2500a9fe685b3489e47144674f889ee4c28b1acbdaa544206de5d61c3 WHIRLPOOL 9d96ce9d13fa73953d24a9d3c24186323c5c657df5dcf3c11a5bd51f664338eb65326245a9365d15fd3935ddb7354411fadbbf5664c35852ec523b6fe7edc482 +AUX make-3.82-long-command-line.patch 1598 SHA256 da196f8050c717d42110e9328b3413a61719a7064e5b76bb1a539f492e6a1613 SHA512 b86336d6e337a8d7524a90ec75944772aab48cba45ab003adc5b71c3a4604350ecb16c398a003cd3ac7ff900d841b915d771626e9a8485778ce72e43510f107c WHIRLPOOL 8d9e9454cddef12e7def055add4a695f1c62ad13e57afec4219e3e88d290d12368dd27fb491f47fe8400ba8528755fc2faf90fae64e47daa79618358f8b17814 AUX make-3.82-memory-corruption.patch 899 SHA256 8bb84e638f40514045f0c57b0ee9da24024679f624614e4d954ce7e8f6414d3b SHA512 a65428bf6a1ff3bbe811cbf633577f15399bdaeab11fab0e66a104987df4dffc7779753aaaaad0534e591ca6df2fbebfca6522b35487e6bf9166b0681c271ae8 WHIRLPOOL 0200c90954a948108b21e5cec6c95f02479bc0d189cc9cf76de6b0f4c3647225fde83e775b07f23cc4d0e040c02c3ca5972c2f75ac1da8f2ec4896ff21a6ea2f AUX make-3.82-oneshell.patch 931 SHA256 017bd61d9ed44a9cda3f7dc2c49d65be33b9b3a225580ad36e9caf5c8481f184 SHA512 85784dfcfeee2b7d7d3d659edc39a268165ab3f9dbd3d716ffcc7ba52cb44c3011cf5aa3e57cdab12f2f8aeec4ff00ffe82959aef242951f4dc1a7c6d4b55d89 WHIRLPOOL 287b8cefc2abfbe4a7825499f6c15db192be1b7941c25a1d5d260fc795a38bbb97923a8da5fe0035697c3dae36bd26b2633d316f6c9c9882be23aee51ece2d62 -AUX make-3.82-parallel-build.patch 1325 SHA256 e806806dbdc0202220a6dabb3252013ae83f05d0d89ea3b1a45139728965d1e7 SHA512 fc0d2866861b14a7e3f99ffb7f5a7545235c6e617c7f25814332d6bc2436ea7569354ebfdb2bf0b4187ed475d734fd9245fa693486108febdb31d8702dfa0acc WHIRLPOOL a51d7b4ab0cf8e2d33a8284a4ee60268deb07a287d817ff20003a7fff796c28ccbd97c9f058749a28ded688644c98db3db07211cd8fcc612f6df5674c4efb914 +AUX make-3.82-parallel-build.patch.old 1325 SHA256 e806806dbdc0202220a6dabb3252013ae83f05d0d89ea3b1a45139728965d1e7 SHA512 fc0d2866861b14a7e3f99ffb7f5a7545235c6e617c7f25814332d6bc2436ea7569354ebfdb2bf0b4187ed475d734fd9245fa693486108febdb31d8702dfa0acc WHIRLPOOL a51d7b4ab0cf8e2d33a8284a4ee60268deb07a287d817ff20003a7fff796c28ccbd97c9f058749a28ded688644c98db3db07211cd8fcc612f6df5674c4efb914 AUX make-3.82-parallel-remake.patch 1422 SHA256 e2b63a63a44fb692798d237f888ad35a0899144fc5c6700270dee8ee455ac231 SHA512 640489810aa387524d5b7b0c38b22d13c423e1ca04c2a8915d1736904aa6e158f999eda5d6b0f17c21a85f97b490e73c85fd2d205d494c98099e379842a1fccc WHIRLPOOL cfc8ba57e22524ba675aa916eafcdc5b4bd2121f7d1dfd6cb73a2fadc365975af8360e61b70260632fa13292537ed7ea169861745deb3cd7956a6ff4ff364738 DIST make-3.82.tar.bz2 1242186 SHA256 e2c1a73f179c40c71e2fe8abf8a8a0688b8499538512984da4a76958d0402966 SHA512 3260be0d1a9a7c5eb0dbb87179a9a9521fdfc7809ca51f13ee5a37ba5e63d21ad50a4249ec7d3929a9d0ce8c8f6cf302558743964f0f7ff742efe283b91df9de WHIRLPOOL 0b6b5f95f33e0e5584cddad234afb2350bbf62f2a9c280703345100eba7867d80412cbe1b22f429eb32db43dd37e665e0f136d0262ee3f030cf384f77e99d1cb -EBUILD make-3.82-r4.ebuild 1533 SHA256 d928313a4692df7f3f569cdfd63d798884f8a651da7f22105a7486f6f6d76621 SHA512 74828b6cf21d4e9c96c257acd9d8e3bea3c3f509dd51a4d08629b7e0a907272c1db3920abf09c9a69c352ae939a8691512a3891d25039ac9cf0b99d72038a036 WHIRLPOOL bd50c9fc9284d5c36011234623e34d2a689254ec97ac71a2dd315730993b25091bd1a48918ea8617a82d8f8df24fce4295e20bbfff96623f86d022b796e4b99d +EBUILD make-3.82-r5.ebuild 1774 SHA256 ffbba2ec0a0e6f4a3049a1123fc42d4853d46ad23a7d985036d6837ec6e53ed9 SHA512 6fa67f844eb3634b9b766acdb96ded2554cd368bda09003bb72901f4c92bcfed081544a7d5af7015071a79179237edb267d4c28bde01b4608013dcc4b8e40fe7 WHIRLPOOL 307c80e66b68ff8c3773ad4b5ca3caccbc33c11bc092e4030eb9d209b45d449c5fdbc713793263d9c02dc7d62c5157bd72a37b6c5f984a23695b7c004305c7c0 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 00000000..c504c452 --- /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 +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 00000000..df9b8d47 --- /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 +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 new file mode 100644 index 00000000..685fdb70 --- /dev/null +++ b/sys-devel/make/files/make-3.82-long-cmdline-webkit.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 + + * 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 . + +--- 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 + ++#if defined(__linux__) /* defined (HAVE_LINUX_BINFMTS_H) && defined (HAVE_SYS_USER_H) */ ++#include ++#include ++#ifndef PAGE_SIZE ++#define PAGE_SIZE sysconf(_SC_PAGE_SIZE) ++#endif ++#include ++#endif ++ + /* Default shell to use. */ + #ifdef WINDOWS32 + #include +@@ -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-cmdline.patch b/sys-devel/make/files/make-3.82-long-cmdline.patch deleted file mode 100644 index f8a3ccc5..00000000 --- a/sys-devel/make/files/make-3.82-long-cmdline.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 - - * 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 . - ---- 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 - -+#if defined(__linux__) /* defined (HAVE_LINUX_BINFMTS_H) && defined (HAVE_SYS_USER_H) */ -+#include -+#include -+#ifndef PAGE_SIZE -+#define PAGE_SIZE sysconf(_SC_PAGE_SIZE) -+#endif -+#include -+#endif -+ - /* Default shell to use. */ - #ifdef WINDOWS32 - #include -@@ -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-long-cmdline.patch.old b/sys-devel/make/files/make-3.82-long-cmdline.patch.old new file mode 100644 index 00000000..f8a3ccc5 --- /dev/null +++ b/sys-devel/make/files/make-3.82-long-cmdline.patch.old @@ -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 + + * 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 . + +--- 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 + ++#if defined(__linux__) /* defined (HAVE_LINUX_BINFMTS_H) && defined (HAVE_SYS_USER_H) */ ++#include ++#include ++#ifndef PAGE_SIZE ++#define PAGE_SIZE sysconf(_SC_PAGE_SIZE) ++#endif ++#include ++#endif ++ + /* Default shell to use. */ + #ifdef WINDOWS32 + #include +@@ -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-long-command-line.patch b/sys-devel/make/files/make-3.82-long-command-line.patch new file mode 100644 index 00000000..9266786e --- /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 +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 deleted file mode 100644 index 77c5587e..00000000 --- a/sys-devel/make/files/make-3.82-parallel-build.patch +++ /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-build.patch.old b/sys-devel/make/files/make-3.82-parallel-build.patch.old new file mode 100644 index 00000000..77c5587e --- /dev/null +++ b/sys-devel/make/files/make-3.82-parallel-build.patch.old @@ -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/make-3.82-r4.ebuild b/sys-devel/make/make-3.82-r4.ebuild deleted file mode 100644 index 93dc851b..00000000 --- a/sys-devel/make/make-3.82-r4.ebuild +++ /dev/null @@ -1,49 +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-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 -} diff --git a/sys-devel/make/make-3.82-r5.ebuild b/sys-devel/make/make-3.82-r5.ebuild new file mode 100644 index 00000000..d480d0f7 --- /dev/null +++ b/sys-devel/make/make-3.82-r5.ebuild @@ -0,0 +1,56 @@ +# 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 +} -- cgit v1.2.3-65-gdbad