On 21/02/2010 19:45, Martin Guy wrote:
> On 2/21/10, Steven Bosscher <stevenb....@gmail> wrote:

>> Your naive users (and mine) don't even know about -mcpu and -march.
> Exactly, so they go "cc hello.c; a.out" and get "Illegal instruction"
> unless they have a relatively new first-world PC.

  So learning to program is difficult.  I don't think any compiler default
commandline setting can change that, but on the brights side, learning about
commandline options is pretty much the first thing any newbie will need to
learn in order to drive a compiler.

> Of course. However it does bite cross-compilers because people end up
> distributing the C library compiled for a high-end CPU, so no program
> will run even when you do drop the -mcpu level. 

  What do these people think they are doing posing as distributors without
knowing the first thing about packaging and binary distribution?

> Actually, this is irrelevant to the thread, since one always has to
> specify a CPU model in the tuple when configuring for i?86, and the
> thread was about an i686-* configuration tuple still producing a
> compiler that outputs i386 code by default, which does seem silly.

  A quick browse through config.gcc suggests most of the arm targets match the
"arm*-*-<something>" pattern, so it might be quite easy to adopt the same
use-the-precise-cpu-model-in-the-target-triplet scheme for ARM, mightn't it?
(Though obviously with the proviso of making it actually work, as proposed but
not yet implemented for x86!)

    cheers,
      DaveK

Reply via email to