Commit 821281db by Rainer Orth Committed by Rainer Orth

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
parent b16c1435
2003-10-14 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* 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 <echristo@redhat.com> 2003-10-13 Eric Christopher <echristo@redhat.com>
* config/frv/frv.c (frv_adjust_field_align): Redo check for * config/frv/frv.c (frv_adjust_field_align): Redo check for
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
* *
* DO NOT EDIT THIS FILE (fixincl.x) * 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 * From the definitions inclhack.def
* and the template file fixincl * 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. * You must regenerate it. Use the ./genfixes script.
* *
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* certain ANSI-incompatible system header files which are fixed to work * 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. * 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. * See README for more information.
* *
...@@ -900,6 +900,46 @@ static const char* apzAlpha_PthreadPatch[] = { ...@@ -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 * Description of Alpha_Sbrk fix
*/ */
tSCC zAlpha_SbrkName[] = tSCC zAlpha_SbrkName[] =
...@@ -6269,9 +6309,9 @@ static const char* apzX11_SprintfPatch[] = { ...@@ -6269,9 +6309,9 @@ static const char* apzX11_SprintfPatch[] = {
* *
* List of all fixes * List of all fixes
*/ */
#define REGEX_COUNT 178 #define REGEX_COUNT 179
#define MACH_LIST_SIZE_LIMIT 261 #define MACH_LIST_SIZE_LIMIT 261
#define FIX_COUNT 158 #define FIX_COUNT 159
/* /*
* Enumerate the fixes * Enumerate the fixes
...@@ -6296,6 +6336,7 @@ typedef enum { ...@@ -6296,6 +6336,7 @@ typedef enum {
ALPHA_GETOPT_FIXIDX, ALPHA_GETOPT_FIXIDX,
ALPHA_PARENS_FIXIDX, ALPHA_PARENS_FIXIDX,
ALPHA_PTHREAD_FIXIDX, ALPHA_PTHREAD_FIXIDX,
ALPHA_PTHREAD_GCC_FIXIDX,
ALPHA_SBRK_FIXIDX, ALPHA_SBRK_FIXIDX,
AVOID_BOOL_DEFINE_FIXIDX, AVOID_BOOL_DEFINE_FIXIDX,
AVOID_BOOL_TYPE_FIXIDX, AVOID_BOOL_TYPE_FIXIDX,
...@@ -6533,6 +6574,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { ...@@ -6533,6 +6574,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
ALPHA_PTHREAD_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, ALPHA_PTHREAD_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aAlpha_PthreadTests, apzAlpha_PthreadPatch, 0 }, 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, { zAlpha_SbrkName, zAlpha_SbrkList,
apzAlpha_SbrkMachs, apzAlpha_SbrkMachs,
ALPHA_SBRK_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, ALPHA_SBRK_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
......
...@@ -599,6 +599,27 @@ fix = { ...@@ -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 * Fix return value of sbrk in unistd.h on Alpha OSF/1 V2.0
* And OpenBSD. * And OpenBSD.
*/ */
......
...@@ -22,6 +22,16 @@ ...@@ -22,6 +22,16 @@
#endif /* ALPHA_PTHREAD_CHECK */ #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 ) #if defined( PTHREAD_PAGE_SIZE_CHECK )
extern int __page_size; extern int __page_size;
#endif /* PTHREAD_PAGE_SIZE_CHECK */ #endif /* PTHREAD_PAGE_SIZE_CHECK */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment