This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
4.0/4.1 PATCH: Fix Solaris 10/x86 bootstrap failure with native as
- From: Rainer Orth <ro at TechFak dot Uni-Bielefeld dot DE>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 22 Mar 2005 20:03:50 +0100 (MET)
- Subject: 4.0/4.1 PATCH: Fix Solaris 10/x86 bootstrap failure with native as
Current mainline fails to bootstrap on Solaris 10/x86 with the native as
and --disable-multilib, for two reasons:
* config/i386/x86-64.h is included unconditionally and defines
ASM_OUTPUT_MAX_SKIP_ALIGN which uses .p2align even with the native as
which doesn't support it
* Likewise, x86-64.h overrides the autoconfigured definition of
HAVE_AS_DWARF2_DEBUG_LINE, which again is wrong for the native Solaris 10
as. This has been in there since rev. 1.1 and seems completely bogus.
The effect is that gcc (from dwarf2out.c (dwarf2out_source_line) via
DWARF2_ASM_LINE_DEBUG_INFO) emits something like
.file 1 "/vol/gnu/src/gcc/gcc-csl-sol210-dist/gcc/libgcc2.c"
.loc 1 337 0
both of which the native as cannot handle.
This bootstrap failure is a regression from 3.4.
The following trivial patch fixes both issues and allows the bootstrap to
complete.
Testresults are somewhat reasonable; the fortran failures are largely due
to <iso/math_c99.h> defining
#define isfinite(x) __builtin_isfinite(x)
which gcc doesn't currently support.
The full results are here:
http://gcc.gnu.org/ml/gcc-testresults/2005-03/msg01508.html
Ok for mainline and the 4.0 branch once testing passes there?
Rainer
-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University
Wed Nov 10 19:26:42 2004 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Guard with
HAVE_GAS_MAX_SKIP_P2ALIGN.
(HAVE_AS_DWARF2_DEBUG_LINE): Remove.
Index: config/i386/x86-64.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/x86-64.h,v
retrieving revision 1.10
diff -u -p -r1.10 x86-64.h
--- config/i386/x86-64.h 24 Dec 2003 00:14:20 -0000 1.10
+++ config/i386/x86-64.h 22 Mar 2005 18:53:15 -0000
@@ -1,5 +1,5 @@
/* OS independent definitions for AMD x86-64.
- Copyright (C) 2001 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2005 Free Software Foundation, Inc.
Contributed by Bo Thorsen <bo@suse.de>.
This file is part of GCC.
@@ -56,6 +56,7 @@ Boston, MA 02111-1307, USA. */
/* This is used to align code labels according to Intel recommendations. */
+#ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
#define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \
do { \
if ((LOG) != 0) { \
@@ -63,6 +64,7 @@ Boston, MA 02111-1307, USA. */
else fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \
} \
} while (0)
+#endif
/* i386 System V Release 4 uses DWARF debugging info.
@@ -70,9 +72,6 @@ Boston, MA 02111-1307, USA. */
#define DWARF2_DEBUGGING_INFO 1
#define DWARF2_UNWIND_INFO 1
-/* Incorrectly autodetected in cross compilation. */
-#undef HAVE_AS_DWARF2_DEBUG_LINE
-#define HAVE_AS_DWARF2_DEBUG_LINE 1
#undef PREFERRED_DEBUGGING_TYPE
#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG