mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 06:28:19 +00:00
added a config option for old gcc compilers which need -msse2 flag to use _mm_pause (https://gcc-patches.gcc.gnu.narkive.com/Ypx83P9u/patch-rfa-move-x86-mm-pause-out-of-pragma-target-sse-scope)
This commit is contained in:
parent
dd3c7a9985
commit
fdc14f0738
5
bam.lua
5
bam.lua
|
@ -9,6 +9,7 @@ config = NewConfig()
|
|||
config:Add(OptCCompiler("compiler"))
|
||||
config:Add(OptTestCompileC("stackprotector", "int main(){return 0;}", "-fstack-protector -fstack-protector-all"))
|
||||
config:Add(OptTestCompileC("minmacosxsdk", "int main(){return 0;}", "-mmacosx-version-min=10.7 -isysroot /Developer/SDKs/MacOSX10.7.sdk"))
|
||||
config:Add(OptTestCompileC("buildwithoutsseflag", "#include <immintrin.h>\nint main(){_mm_pause();return 0;}", ""))
|
||||
config:Add(OptLibrary("zlib", "zlib.h", false))
|
||||
config:Add(SDL.OptFind("sdl", true))
|
||||
config:Add(FreeType.OptFind("freetype", true))
|
||||
|
@ -169,7 +170,9 @@ end
|
|||
|
||||
function GenerateLinuxSettings(settings, conf, arch, compiler)
|
||||
if arch == "x86" then
|
||||
settings.cc.flags:Add("-msse2") -- for the _mm_pause call
|
||||
if config.buildwithoutsseflag.value == false then
|
||||
settings.cc.flags:Add("-msse2") -- for the _mm_pause call
|
||||
end
|
||||
settings.cc.flags:Add("-m32")
|
||||
settings.link.flags:Add("-m32")
|
||||
elseif arch == "x86_64" then
|
||||
|
|
Loading…
Reference in a new issue