diff --git a/bam.lua b/bam.lua index 42b1846f6..c92bbdd44 100644 --- a/bam.lua +++ b/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 \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