diff options
author | Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> | 2003-10-14 11:46:47 +0000 |
---|---|---|
committer | Rainer Orth <ro@gcc.gnu.org> | 2003-10-14 11:46:47 +0000 |
commit | 821281db25562b7ef271fda9e2fd39a70cfb2731 (patch) | |
tree | ff4b640d515d09b3f1a832dd3ca68a75c6fd90f8 /gcc/fixinc | |
parent | b16c143519a832de3aba9e35b214514e38619f8f (diff) | |
download | gcc-821281db25562b7ef271fda9e2fd39a70cfb2731.zip gcc-821281db25562b7ef271fda9e2fd39a70cfb2731.tar.gz gcc-821281db25562b7ef271fda9e2fd39a70cfb2731.tar.bz2 |
re PR bootstrap/9330 ([alpha-osf]small alphaev56-dec-osf5.1 --enable-threads=posix problem)
* fixinc/inclhack.def (alpha_pthread_gcc): New fix.
* fixinc/fixincl.x: Regenerate.
* fixinc/tests/base/pthread.h [ALPHA_PTHREAD_GCC_CHECK]: New
testcase.
Fixes PR bootstrap/9330.
From-SVN: r72465
Diffstat (limited to 'gcc/fixinc')
-rw-r--r-- | gcc/fixinc/fixincl.x | 56 | ||||
-rw-r--r-- | gcc/fixinc/inclhack.def | 21 | ||||
-rw-r--r-- | gcc/fixinc/tests/base/pthread.h | 10 |
3 files changed, 82 insertions, 5 deletions
diff --git a/gcc/fixinc/fixincl.x b/gcc/fixinc/fixincl.x index a30a384..19f9880 100644 --- a/gcc/fixinc/fixincl.x +++ b/gcc/fixinc/fixincl.x @@ -2,11 +2,11 @@ * * DO NOT EDIT THIS FILE (fixincl.x) * - * It has been AutoGen-ed Monday October 6, 2003 at 09:28:53 PM MEST + * It has been AutoGen-ed Tuesday October 14, 2003 at 02:19:40 AM MEST * From the definitions inclhack.def * and the template file fixincl */ -/* DO NOT CVS-MERGE THIS FILE, EITHER Mon Oct 6 21:28:53 MEST 2003 +/* DO NOT CVS-MERGE THIS FILE, EITHER Tue Oct 14 02:19:40 MEST 2003 * * You must regenerate it. Use the ./genfixes script. * @@ -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 158 fixup descriptions. + * This file contains 159 fixup descriptions. * * See README for more information. * @@ -900,6 +900,46 @@ static const char* apzAlpha_PthreadPatch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * + * Description of Alpha_Pthread_Gcc fix + */ +tSCC zAlpha_Pthread_GccName[] = + "alpha_pthread_gcc"; + +/* + * File name selection pattern + */ +tSCC zAlpha_Pthread_GccList[] = + "|pthread.h|"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzAlpha_Pthread_GccMachs[] = { + "alpha*-dec-osf*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zAlpha_Pthread_GccSelect0[] = + "#else\n\ +# error <pthread.h>: unrecognized compiler."; + +#define ALPHA_PTHREAD_GCC_TEST_CT 1 +static tTestDesc aAlpha_Pthread_GccTests[] = { + { TT_EGREP, zAlpha_Pthread_GccSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Alpha_Pthread_Gcc + */ +static const char* apzAlpha_Pthread_GccPatch[] = { + "format", + "#elif defined (__GNUC__)\n\ +# define _PTHREAD_ENV_GCC\n\ +%0", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * * Description of Alpha_Sbrk fix */ tSCC zAlpha_SbrkName[] = @@ -6269,9 +6309,9 @@ static const char* apzX11_SprintfPatch[] = { * * List of all fixes */ -#define REGEX_COUNT 178 +#define REGEX_COUNT 179 #define MACH_LIST_SIZE_LIMIT 261 -#define FIX_COUNT 158 +#define FIX_COUNT 159 /* * Enumerate the fixes @@ -6296,6 +6336,7 @@ typedef enum { ALPHA_GETOPT_FIXIDX, ALPHA_PARENS_FIXIDX, ALPHA_PTHREAD_FIXIDX, + ALPHA_PTHREAD_GCC_FIXIDX, ALPHA_SBRK_FIXIDX, AVOID_BOOL_DEFINE_FIXIDX, AVOID_BOOL_TYPE_FIXIDX, @@ -6533,6 +6574,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { ALPHA_PTHREAD_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aAlpha_PthreadTests, apzAlpha_PthreadPatch, 0 }, + { zAlpha_Pthread_GccName, zAlpha_Pthread_GccList, + apzAlpha_Pthread_GccMachs, + ALPHA_PTHREAD_GCC_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aAlpha_Pthread_GccTests, apzAlpha_Pthread_GccPatch, 0 }, + { zAlpha_SbrkName, zAlpha_SbrkList, apzAlpha_SbrkMachs, ALPHA_SBRK_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, diff --git a/gcc/fixinc/inclhack.def b/gcc/fixinc/inclhack.def index 636ac0f..2d0239b 100644 --- a/gcc/fixinc/inclhack.def +++ b/gcc/fixinc/inclhack.def @@ -599,6 +599,27 @@ fix = { /* + * Recognize GCC in Tru64 UNIX V5.1B <pthread.h>. + */ +fix = { + hackname = alpha_pthread_gcc; + files = pthread.h; + select = "#else\n# error <pthread.h>: unrecognized compiler."; + + mach = "alpha*-dec-osf*"; + c_fix = format; + c_fix_arg = "#elif defined (__GNUC__)\n" + "# define _PTHREAD_ENV_GCC\n" + "%0"; + + test_text = "# define _PTHREAD_ENV_INTELC\n" + "#else\n" + "# error <pthread.h>: unrecognized compiler.\n" + "#endif"; +}; + + +/* * Fix return value of sbrk in unistd.h on Alpha OSF/1 V2.0 * And OpenBSD. */ diff --git a/gcc/fixinc/tests/base/pthread.h b/gcc/fixinc/tests/base/pthread.h index 95ad2d5..bd10f5a 100644 --- a/gcc/fixinc/tests/base/pthread.h +++ b/gcc/fixinc/tests/base/pthread.h @@ -22,6 +22,16 @@ #endif /* ALPHA_PTHREAD_CHECK */ +#if defined( ALPHA_PTHREAD_GCC_CHECK ) +# define _PTHREAD_ENV_INTELC +#elif defined (__GNUC__) +# define _PTHREAD_ENV_GCC +#else +# error <pthread.h>: unrecognized compiler. +#endif +#endif /* ALPHA_PTHREAD_GCC_CHECK */ + + #if defined( PTHREAD_PAGE_SIZE_CHECK ) extern int __page_size; #endif /* PTHREAD_PAGE_SIZE_CHECK */ |