[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: enabling/disabling AltiVec in Firefox and derived browsers (ArcticFox)



Hi,

Riccardo Mottola wrote:
>
> This causes a big issue if you want to compile a non-Altivec build on
> a capable processor like the G4: it will automatically enabled even if
> you don't want.
> E.g. if I want to build on a G4 a binary working on the G3, I can't. I
> specify -mcpu=750 -mtune=750, but the compiler will accept -maltivec
> and create an incompatible binary. 

I actually just tested and "debian shipped firefox" fires an illegal
instruction on a G3, so it is having a similar issue than my own
ArcticFox builds.

I also did a test and tried to compile on my G3 (and yes, it is an old
iBook which has a classic non-altivec 750 PPC, GX if I am right) and
-maltivec gets just accepted by gcc 10 now.

So, essentially Adrian's patch is wrong in concept: you cannot use the
compiler even on a native CPU to test for altivec

This means double-issue: using a higher-spec'd CPU cannot be used to
compile for a lower-spec, but also a native build will fail.

I would try to follow to possibilities:
- just a "hard switch" like --enable-altivec --disable-altivec for PCP
- try to parse the optimization flas one might extra use, so if the
compiler is invoked with "gcc -maltivec" (common practive) a
HAVE_ALTIVEC build is automatically enabled

What do you think?

Riccardo



Reply to: