[MPlayer-dev-eng] [PATCH] Support compiling without CPU optimization

Ingo Brückl ib at wupperonline.de
Thu Jun 4 01:45:11 CEST 2015


Reimar Döffinger wrote on Wed, 3 Jun 2015 19:02:11 +0200:

> On Thu, May 28, 2015 at 11:04:13PM +0200, Ingo Brückl wrote:
>> Those who have configured their gcc to already compile CPU specific,

> In what way?

Gcc configuration? --with-arch, --with-tune.

> And how then do these options break it?

Despite what the gcc docs say, -mtune=native isn't (always?) the best option
to use and may disable features the CPU has. The kernel's Makefile, for
example, does better by specifying -march=<cpu-type> -mtune=generic.

> I think that name is misleading

Since configure names it "GCC & CPU optimization" it seemed obvious to name
it that way, but I'm happy with any other name as well.

> For example the proc=none setting is somewhat questionable

That's just an internal variable, so who cares about its value? Well, the
user does, because they are presented the content as the result of the
"optimization". (And "none" for a not recognized CPU isn't probably worse
than "error" - even internally).

> the desired effect is not to behave as if --target=generic was used
> (which means no processor-specific optimizations - including assembler
> code - at all)...

I don't get this. AFAICS, proc doesn't affect the assembler code.

> If it's only -march and -mcpu it seems preferable to filter out,
> probably it would be easiest to just leave that up to everyone via
> a sed command or otherwise in the cflag setting code.

Since the default doesn't change the former behaviour and the new option
doesn't break anything, I don't see the problem. What is the benefit of
"leaving that up to everyone via a sed command or otherwise in the cflag
setting code" vs. a simple configure option?

Ingo


More information about the MPlayer-dev-eng mailing list