re PR target/35460 (undefined reference to `__builtin_stdarg_start' when compiling 2/29 snapshot on OpenBSD)

2008-12-31  Andreas Tobler  <a.tobler@schweiz.org>

	PR target/35460
	* inclhack.def (openbsd_va_start): Use __builtin_va_start
	for OpenBSD.
	* fixincl.x: Regenerate.

From-SVN: r142980
This commit is contained in:
Andreas Tobler 2008-12-31 13:52:53 +00:00 committed by Andreas Tobler
parent cc81fd1828
commit 261b8381fe
3 changed files with 68 additions and 5 deletions

View File

@ -1,3 +1,10 @@
2008-12-31 Andreas Tobler <a.tobler@schweiz.org>
PR target/35460
* inclhack.def (openbsd_va_start): Use __builtin_va_start
for OpenBSD.
* fixincl.x: Regenerate.
2008-12-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure: Regenerate.

View File

@ -2,11 +2,11 @@
*
* DO NOT EDIT THIS FILE (fixincl.x)
*
* It has been AutoGen-ed Wednesday December 10, 2008 at 10:13:23 AM PST
* It has been AutoGen-ed Wednesday December 31, 2008 at 02:49:07 PM CET
* From the definitions inclhack.def
* and the template file fixincl
*/
/* DO NOT SVN-MERGE THIS FILE, EITHER Wed Dec 10 10:13:23 PST 2008
/* DO NOT SVN-MERGE THIS FILE, EITHER Wed Dec 31 14:49:07 CET 2008
*
* 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 177 fixup descriptions.
* This file contains 178 fixup descriptions.
*
* See README for more information.
*
@ -4732,6 +4732,43 @@ static const char* apzObstack_Lvalue_CastPatch[] = {
"((*((%1*)%2) = (%3)), (%2 += sizeof (%1)))",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Openbsd_Va_Start fix
*/
tSCC zOpenbsd_Va_StartName[] =
"openbsd_va_start";
/*
* File name selection pattern
*/
tSCC zOpenbsd_Va_StartList[] =
"stdarg.h\0";
/*
* Machine/OS name selection pattern
*/
tSCC* apzOpenbsd_Va_StartMachs[] = {
"*-*-openbsd*",
(const char*)NULL };
/*
* content selection pattern - do fix if pattern found
*/
tSCC zOpenbsd_Va_StartSelect0[] =
"__builtin_stdarg_start";
#define OPENBSD_VA_START_TEST_CT 1
static tTestDesc aOpenbsd_Va_StartTests[] = {
{ TT_EGREP, zOpenbsd_Va_StartSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Openbsd_Va_Start
*/
static const char* apzOpenbsd_Va_StartPatch[] = {
"format",
"__builtin_va_start",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Osf_Namespace_A fix
@ -7182,9 +7219,9 @@ static const char* apzX11_SprintfPatch[] = {
*
* List of all fixes
*/
#define REGEX_COUNT 223
#define REGEX_COUNT 224
#define MACH_LIST_SIZE_LIMIT 181
#define FIX_COUNT 177
#define FIX_COUNT 178
/*
* Enumerate the fixes
@ -7307,6 +7344,7 @@ typedef enum {
NEXT_WAIT_UNION_FIXIDX,
NODEENT_SYNTAX_FIXIDX,
OBSTACK_LVALUE_CAST_FIXIDX,
OPENBSD_VA_START_FIXIDX,
OSF_NAMESPACE_A_FIXIDX,
OSF_NAMESPACE_C_FIXIDX,
PTHREAD_PAGE_SIZE_FIXIDX,
@ -7955,6 +7993,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
OBSTACK_LVALUE_CAST_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aObstack_Lvalue_CastTests, apzObstack_Lvalue_CastPatch, 0 },
{ zOpenbsd_Va_StartName, zOpenbsd_Va_StartList,
apzOpenbsd_Va_StartMachs,
OPENBSD_VA_START_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aOpenbsd_Va_StartTests, apzOpenbsd_Va_StartPatch, 0 },
{ zOsf_Namespace_AName, zOsf_Namespace_AList,
apzOsf_Namespace_AMachs,
OSF_NAMESPACE_A_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,

View File

@ -2541,6 +2541,19 @@ fix = {
test_text = "*((void **) (h)->next_free)++ = (aptr)";
};
/*
* Fix OpenBSD's va_start define.
*/
fix = {
hackname = openbsd_va_start;
mach = "*-*-openbsd*";
files = stdarg.h;
select = '__builtin_stdarg_start';
c_fix = format;
c_fix_arg = __builtin_va_start;
test_text = "#define va_start(v,l) __builtin_stdarg_start((v),l)";
};
/*
* sys/lc_core.h on some versions of OSF1/4.x pollutes the namespace by