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

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



Hello,

I was checkin gout a specific patch Adrian made for Firefox, which should help building on non-Altivec capable CPUs.
https://github.com/mozilla/gecko-dev/commit/c6b39f0f902898988ca7793af56307640ff81362

I have imported it in ArcticFox with this commit and tested it.
https://github.com/rmottola/Arctic-Fox/commit/1e3eb367dcfd6c9f61c738443b7967aa5fd7dae9

This configure tests relies on the fact that the compiler will throw an error if -maltivec is used and not supported.

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.

A quick solution would to have this configure as a convenience, but have a way to pass an --enable-altivec and -disable-altivec (or with/without?) parameter to configure.

I am not even sure if it is still true that the compiler will reject the option, I will test on my G3.

Another proposal would be to parse the CFLAGS and check if -maltivec was specified and thus enable HAVE_ALTIVEC


Other proposals? Let's discuss.


Riccardo


Reply to: