From 63729d8454d1917c037de9818b96a4a4e60cc8b3 Mon Sep 17 00:00:00 2001 From: Krister Walfridsson Date: Thu, 26 Jul 2007 01:51:47 +0200 Subject: [PATCH] re PR target/30058 (bootstrap broken on i386-unknown-netbsdelf2.0.2) 2007-07-24 Krister Walfridsson PR target/30058 * inclhack.def (netbsd_c99_inline_2): New. * fixincl.x: Regenerate. * tests/base/signal.h: Update. From-SVN: r126937 --- fixincludes/ChangeLog | 7 ++++ fixincludes/fixincl.x | 68 ++++++++++++++++++++++++++++----- fixincludes/inclhack.def | 19 +++++++++ fixincludes/tests/base/signal.h | 9 +++++ 4 files changed, 93 insertions(+), 10 deletions(-) diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog index eb1e719baf2..c9ad1a795ee 100644 --- a/fixincludes/ChangeLog +++ b/fixincludes/ChangeLog @@ -1,3 +1,10 @@ +2007-07-24 Krister Walfridsson + + PR target/30058 + * inclhack.def (netbsd_c99_inline_2): New. + * fixincl.x: Regenerate. + * tests/base/signal.h: Update. + 2007-07-18 Kaveh R. Ghazi PR target/32641 diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x index 41818d5605a..a330dfe9417 100644 --- a/fixincludes/fixincl.x +++ b/fixincludes/fixincl.x @@ -2,11 +2,11 @@ * * DO NOT EDIT THIS FILE (fixincl.x) * - * It has been AutoGen-ed Saturday July 7, 2007 at 11:23:30 PM EDT + * It has been AutoGen-ed Wednesday July 25, 2007 at 12:50:31 PM CEST * From the definitions inclhack.def * and the template file fixincl */ -/* DO NOT SVN-MERGE THIS FILE, EITHER Sat Jul 7 23:23:30 EDT 2007 +/* DO NOT SVN-MERGE THIS FILE, EITHER Wed Jul 25 12:50:31 CEST 2007 * * 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 210 fixup descriptions. + * This file contains 211 fixup descriptions. * * See README for more information. * @@ -26,7 +26,8 @@ * * You may redistribute it and/or modify it under the terms of the * GNU General Public License, as published by the Free Software - * Foundation; either version 2, or (at your option) any later version. + * Foundation; either version 2 of the License, or (at your option) + * any later version. * * inclhack is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -34,10 +35,10 @@ * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with inclhack. See the file "COPYING". If not, - * write to: The Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * along with inclhack. If not, write to: + * The Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301, USA. */ /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -4652,6 +4653,47 @@ __attribute__((__gnu_inline__))\n\ __inline int", (char*)NULL }; +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Netbsd_C99_Inline_2 fix + */ +tSCC zNetbsd_C99_Inline_2Name[] = + "netbsd_c99_inline_2"; + +/* + * File name selection pattern + */ +tSCC zNetbsd_C99_Inline_2List[] = + "signal.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzNetbsd_C99_Inline_2Machs[] = { + "*-*-netbsd*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zNetbsd_C99_Inline_2Select0[] = + "#define _SIGINLINE extern __inline"; + +#define NETBSD_C99_INLINE_2_TEST_CT 1 +static tTestDesc aNetbsd_C99_Inline_2Tests[] = { + { TT_EGREP, zNetbsd_C99_Inline_2Select0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Netbsd_C99_Inline_2 + */ +static const char* apzNetbsd_C99_Inline_2Patch[] = { + "format", + "#ifdef __GNUC_STDC_INLINE__\n\ +#define _SIGINLINE extern __attribute__((__gnu_inline__)) __inline\n\ +#else\n\ +%0\n\ +#endif", + (char*)NULL }; + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * Description of Netbsd_Extra_Semicolon fix @@ -8563,9 +8605,9 @@ static const char* apzX11_SprintfPatch[] = { * * List of all fixes */ -#define REGEX_COUNT 255 +#define REGEX_COUNT 256 #define MACH_LIST_SIZE_LIMIT 261 -#define FIX_COUNT 210 +#define FIX_COUNT 211 /* * Enumerate the fixes @@ -8683,6 +8725,7 @@ typedef enum { NESTED_MOTOROLA_FIXIDX, NESTED_SYS_LIMITS_FIXIDX, NETBSD_C99_INLINE_1_FIXIDX, + NETBSD_C99_INLINE_2_FIXIDX, NETBSD_EXTRA_SEMICOLON_FIXIDX, NEXT_MATH_PREFIX_FIXIDX, NEXT_TEMPLATE_FIXIDX, @@ -9344,6 +9387,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { NETBSD_C99_INLINE_1_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aNetbsd_C99_Inline_1Tests, apzNetbsd_C99_Inline_1Patch, 0 }, + { zNetbsd_C99_Inline_2Name, zNetbsd_C99_Inline_2List, + apzNetbsd_C99_Inline_2Machs, + NETBSD_C99_INLINE_2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aNetbsd_C99_Inline_2Tests, apzNetbsd_C99_Inline_2Patch, 0 }, + { zNetbsd_Extra_SemicolonName, zNetbsd_Extra_SemicolonList, apzNetbsd_Extra_SemicolonMachs, NETBSD_EXTRA_SEMICOLON_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def index fbc1b2a62d4..f7fbd8ce8aa 100644 --- a/fixincludes/inclhack.def +++ b/fixincludes/inclhack.def @@ -2608,6 +2608,25 @@ fix = { }; +fix = { + hackname = netbsd_c99_inline_2; + mach = *-*-netbsd*; + files = signal.h; + select = "#define _SIGINLINE extern __inline"; + + c_fix = format; + c_fix_arg = <<- _EOArg_ + #ifdef __GNUC_STDC_INLINE__ + #define _SIGINLINE extern __attribute__((__gnu_inline__)) __inline + #else + %0 + #endif + _EOArg_; + + test_text = "#define _SIGINLINE extern __inline"; +}; + + /* * NetBSD has a semicolon after the ending '}' for some extern "C". */ diff --git a/fixincludes/tests/base/signal.h b/fixincludes/tests/base/signal.h index 91afbedb01c..1c4517e2c4b 100644 --- a/fixincludes/tests/base/signal.h +++ b/fixincludes/tests/base/signal.h @@ -18,3 +18,12 @@ __inline int sigaddset(sigset_t *set, int signo) {} #endif /* NETBSD_C99_INLINE_1_CHECK */ + + +#if defined( NETBSD_C99_INLINE_2_CHECK ) +#ifdef __GNUC_STDC_INLINE__ +#define _SIGINLINE extern __attribute__((__gnu_inline__)) __inline +#else +#define _SIGINLINE extern __inline +#endif +#endif /* NETBSD_C99_INLINE_2_CHECK */