GameHub
GameHub copied to clipboard
Override optimization cflags set by users or build systems
This overrides optimization CFLAGS set in build system, and possibly user settings.
Hopefully this can avoid #99 / #103 / #112 / #162 at least a bit.
Perhaps @neuromancer could verify this works for him too? I originally used your tip to unset cflags completely, but I think this way is better as a general advice.
That should work. I'll wait for someone else to confirm it's working.
I will test it it, but I'm not sure if I will be able to reproduce the original issue to check that the fix is doing something...
@neuromancer
Thanks :)
If I run cat /etc/makepkg.conf | grep CFLAGS
I get:
CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt"
Not sure if this is the default in Arch, but I think it is in Antergos (which I'm using).
I think -O0
either turns all the other options off or they are benign in this case.
Also the gamehub-git package was just updated so it unsets CFLAGS, so if you use that as a base, the unset statements should be removed for the test.
I tested all the variations of the CFLAGS (including -O0
, -O1
and -O2
) only using -O0
works as expected. I feel very uncomfortable disabling all the optimizations in the rest of the compilation just for this issue, but we have no other choice. I think we should merge this until we found the real cause of #99.
Yeah, I agree. Optimally this shouldn't be needed (but the issue is too serious not to do something)