Commit af876c0c authored by Felix Geyer's avatar Felix Geyer

Stop building with -msse2 on i386.

* Stop building with -msse2 on i386. (Closes: #921274)
  - Cherry-pick upstream fix as no-sse2-required.patch
parent 8d2df597
teeworlds (0.7.2-3) unstable; urgency=medium
* Stop building with -msse2 on i386. (Closes: #921274)
- Cherry-pick upstream fix as no-sse2-required.patch
-- Felix Geyer <fgeyer@debian.org> Thu, 28 Feb 2019 22:35:34 +0100
teeworlds (0.7.2-2) unstable; urgency=medium
* Team upload.
......
From fdc14f07386272c47a95e060643620f537ab9d5e Mon Sep 17 00:00:00 2001
From: oy <Tom_Adams@web.de>
Date: Sun, 10 Feb 2019 18:48:37 +0100
Subject: [PATCH] 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)
---
bam.lua | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/bam.lua b/bam.lua
index 42b1846f62..c92bbdd44b 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 <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
......@@ -5,3 +5,4 @@ portability.patch
builddir.patch
hardening.patch
immintrin_FTBFS.patch
no-sse2-required.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment