PATCH: Set with_cpu/with_arch based on target
H.J. Lu
hjl.tools@gmail.com
Thu Aug 28 03:08:00 GMT 2008
On Wed, Aug 27, 2008 at 12:36 PM, Joseph S. Myers
<joseph@codesourcery.com> 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 <hongjiu.lu@intel.com>
* 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-arch-1.patch
Type: application/octet-stream
Size: 6098 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20080828/17caace8/attachment.obj>
More information about the Libstdc++
mailing list