From: ro Date: Tue, 14 Oct 2003 11:46:47 +0000 (+0000) Subject: * fixinc/inclhack.def (alpha_pthread_gcc): New fix. X-Git-Tag: upstream/4.9.2~76053 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=89ebafd52df6519a95994c81dda637419348628a;p=platform%2Fupstream%2Flinaro-gcc.git * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72465 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 84a2355..a3da592 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2003-10-14 Rainer Orth + + * 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. + 2003-10-13 Eric Christopher * config/frv/frv.c (frv_adjust_field_align): Redo check for 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 : 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 . + */ +fix = { + hackname = alpha_pthread_gcc; + files = pthread.h; + select = "#else\n# error : 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 : 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 : unrecognized compiler. +#endif +#endif /* ALPHA_PTHREAD_GCC_CHECK */ + + #if defined( PTHREAD_PAGE_SIZE_CHECK ) extern int __page_size; #endif /* PTHREAD_PAGE_SIZE_CHECK */