aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2004-10-13 06:19:04 +0000
committerMark Mitchell <mark@codesourcery.com>2004-10-13 06:19:04 +0000
commit552cd94b0afd0d050c9781cde1a836f047915c4e (patch)
tree9ddff76379eff5a2e2f5168d8ab32958ce782ddf
parent353938fd0b8bb15d9cd5f7fc8045c49beca0f5b4 (diff)
gcc/gcc.c (do_spec_1): Do not add a -L path for a directory in
the prefix list if we have already added a multilib directory based on that path. (main): Do not add MD_EXEC_PREFIX to the list of directories to search with -L. * gcc/config/i386/sol2-10.h (TARGET_SUB_OS_CPP_BUILTINS): Do not define. (MD_STARTFILE_PREFIX): Likewise. * gcc/fixinc/inclhack.def (gnu_types): Do not use on Solaris 2.1x. (limits_ifndefs): Remove. (solaris_longlong): Likewise. (stdio_va_list): Do not use on Solaris 2.1x. (stdio_stdarg.h): Likewise. (svr4__p): Remove. (undefine_null): Remove. * gcc/fixinc/fixincl.x: Regenerated. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/csl-sol210-3_4-branch@88968 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--ChangeLog.csl21
-rw-r--r--gcc/config/i386/sol2-10.h11
-rw-r--r--gcc/fixinc/fixincl.x227
-rw-r--r--gcc/fixinc/inclhack.def102
-rw-r--r--gcc/gcc.c14
5 files changed, 84 insertions, 291 deletions
diff --git a/ChangeLog.csl b/ChangeLog.csl
index 6248c97ce7c..bc0a7716535 100644
--- a/ChangeLog.csl
+++ b/ChangeLog.csl
@@ -1,5 +1,26 @@
2004-10-12 Mark Mitchell <mark@codesourcery.com>
+ gcc/gcc.c (do_spec_1): Do not add a -L path for a directory in
+ the prefix list if we have already added a multilib directory
+ based on that path.
+ (main): Do not add MD_EXEC_PREFIX to the list of directories to
+ search with -L.
+
+ * gcc/config/i386/sol2-10.h (TARGET_SUB_OS_CPP_BUILTINS): Do not
+ define.
+ (MD_STARTFILE_PREFIX): Likewise.
+
+ * gcc/fixinc/inclhack.def (gnu_types): Do not use on Solaris 2.1x.
+ (limits_ifndefs): Remove.
+ (solaris_longlong): Likewise.
+ (stdio_va_list): Do not use on Solaris 2.1x.
+ (stdio_stdarg.h): Likewise.
+ (svr4__p): Remove.
+ (undefine_null): Remove.
+ * gcc/fixinc/fixincl.x: Regenerated.
+
+2004-10-12 Mark Mitchell <mark@codesourcery.com>
+
Revert:
* gcc/config/i386/sol2-10.h (LIBGCC_SPEC): Add support for -nolibgcc.
diff --git a/gcc/config/i386/sol2-10.h b/gcc/config/i386/sol2-10.h
index 822ecfe80bb..3576678589b 100644
--- a/gcc/config/i386/sol2-10.h
+++ b/gcc/config/i386/sol2-10.h
@@ -19,14 +19,6 @@ along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/* The Solaris 2.10 headers expect _LONGLONG_TYPE to be defined if
- "long long" is recognized by the compiler. */
-#undef TARGET_SUB_OS_CPP_BUILTINS
-#define TARGET_SUB_OS_CPP_BUILTINS() \
- do { \
- builtin_define ("_LONGLONG_TYPE"); \
- } while (0)
-
#undef ASM_COMMENT_START
#define ASM_COMMENT_START "/"
@@ -90,6 +82,9 @@ Boston, MA 02111-1307, USA. */
#define LINK_ARCH_SPEC TARGET_LD_EMULATION \
"%{m64:" LINK_ARCH64_SPEC "}%{!m64:" LINK_ARCH32_SPEC "}"
+/* We do not need to search a special directory for startup files. */
+#undef MD_STARTFILE_PREFIX
+
#undef TARGET_ASM_NAMED_SECTION
#define TARGET_ASM_NAMED_SECTION i386_solaris_elf_named_section
diff --git a/gcc/fixinc/fixincl.x b/gcc/fixinc/fixincl.x
index 2090123f7ac..f6b2d379b71 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 Tuesday September 21, 2004 at 11:22:56 PM PDT
+ * It has been AutoGen-ed Tuesday October 12, 2004 at 07:10:33 PM PDT
* From the definitions inclhack.def
* and the template file fixincl
*/
-/* DO NOT CVS-MERGE THIS FILE, EITHER Tue Sep 21 23:22:56 PDT 2004
+/* DO NOT CVS-MERGE THIS FILE, EITHER Tue Oct 12 19:10:33 PDT 2004
*
* 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 178 fixup descriptions.
+ * This file contains 174 fixup descriptions.
*
* See README for more information.
*
@@ -1886,7 +1886,9 @@ tSCC zGnu_TypesList[] =
/*
* Machine/OS name selection pattern
*/
-#define apzGnu_TypesMachs (const char**)NULL
+tSCC* apzGnu_TypesMachs[] = {
+ "*-*-solaris2.1[0-9]*",
+ (const char*)NULL };
/*
* content selection pattern - do fix if pattern found
@@ -3289,50 +3291,6 @@ extern [a-z_]+ mem.*(\n\
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description of Limits_Ifndefs fix
- */
-tSCC zLimits_IfndefsName[] =
- "limits_ifndefs";
-
-/*
- * File name selection pattern
- */
-tSCC zLimits_IfndefsList[] =
- "|sys/limits.h|limits.h|";
-/*
- * Machine/OS name selection pattern
- */
-#define apzLimits_IfndefsMachs (const char**)NULL
-
-/*
- * content selection pattern - do fix if pattern found
- */
-tSCC zLimits_IfndefsSelect0[] =
- "^[ \t]*#[ \t]*define[ \t]+((FLT|DBL)_(MIN|MAX|DIG))[ \t].*";
-
-/*
- * content bypass pattern - skip fix if pattern found
- */
-tSCC zLimits_IfndefsBypass0[] =
- "ifndef[ \t]+FLT_(MIN|MAX)";
-
-#define LIMITS_IFNDEFS_TEST_CT 2
-static tTestDesc aLimits_IfndefsTests[] = {
- { TT_NEGREP, zLimits_IfndefsBypass0, (regex_t*)NULL },
- { TT_EGREP, zLimits_IfndefsSelect0, (regex_t*)NULL }, };
-
-/*
- * Fix Command Arguments for Limits_Ifndefs
- */
-static const char* apzLimits_IfndefsPatch[] = {
- "format",
- "#ifndef %1\n\
-%0\n\
-#endif",
- (char*)NULL };
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * *
- *
* Description of Lynx_Void_Int fix
*/
tSCC zLynx_Void_IntName[] =
@@ -4480,46 +4438,6 @@ static const char* apzSco_UtimePatch[] = {
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description of Solaris_Longlong fix
- */
-tSCC zSolaris_LonglongName[] =
- "solaris_longlong";
-
-/*
- * File name selection pattern
- */
-tSCC zSolaris_LonglongList[] =
- "|sys/feature_tests.h|";
-/*
- * Machine/OS name selection pattern
- */
-tSCC* apzSolaris_LonglongMachs[] = {
- "*-*-solaris2.1[0-9]",
- "*-*-solaris2.1[0-9].*",
- (const char*)NULL };
-
-/*
- * content selection pattern - do fix if pattern found
- */
-tSCC zSolaris_LonglongSelect0[] =
- "#error.*No long long.*";
-
-#define SOLARIS_LONGLONG_TEST_CT 1
-static tTestDesc aSolaris_LonglongTests[] = {
- { TT_EGREP, zSolaris_LonglongSelect0, (regex_t*)NULL }, };
-
-/*
- * Fix Command Arguments for Solaris_Longlong
- */
-static const char* apzSolaris_LonglongPatch[] = {
- "format",
- "#ifndef __GNUC__\n\
-%0\n\
-#endif",
- (char*)NULL };
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * *
- *
* Description of Solaris_Mutex_Init_1 fix
*/
tSCC zSolaris_Mutex_Init_1Name[] =
@@ -4652,8 +4570,15 @@ tSCC zSolaris_Stdio_TagList[] =
tSCC zSolaris_Stdio_TagSelect0[] =
"__cplusplus < 54321L";
-#define SOLARIS_STDIO_TAG_TEST_CT 1
+/*
+ * content bypass pattern - skip fix if pattern found
+ */
+tSCC zSolaris_Stdio_TagBypass0[] =
+ "__GNUC__";
+
+#define SOLARIS_STDIO_TAG_TEST_CT 2
static tTestDesc aSolaris_Stdio_TagTests[] = {
+ { TT_NEGREP, zSolaris_Stdio_TagBypass0, (regex_t*)NULL },
{ TT_EGREP, zSolaris_Stdio_TagSelect0, (regex_t*)NULL }, };
/*
@@ -4803,7 +4728,9 @@ tSCC zStdio_Stdarg_HList[] =
/*
* Machine/OS name selection pattern
*/
-#define apzStdio_Stdarg_HMachs (const char**)NULL
+tSCC* apzStdio_Stdarg_HMachs[] = {
+ "*-*-solaris2.1[0-9]",
+ (const char*)NULL };
/*
* content bypass pattern - skip fix if pattern found
@@ -4839,7 +4766,9 @@ tSCC zStdio_Va_ListList[] =
/*
* Machine/OS name selection pattern
*/
-#define apzStdio_Va_ListMachs (const char**)NULL
+tSCC* apzStdio_Va_ListMachs[] = {
+ "*-*-solaris2.1[0-9]",
+ (const char*)NULL };
/*
* content bypass pattern - skip fix if pattern found
@@ -5354,43 +5283,6 @@ static const char* apzSunos_StrlenPatch[] = {
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description of Svr4__P fix
- */
-tSCC zSvr4__PName[] =
- "svr4__p";
-
-/*
- * File name selection pattern
- */
-tSCC zSvr4__PList[] =
- "|math.h|floatingpoint.h|";
-/*
- * Machine/OS name selection pattern
- */
-#define apzSvr4__PMachs (const char**)NULL
-
-/*
- * content selection pattern - do fix if pattern found
- */
-tSCC zSvr4__PSelect0[] =
- "^#define[ \t]+__P.*";
-
-#define SVR4__P_TEST_CT 1
-static tTestDesc aSvr4__PTests[] = {
- { TT_EGREP, zSvr4__PSelect0, (regex_t*)NULL }, };
-
-/*
- * Fix Command Arguments for Svr4__P
- */
-static const char* apzSvr4__PPatch[] = {
- "format",
- "#ifndef __P\n\
-%0\n\
-#endif",
- (char*)NULL };
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * *
- *
* Description of Svr4_Disable_Opt fix
*/
tSCC zSvr4_Disable_OptName[] =
@@ -6431,51 +6323,6 @@ static const char* apzUltrix_UnistdPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description of Undefine_Null fix
- */
-tSCC zUndefine_NullName[] =
- "undefine_null";
-
-/*
- * File name selection pattern
- */
-#define zUndefine_NullList (char*)NULL
-/*
- * Machine/OS name selection pattern
- */
-#define apzUndefine_NullMachs (const char**)NULL
-
-/*
- * content selection pattern - do fix if pattern found
- */
-tSCC zUndefine_NullSelect0[] =
- "^#[ \t]*define[ \t]+NULL[ \t]";
-
-/*
- * content bypass pattern - skip fix if pattern found
- */
-tSCC zUndefine_NullBypass0[] =
- "#[ \t]*(ifn|un)def[ \t]+NULL($|[ \t\r])";
-
-#define UNDEFINE_NULL_TEST_CT 2
-static tTestDesc aUndefine_NullTests[] = {
- { TT_NEGREP, zUndefine_NullBypass0, (regex_t*)NULL },
- { TT_EGREP, zUndefine_NullSelect0, (regex_t*)NULL }, };
-
-/*
- * Fix Command Arguments for Undefine_Null
- */
-static const char* apzUndefine_NullPatch[] = {
- "format",
- "#ifndef NULL\n\
-#define NULL%1\n\
-#endif\n",
- "^#[ \t]*define[ \t]+NULL([^\r\n\
-]+)[\r]*\n",
- (char*)NULL };
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * *
- *
* Description of Unicosmk_Restrict fix
*/
tSCC zUnicosmk_RestrictName[] =
@@ -7074,9 +6921,9 @@ static const char* apzX11_SprintfPatch[] = {
*
* List of all fixes
*/
-#define REGEX_COUNT 204
+#define REGEX_COUNT 199
#define MACH_LIST_SIZE_LIMIT 261
-#define FIX_COUNT 178
+#define FIX_COUNT 174
/*
* Enumerate the fixes
@@ -7162,7 +7009,6 @@ typedef enum {
KANDR_CONCAT_FIXIDX,
LIBC1_G_VA_LIST_FIXIDX,
LIBC1_IFDEFD_MEMX_FIXIDX,
- LIMITS_IFNDEFS_FIXIDX,
LYNX_VOID_INT_FIXIDX,
LYNXOS_FCNTL_PROTO_FIXIDX,
MACHINE_ANSI_H_VA_LIST_FIXIDX,
@@ -7193,7 +7039,6 @@ typedef enum {
SCO_REGSET_FIXIDX,
SCO_STATIC_FUNC_FIXIDX,
SCO_UTIME_FIXIDX,
- SOLARIS_LONGLONG_FIXIDX,
SOLARIS_MUTEX_INIT_1_FIXIDX,
SOLARIS_MUTEX_INIT_2_FIXIDX,
SOLARIS_SOCKET_FIXIDX,
@@ -7215,7 +7060,6 @@ typedef enum {
SUN_RUSERS_SEMI_FIXIDX,
SUN_SIGNAL_FIXIDX,
SUNOS_STRLEN_FIXIDX,
- SVR4__P_FIXIDX,
SVR4_DISABLE_OPT_FIXIDX,
SVR4_GETCWD_FIXIDX,
SVR4_KRNL_FIXIDX,
@@ -7244,7 +7088,6 @@ typedef enum {
ULTRIX_STRINGS2_FIXIDX,
ULTRIX_SYS_TIME_FIXIDX,
ULTRIX_UNISTD_FIXIDX,
- UNDEFINE_NULL_FIXIDX,
UNICOSMK_RESTRICT_FIXIDX,
UW7_BYTEORDER_FIX_FIXIDX,
VA_I960_MACRO_FIXIDX,
@@ -7485,7 +7328,7 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
{ zGnu_TypesName, zGnu_TypesList,
apzGnu_TypesMachs,
- GNU_TYPES_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ GNU_TYPES_TEST_CT, FD_MACH_IFNOT | FD_SUBROUTINE,
aGnu_TypesTests, apzGnu_TypesPatch, 0 },
{ zHp_InlineName, zHp_InlineList,
@@ -7663,11 +7506,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
LIBC1_IFDEFD_MEMX_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aLibc1_Ifdefd_MemxTests, apzLibc1_Ifdefd_MemxPatch, 0 },
- { zLimits_IfndefsName, zLimits_IfndefsList,
- apzLimits_IfndefsMachs,
- LIMITS_IFNDEFS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
- aLimits_IfndefsTests, apzLimits_IfndefsPatch, 0 },
-
{ zLynx_Void_IntName, zLynx_Void_IntList,
apzLynx_Void_IntMachs,
LYNX_VOID_INT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
@@ -7818,11 +7656,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
SCO_UTIME_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aSco_UtimeTests, apzSco_UtimePatch, 0 },
- { zSolaris_LonglongName, zSolaris_LonglongList,
- apzSolaris_LonglongMachs,
- SOLARIS_LONGLONG_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
- aSolaris_LonglongTests, apzSolaris_LonglongPatch, 0 },
-
{ zSolaris_Mutex_Init_1Name, zSolaris_Mutex_Init_1List,
apzSolaris_Mutex_Init_1Machs,
SOLARIS_MUTEX_INIT_1_TEST_CT, FD_MACH_ONLY,
@@ -7860,12 +7693,12 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
{ zStdio_Stdarg_HName, zStdio_Stdarg_HList,
apzStdio_Stdarg_HMachs,
- STDIO_STDARG_H_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ STDIO_STDARG_H_TEST_CT, FD_MACH_IFNOT | FD_SUBROUTINE,
aStdio_Stdarg_HTests, apzStdio_Stdarg_HPatch, 0 },
{ zStdio_Va_ListName, zStdio_Va_ListList,
apzStdio_Va_ListMachs,
- STDIO_VA_LIST_TEST_CT, FD_MACH_ONLY,
+ STDIO_VA_LIST_TEST_CT, FD_MACH_IFNOT,
aStdio_Va_ListTests, apzStdio_Va_ListPatch, 0 },
{ zStrict_Ansi_NotName, zStrict_Ansi_NotList,
@@ -7928,11 +7761,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
SUNOS_STRLEN_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aSunos_StrlenTests, apzSunos_StrlenPatch, 0 },
- { zSvr4__PName, zSvr4__PList,
- apzSvr4__PMachs,
- SVR4__P_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
- aSvr4__PTests, apzSvr4__PPatch, 0 },
-
{ zSvr4_Disable_OptName, zSvr4_Disable_OptList,
apzSvr4_Disable_OptMachs,
SVR4_DISABLE_OPT_TEST_CT, FD_MACH_ONLY,
@@ -8073,11 +7901,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
ULTRIX_UNISTD_TEST_CT, FD_MACH_ONLY,
aUltrix_UnistdTests, apzUltrix_UnistdPatch, 0 },
- { zUndefine_NullName, zUndefine_NullList,
- apzUndefine_NullMachs,
- UNDEFINE_NULL_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
- aUndefine_NullTests, apzUndefine_NullPatch, 0 },
-
{ zUnicosmk_RestrictName, zUnicosmk_RestrictList,
apzUnicosmk_RestrictMachs,
UNICOSMK_RESTRICT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
diff --git a/gcc/fixinc/inclhack.def b/gcc/fixinc/inclhack.def
index e0fc0a19220..bf30f33c1b5 100644
--- a/gcc/fixinc/inclhack.def
+++ b/gcc/fixinc/inclhack.def
@@ -1100,6 +1100,9 @@ fix = {
bypass = '_GCC_(PTRDIFF|SIZE|WCHAR)_T';
select = "^[ \t]*typedef[ \t]+.*[ \t](ptrdiff|size|wchar)_t;";
c_fix = gnu_type;
+ /* The Solaris 2.10 headers already define these types correctly. */
+ mach = '*-*-solaris2.1[0-9]*';
+ not_machine = true;
test_text = "typedef long int ptrdiff_t; /* long int */\n"
"typedef uint_t size_t; /* uint_t */\n"
@@ -1828,33 +1831,14 @@ fix = {
};
-/*
- * In limits.h, put #ifndefs around things that are supposed to be defined
- * in float.h to avoid redefinition errors if float.h is included first.
- * On HP/UX this patch does not work, because on HP/UX limits.h uses
- * multi line comments and the inserted #endif winds up inside the
- * comment. Fortunately, HP/UX already uses #ifndefs in limits.h; if
- * we find a #ifndef FLT_MIN we assume that all the required #ifndefs
- * are there, and we do not add them ourselves.
- *
- * QNX Software Systems also guards the defines, but doesn't define
- * FLT_MIN. Therefore, bypass the fix for *either* guarded FLT_MIN
- * or guarded FLT_MAX.
+/*
+ * We used to put #ifndefs around things that are supposed to be
+ * defined in float.h to avoid redefinition errors if float.h is
+ * included first. But, (a) the preprocessor does not complain if the
+ * definitions match, and (b) the preprocessor does not complain even
+ * if they do not match in system headers. So, there is no need to
+ * make this change.
*/
-fix = {
- hackname = limits_ifndefs;
- files = "sys/limits.h";
- files = "limits.h";
- select = "^[ \t]*#[ \t]*define[ \t]+"
- "((FLT|DBL)_(MIN|MAX|DIG))[ \t].*";
- bypass = "ifndef[ \t]+FLT_(MIN|MAX)";
-
- c_fix = format;
- c_fix_arg = "#ifndef %1\n%0\n#endif";
- /* Second arg is select expression */
- test_text = " #\tdefine\tDBL_DIG \t 0 /* somthin' */";
-};
-
/*
* Apparently some SVR4 systems typedef longlong_t to long ?
@@ -2485,25 +2469,6 @@ fix = {
};
/*
- * Sun Solaris 2.10 checks that _LONGLONG_TYPE is not defined in
- * strict ANSI mode, on the theory that a strict ANSI compiler will
- * not accept "long long". However, GCC will always accept "long long"
- * in system headers, and some of the Solaris headers unconditionally
- * use "int64_t" which requires "long long". So, we remove the
- * #error message.
- */
-fix = {
- hackname = solaris_longlong;
- files = sys/feature_tests.h;
- mach = '*-*-solaris2.1[0-9]';
- mach = '*-*-solaris2.1[0-9].*';
- select = "#error.*No long long.*";
- c_fix = format;
- c_fix_arg = "#ifndef __GNUC__\n%0\n#endif";
- test_text = "#error\tNo long long in strictly";
-};
-
-/*
* Sun Solaris 2.5.1, 2.6 defines PTHREAD_{MUTEX|COND}_INITIALIZER
* incorrectly, so we replace them with versions that correspond to
* the definition. We also explicitly name this fix "1" and the next
@@ -2648,6 +2613,12 @@ fix = {
hackname = stdio_stdarg_h;
files = stdio.h;
bypass = "include.*(stdarg\.h|machine/ansi\.h)";
+ /*
+ * On Solaris 2.10, this fix is unncessary; <stdio.h> includes
+ * <iso/stdio_iso.h>, which includes <sys/va_list.h>.
+ */
+ mach = '*-*-solaris2.1[0-9]';
+ not_machine = true;
c_fix = wrap;
@@ -2656,7 +2627,6 @@ fix = {
test_text = "";
};
-
/*
* Don't use or define the name va_list in stdio.h.
* This is for ANSI and also to interoperate properly with gcc's
@@ -2666,7 +2636,7 @@ fix = {
* stdio.h is required to define va_list, and we shouldn't break that.
* On IRIX 6.5, internal/wchar_core.h used to get its definition of
* va_list from stdio.h. Since this doesn't happen any longer, use
- * __gnuc_va_list there, too.
+ * __gnuc_va_list there, too.
*/
fix = {
hackname = stdio_va_list;
@@ -2674,6 +2644,13 @@ fix = {
files = internal/stdio_core.h;
files = internal/wchar_core.h;
bypass = '__gnuc_va_list|_BSD_VA_LIST_|__DJ_va_list|_G_va_list';
+ /*
+ * On Solaris 2.10, the definition in
+ * <stdio.h> is guarded appropriately by the _XPG4 feature macro;
+ * there is therefore no need for this fix there.
+ */
+ mach = '*-*-solaris2.1[0-9]';
+ not_machine = true;
/*
* Use __gnuc_va_list in arg types in place of va_list.
@@ -2702,7 +2679,6 @@ fix = {
test_text = "extern void mumble( va_list);";
};
-
/*
* "!__STDC__" or "__STDC__==0" or "__STDC__!=1" or "__STDC__-0==0"
* is "!defined( __STRICT_ANSI__ )"
@@ -2967,17 +2943,8 @@ fix = {
* Solaris math.h and floatingpoint.h define __P without protection,
* which conflicts with the fixproto definition. The fixproto
* definition and the Solaris definition are used the same way.
+ * furthermore, we don't use fixproto on Solaris.
*/
-fix = {
- hackname = svr4__p;
- files = math.h;
- files = floatingpoint.h;
- select = "^#define[ \t]+__P.*";
- c_fix = format;
- c_fix_arg = "#ifndef __P\n%0\n#endif";
-
- test_text = "#define __P(a) a";
-};
/*
@@ -3831,25 +3798,10 @@ fix = {
"\tfork(),\n";
};
-
/*
- * Fix multiple defines for NULL. Sometimes, we stumble into \r\n
- * terminated lines, so accommodate these. Test both ways.
- * Don't bother to reproduce the \r\n termination, as GCC has to
- * recognize \n termination anyway.
+ * We used to fix multiple defines for NULL. That's unncessary since
+ * we permit redefinitions of macros in system headers anyhow.
*/
-fix = {
- hackname = undefine_null;
- select = "^#[ \t]*define[ \t]+NULL[ \t]";
- bypass = "#[ \t]*(ifn|un)def[ \t]+NULL($|[ \t\r])";
-
- c_fix = format;
- c_fix_arg = "#ifndef NULL\n#define NULL%1\n#endif\n";
- c_fix_arg = "^#[ \t]*define[ \t]+NULL([^\r\n]+)[\r]*\n";
-
- test_text = "#define NULL 0UL\r\n"
- "#define NULL\t((void*)0)\n";
-};
/*
* On Cray Unicos/Mk some standard headers use the C99 keyword "restrict"
diff --git a/gcc/gcc.c b/gcc/gcc.c
index dd69b6eb6d0..4c3cba81a0b 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -4466,6 +4466,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
size_t bufsize = 100;
char *buffer = xmalloc (bufsize);
int idx;
+ bool multilib_p = false;
for (; pl; pl = pl->next)
{
@@ -4497,6 +4498,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
strcat (buffer, machine_suffix);
if (is_directory (buffer, multilib_dir, 1))
{
+ multilib_p = true;
do_spec_1 ("-L", 0, NULL);
#ifdef SPACE_AFTER_L_OPTION
do_spec_1 (" ", 0, NULL);
@@ -4511,6 +4513,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
{
if (is_directory (pl->prefix, multi_dir, 1))
{
+ multilib_p = true;
do_spec_1 ("-L", 0, NULL);
#ifdef SPACE_AFTER_L_OPTION
do_spec_1 (" ", 0, NULL);
@@ -4522,7 +4525,10 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
}
}
}
- if (machine_suffix)
+ /* If we have already found a multilib subdirectory,
+ do not look in other directories derived from
+ this prefix. */
+ if (!multilib_p && machine_suffix)
{
if (is_directory (pl->prefix, machine_suffix, 1))
{
@@ -4544,7 +4550,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
do_spec_1 (" ", 0, NULL);
}
}
- if (!pl->require_machine_suffix)
+ if (!multilib_p && !pl->require_machine_suffix)
{
if (is_directory (pl->prefix, "", 1))
{
@@ -6112,10 +6118,6 @@ main (int argc, const char **argv)
startfile_prefix_spec exclusively. */
else if (*cross_compile == '0' || target_system_root)
{
- if (*md_exec_prefix)
- add_sysrooted_prefix (&startfile_prefixes, md_exec_prefix, "GCC",
- PREFIX_PRIORITY_LAST, 0, NULL, 1);
-
if (*md_startfile_prefix)
add_sysrooted_prefix (&startfile_prefixes, md_startfile_prefix,
"GCC", PREFIX_PRIORITY_LAST, 0, NULL, 1);