This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/12101] [3.3/3.4 Regression] i386 Solaris no longer works with GNU as?


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12101



------- Additional Comments From ro at techfak dot uni-bielefeld dot de  2003-09-03 18:26 -------
Subject: Re:  [3.3/3.4 Regression] i386 Solaris no longer works with GNU as?

Hi Joe,

[please keep gcc-bugzilla on the Cc: so this info lands in Bugzilla as
well.  Thanks.]

> In reply to your questions:
> 
> * what version of gas did you use?
> 
> It reports "GNU assembler 2.13" (from binutils-2.13).
> 
> * during a regular bootstrap of gcc 3.3 (if so, what configure options and
>   make command did you use?)
> 
> The configure command was:
> /usr/local/gnu/src/gcc-3.3/configure --prefix=/usr/local/gnu --with-as=/usr/local/gnu/bin/as

You usually have to add --with-gnu-as as well if the assembler specified
with --with-as is GNU as.

> My path was setup to use GNU "make" instead of Sun's "make" program.
> Also I did "setenv NM_FOR_TARGET /usr/local/gnu/bin/nm" before running
> configure; but I've forgotten why.  (Sorry.)
> 
> * compiling some file after bootstrap finished (if so, please attach the
>   preprocessed input file and the exact compilation command used)
> 
> The way I discovered the problem was by running the configure script
> of gmp-4.1.  It compiles and runs the following program to check for
> various GCC problems:
> 
> 
> /* The following provokes an internal error from gcc 2.95.2 -mpowerpc64
>    (without -maix64), hence detecting an unusable compiler */
> void *g() { return (void *) 0; }
> void *f() { return g(); }
> 
> /* The following provokes an invalid instruction syntax from i386 gcc
>    -march=pentiumpro on Solaris 2.8.  The native sun assembler
>    requires a non-standard syntax for cmov which gcc (as of 2.95.2 at
>    least) doesn't know.  */
> int n;
> int cmov () { return (n >= 0 ? n : 0); }
> 
> int main () { return 0; }
> 
> 
> Based on the results, it discovered the problem with the cmov syntax,
> and adjusted GMP's configuration to avoid generating it.
> 
> I'm going to be away from my email for several weeks, beginning
> tomorrow, so won't be able to give you additional info for a while.

Ok, thanks for the info.

Although the problem was alread obvious from Andrew's comment, I've now
been able to reproduce it myself:

I've configured mainline for i686-pc-solaris2.9 with gas 2.14 and
bootstrapped with BOOT_CFLAGS='-g -O2 -march=i686', i.e. in the same way
originally used to verify the patch that introduced CMOV_SUN_AS_SYNTAX.
After fixing an unrelated problem caused by using gas 2.14 with the native
ld, bootstrap failed with the same syntax error as before that patch.  The
macro had been defined in a very contrieved location, which got lost during
my config/sol2.h rewrite.

I'm currently testing a patch for 3.4 that detects support for Sun vs. gas
cmov syntax at configure time and defines (the equivalent of) the above
macro accordingly.  Bootstrap finished, and the testsuite run is in
progress.  Afterwards, I'll verify the patch with the native as as well.

The patch for 3.3.2 needs to be slightly different because that part of
configure.in changed significantly in 3.4, but this will be easy as well.

Maybe I get this this done and verified before the weekend, otherwise this
will have to wait another week until I return from a short vacation.

	Rainer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]