This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: PR target/26146: Bootstrapping on Solaris 10/x86 fails
- From: "H. J. Lu" <hjl at lucon dot org>
- To: Alexandre Oliva <aoliva at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 5 Jul 2006 09:24:16 -0700
- Subject: Re: PATCH: PR target/26146: Bootstrapping on Solaris 10/x86 fails
- References: <20060302015802.GA22908@lucon.org> <or8xn92t0x.fsf@free.oliva.athome.lsd.ic.unicamp.br>
On Tue, Jul 04, 2006 at 02:12:46PM -0300, Alexandre Oliva wrote:
> :REVIEWID 1050:
>
> > 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
>
> > PR target/26146
> > * config.gcc: Check with_cpu for i[34567]86--*-solaris2.1[0-9]*.
>
> I must confess that I don't quite like this approach. It seems to me
> that the port should be able to figure out, when given -m64, that the
> cpu tuning should change to something suitable, or tuning to
> 64-bit-less CPUs should not disable 64-bit instructions.
>
> That said, the patch doesn't look bad, so we can probably go with it
> as a stopgap for upcoming releases, but ideally we should try to fix
> this properly for 4.3. H.J., before checking this in, please add a
> FIXME comment stating this ought to be fixed in the backend proper.
>
> Thanks,
Here is the updated patch.
H.J.
---
2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
PR target/26146
* config.gcc: Check with_cpu for i[34567]86--*-solaris2.1[0-9]*.
--- gcc/config.gcc.sol2 2006-06-30 07:06:23.000000000 -0700
+++ gcc/config.gcc 2006-07-05 09:17:17.000000000 -0700
@@ -1181,6 +1181,20 @@ i[34567]86-*-solaris2*)
tm_defines="${tm_defines} TARGET_BI_ARCH=1"
tmake_file="$tmake_file i386/t-sol2-10"
need_64bit_hwint=yes
+ # FIXME: -m64 for i[34567]86-*-* should be allowed just
+ # like -m32 for x86_64-*-*.
+ case X"${with_cpu}" in
+ Xgeneric|Xnocona|Xx86-64|Xk8|Xopteron|Xathlon64|Xathlon-fx)
+ ;;
+ X)
+ with_cpu=generic
+ ;;
+ *)
+ echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
+ echo "generic nocona x86-64 k8 opteron athlon64 athlon-fx" 1>&2
+ exit 1
+ ;;
+ esac
# Solaris 2.10 provides crt1.o, crti.o, crtn.o, and gcrt1.o as
# part of the base system.
extra_parts="gmon.o crtbegin.o crtend.o"