This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
3.3.1/3.4 PATCH: Don't pass --gstabs to Solaris 2/Intel native as
- From: Rainer Orth <ro at TechFak dot Uni-Bielefeld dot DE>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 13 Jun 2003 14:21:11 +0200 (MEST)
- Subject: 3.3.1/3.4 PATCH: Don't pass --gstabs to Solaris 2/Intel native as
While investigating the Solaris 9/Intel bootstrap failure fixed by
http://gcc.gnu.org/ml/gcc-patches/2003-06/msg01125.html
I noticed that gcc passes --gstabs to the native assembler. This problem
has already been reported as PR driver/9362, where it causes as to crash.
gcc/configure fails to detect this lack of --gstabs support due to a bug in
Solaris 9 as:
> as --gstabs -c os_SunOS_x86.s
Assembler:
"", line 1 : Warning: Illegal flag (-) - ignored
"", line 1 : Warning: Illegal flag (g) - ignored
"", line 1 : Warning: Illegal flag (t) - ignored
"", line 1 : Warning: Illegal flag (a) - ignored
"", line 1 : Warning: Illegal flag (c) - ignored
> echo $?
0
Until Sun fixes this bug, we need to work around this in gcc/configure.in.
This patch does this, and bootstrapped on mainline without regressions.
This is a regression from gcc 3.0, so I'd like to apply the patch both to
mainline and the 3.3 branch once fully regtested there.
Ok?
Rainer
-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University
Thu Jun 12 19:17:35 2003 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* configure.in (gcc_cv_as_gstabs_flag): Disable for Solaris 2/Intel.
* configure: Regenerate.
Fixes PR driver/9362.
Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/configure.in,v
retrieving revision 1.685
diff -u -p -r1.685 configure.in
--- configure.in 12 Jun 2003 07:09:55 -0000 1.685
+++ configure.in 13 Jun 2003 12:06:20 -0000
@@ -2570,6 +2570,16 @@ elif test x$gcc_cv_as != x -a x"$insn" !
fi
rm -f conftest.s conftest.o
fi
+case "$target" in
+ i?86*-*-solaris2*)
+ if test x"$gas_flag" = x"no"; then
+ # The native Solaris 9/Intel assembler doesn't understand --gstabs
+ # and warns about it, but still exits successfully. So disable
+ # support here.
+ gcc_cv_as_gstabs_flag=no
+ fi
+ ;;
+esac
if test x"$gcc_cv_as_gstabs_flag" = xyes; then
AC_DEFINE(HAVE_AS_GSTABS_DEBUG_FLAG, 1,
[Define if your assembler supports the --gstabs option.])