65.0.1 with pgo enabled will have avx2 instructions
Building 65.0.1 with pgo enabled will have avx2 instructions in the resulted binary.
Here is a gcc backtrace when running such a binary on a CPU not supporting avx2:
(gdb) run
Starting program: /usr/bin/firefox
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Program received signal SIGILL, Illegal instruction.
0x00007ffff29c018f in ?? () from /usr/lib/firefox/libxul.so
(gdb) x/i $pc
=> 0x7ffff29c018f: vextracti128 $0x1,%ymm4,0x1b2299f(%rip) # 0x7ffff44e2b38
(gdb)
The $pc
pointer is at vextracti128
which should be a avx2 instruction.
Building with pgo disabled (and also elf-hack disabled) seems to fix the problem. Here is a PKGBUILD I am using to test: https://fars.ee/eDlo/bash From the above PKGBUILD I made the binary: https://build.archlinuxcn.org/~farseerfc/firefox-kde-opensuse-65.0.1-2-x86_64.pkg.tar.xz
This is able to run on a CPU without avx2 instruction set.
I have no idea why gcc will generate avx2 instruction with pgo enabled.