On Wed, Aug 27, 2008 at 12:36 PM, Joseph S. Myers <[EMAIL PROTECTED]> wrote: > On Wed, 27 Aug 2008, Brian Dessent wrote: > >> "H.J. Lu" wrote: >> >> > For Linux/x86, if gcc is configured for xxx-*-linux, the default arch >> > should >> > be xxx for both 32bit and 64bit, where xxx can be i[3456]86, pentium, ... >> > x86-64. Is someone working on such a patch? >> >> IMHO making this Linux specific just replaces one confusing and >> arbitrary decision with another. Why should --target=i686-*-linux imply >> -march=686 when, say, --target=i686-*-freebsd or --target=i686-*-elf >> still implies -march=386? If you want to imply a default -march from >> the target specification (and I think that's a perfectly good thing to >> want to do) then it should apply to all x86 targets equally. If that's > > My proposal is exactly that the target triplet should imply -march on x86 > - just as it implies -mcpu on SPARC where -mcpu means -march rather than > -mtune. >
Here is a patch. Tested on Linux/ia32 and Linux/Intel64 with native targets. OK for trunk? Thanks. -- H.J. --- 2008-08-27 H.J. Lu <[EMAIL PROTECTED]> * config.gcc: Set arch/cpu for i[34567]86-*-*|x86_64-*-* targets. Set with_cpu/with_arch from arch/cpu. Allow x86-64 for with_cpu/with_arch.
gcc-arch-1.patch
Description: Binary data