This is the mail archive of the gcc-patches@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]

PATCH: Set with_cpu/with_arch based on target


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.

Attachment: gcc-arch-1.patch
Description: Binary data


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