# HG changeset patch # User Michael Schloh von Bennewitz # Date 1332446022 -3600 # Node ID 633675dc493ca83b5f84e0f765963cdb2600451e # Parent cd6aad0e0d4ec8d3ba2a4f33a961b0c2fe81ef06 Add spawn header fixincludes logic and update to new vendor version. diff -r cd6aad0e0d4e -r 633675dc493c gcc/gcc.patch.spawn --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gcc/gcc.patch.spawn Thu Mar 22 20:53:42 2012 +0100 @@ -0,0 +1,137 @@ +Index: fixincludes/fixincl.x +diff -Nau fixincludes/fixincl.x.orig fixincludes/fixincl.x +--- fixincludes/fixincl.x.orig 2010-11-09 11:26:09.000000000 +0100 ++++ fixincludes/fixincl.x 2012-03-18 17:12:11.061364028 +0100 +@@ -15,7 +15,7 @@ + * certain ANSI-incompatible system header files which are fixed to work + * correctly with ANSI C and placed in a directory that GNU C will search. + * +- * This file contains 210 fixup descriptions. ++ * This file contains 211 fixup descriptions. + * + * See README for more information. + * +@@ -6969,6 +6969,43 @@ + + /* * * * * * * * * * * * * * * * * * * * * * * * * * + * ++ * Description of Solaris_Posix_Spawn_Restrict fix ++ */ ++tSCC zSolaris_Posix_Spawn_RestrictName[] = ++ "solaris_posix_spawn_restrict"; ++ ++/* ++ * File name selection pattern ++ */ ++tSCC zSolaris_Posix_Spawn_RestrictList[] = ++ "spawn.h\0"; ++/* ++ * Machine/OS name selection pattern ++ */ ++tSCC* apzSolaris_Posix_Spawn_RestrictMachs[] = { ++ "*-*-solaris2*", ++ (const char*)NULL }; ++ ++/* ++ * content selection pattern - do fix if pattern found ++ */ ++tSCC zSolaris_Posix_Spawn_RestrictSelect0[] = ++ "(.*[ \t]+)([a-z]+)\\[_RESTRICT_KYWD\\](.*)"; ++ ++#define SOLARIS_POSIX_SPAWN_RESTRICT_TEST_CT 1 ++static tTestDesc aSolaris_Posix_Spawn_RestrictTests[] = { ++ { TT_EGREP, zSolaris_Posix_Spawn_RestrictSelect0, (regex_t*)NULL }, }; ++ ++/* ++ * Fix Command Arguments for Solaris_Posix_Spawn_Restrict ++ */ ++static const char* apzSolaris_Posix_Spawn_RestrictPatch[] = { ++ "format", ++ "%1*_RESTRICT_KYWD %2%3", ++ (char*)NULL }; ++ ++/* * * * * * * * * * * * * * * * * * * * * * * * * * ++ * + * Description of Solaris_Stdio_Tag fix + */ + tSCC zSolaris_Stdio_TagName[] = +@@ -8552,9 +8589,9 @@ + * + * List of all fixes + */ +-#define REGEX_COUNT 249 ++#define REGEX_COUNT 250 + #define MACH_LIST_SIZE_LIMIT 181 +-#define FIX_COUNT 210 ++#define FIX_COUNT 211 + + /* + * Enumerate the fixes +@@ -8731,6 +8768,7 @@ + SOLARIS_INT_LIMITS_2_FIXIDX, + SOLARIS_INT_LIMITS_3_FIXIDX, + SOLARIS_INT_TYPES_FIXIDX, ++ SOLARIS_POSIX_SPAWN_RESTRICT_FIXIDX, + SOLARIS_STDIO_TAG_FIXIDX, + SOLARIS_SYS_VA_LIST_FIXIDX, + STATSSWTCH_FIXIDX, +@@ -9628,6 +9666,11 @@ + SOLARIS_INT_TYPES_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aSolaris_Int_TypesTests, apzSolaris_Int_TypesPatch, 0 }, + ++ { zSolaris_Posix_Spawn_RestrictName, zSolaris_Posix_Spawn_RestrictList, ++ apzSolaris_Posix_Spawn_RestrictMachs, ++ SOLARIS_POSIX_SPAWN_RESTRICT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, ++ aSolaris_Posix_Spawn_RestrictTests, apzSolaris_Posix_Spawn_RestrictPatch, 0 }, ++ + { zSolaris_Stdio_TagName, zSolaris_Stdio_TagList, + apzSolaris_Stdio_TagMachs, + SOLARIS_STDIO_TAG_TEST_CT, FD_MACH_ONLY, +Index: fixincludes/inclhack.def +diff -Nau fixincludes/inclhack.def.orig fixincludes/inclhack.def +--- fixincludes/inclhack.def.orig 2010-11-09 11:26:09.000000000 +0100 ++++ fixincludes/inclhack.def 2012-03-18 17:07:13.464117283 +0100 +@@ -3693,6 +3693,23 @@ + + + /* ++ * Solaris 10+ uses char *const argv[_RESTRICT_KYWD] in the ++ * posix_spawn declarations, which doesn't work with C++. ++ */ ++fix = { ++ hackname = solaris_posix_spawn_restrict; ++ files = spawn.h; ++ mach = '*-*-solaris2*'; ++ c_fix = format; ++ c_fix_arg = "%1*_RESTRICT_KYWD %2%3"; ++ select = "(.*[ \t]+)([a-z]+)\\[_RESTRICT_KYWD\\](.*)"; ++ test_text = ++ "char *const argv[_RESTRICT_KYWD],\n" ++ "char *const envp[_RESTRICT_KYWD]);"; ++}; ++ ++ ++/* + * Sun Solaris 8 has what appears to be some gross workaround for + * some old version of their c++ compiler. G++ doesn't want it + * either, but doesn't want to be tied to SunPRO version numbers. +Index: fixincludes/tests/base/spawn.h +diff -Nau fixincludes/tests/base/spawn.h.orig fixincludes/tests/base/spawn.h +--- fixincludes/tests/base/spawn.h.orig 1970-01-01 01:00:00.000000000 +0100 ++++ fixincludes/tests/base/spawn.h 2012-03-18 15:28:02.432219498 +0100 +@@ -0,0 +1,15 @@ ++/* DO NOT EDIT THIS FILE. ++ ++ It has been auto-edited by fixincludes from: ++ ++ "fixinc/tests/inc/spawn.h" ++ ++ This had to be done to correct non-standard usages in the ++ original, manufacturer supplied header file. */ ++ ++ ++ ++#if defined( SOLARIS_POSIX_SPAWN_RESTRICT_CHECK ) ++char *const *_RESTRICT_KYWD argv, ++char *const *_RESTRICT_KYWD envp); ++#endif /* SOLARIS_POSIX_SPAWN_RESTRICT_CHECK */ diff -r cd6aad0e0d4e -r 633675dc493c gcc/gcc.spec --- a/gcc/gcc.spec Thu Mar 22 20:51:00 2012 +0100 +++ b/gcc/gcc.spec Thu Mar 22 20:53:42 2012 +0100 @@ -22,7 +22,7 @@ ## # package version -%define V_full 4.6.2 +%define V_full 4.6.3 %define V_comp %nil # package information @@ -62,6 +62,7 @@ Source3: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{V_full}/gcc-java-%{V_full}.tar.bz2 Source4: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{V_full}/gcc-fortran-%{V_full}.tar.bz2 Patch0: gcc.patch +Patch1: gcc.patch.spawn # build information Prefix: %{l_prefix} @@ -114,6 +115,7 @@ %setup -q -T -D -b 4 %endif %patch -p0 + %patch -p0 -P 1 %{l_shtool} subst \ -e 's;\(instname="\$dir/\$name"\)i;\1;' \ ltmain.sh