[cfe-commits] [PATCH] Driver modifications for cross compilation

Renato Golin renato.golin at arm.com
Wed Jul 13 02:32:00 PDT 2011


On 13 July 2011 02:58, Eric Christopher <echristo at apple.com> wrote:
> On Jul 12, 2011, at 6:54 PM, Chris Lattner wrote:
> +1, but should -target be -triple?  We can use -target when we have some
> target/toolchain description mechanism.
>
> I'm ok here either way. Daniel had expressed a desire for -target so that we
> could put multiple types of parseable strings here, but I have no dog in
> this show.

Hi Eric,

I agree that multiple strings in the same option is tempting (I
confess I thought about that while reading your original email), but
things can get fuzzy and that's exactly what we're trying to avoid.

Either -triple or -target are fine. Host triple doesn't make much
sense to me, so that should always refer to the target.

Whatever the options (-mcpu, -cpu, etc) are fine, as long as they are
consistent and unique. The only overlap I think it's worth is the [
triple + arch/cpu/os ], because it's easier to write build scripts
(makefiles), but we shouldn't duplicate options just because people
prefer A or B.

Also, the compatibility argument is strong, but I'd rather issue a
warning that the old argument is deprecated, so the day it disappears,
people won't be surprised. And if the "official" way of selecting
architecture is simple and sound, there's no argument to keep the old
anyway.

I for one agree that -arch should always be specified if it's
different than your host, otherwise we'll get into fuzzy-land again,
and that -mos can easily be replaced by -triple/-target.

I also agree with the -mtune option, though I'm not sure what kind of
argument would go with that. CPU is the obvious one, but we could also
argue that one could want to allow hard VFP but tune for soft VFP.
Anyway, I can't think of a strong reason for that, so feel free to
ignore this point.

In the end, James patch is much more than just a new way of selecting
the target triple. It's the long wanted tablegen'isation of the target
description. Whatever the command line arguments are doesn't matter
much, as long as there is a simple and unique way of correctly
specifying the target platform, and as a side effect, making it easier
to pick the correct toolchain.

Feel free to derive any patch from James'. He's on holidays for a few
weeks and you're much closer to it than I am. I'm happy with the
general ideas we discussed and think that we're in the right
direction.

cheers,
--renato




More information about the cfe-commits mailing list