i3roly / firefox-dynasty

haters puttin' a wrap on us, callin' it a legacy, we keep showin' what the fuss, call it a dynasty
Other
1 stars 0 forks source link

introduce/change/edit macro enable/disable AVX support, ensuring support for older intel macs #4

Closed i3roly closed 1 month ago

i3roly commented 1 month ago

currently there doesn't seem to be an easy way to do this. using the mozilla toolchain, which downloaded:

we cannot:

  1. simply edit-out the avx2 macros in build/moz.configure/toolchain.configure (it will still build with avx in the directories mentioned below)
  2. use the negative (i.e. 'mno-avx' instead of 'mavx') since the moz.build files are not receptive to either flag (causing build errors in the mno-avx case).

and we must therefore focus on the moz.build files.

from what i have seen in the third_party directory, there is hard-coding of

DEFINES["WEBRTC_ENABLE_AVX2"] = True

so let's see if there is a way to follow this macro up to the main build files and change it.

to summarise, we need to focus on these subdirectories first

and systematise the avx2 invocation. the newer toolchain just assumes i have avx support (even though my mac does not) because intel macs without avx2 are officially supported past brojave.

i3roly commented 1 month ago

turns out it wasn't AVX compatibility, but rather they nuked a great commit by a contributor named glandium:

https://hg.mozilla.org/mozilla-central/rev/02dd305e8ba9

restoring this commit fixes the illegal instruction and should work all the way back to 10.9