Simplify and improve x86/amd64 CPU build flag
On amd64 removes the "-msse" flag, which is already enabled by default. On x86 changes the flags from "-march=i686 -msse" to "-march=pentium3 -mtune=generic". This should also enable other CPU features like MMX, while keeping the same minimun supported CPU (Intel Pentium3 or AMD Athlon 4) previously required by "-msse". Fixes #2329. This was SVN commit r15170.
This commit is contained in:
parent
4a3df1c8c5
commit
f4edb8dce5
@ -269,13 +269,6 @@ function project_set_build_flags()
|
||||
}
|
||||
end
|
||||
|
||||
if arch == "x86" or arch == "amd64" then
|
||||
buildoptions {
|
||||
-- enable SSE intrinsics
|
||||
"-msse"
|
||||
}
|
||||
end
|
||||
|
||||
if os.is("linux") or os.is("bsd") then
|
||||
linkoptions { "-Wl,--no-undefined", "-Wl,--as-needed" }
|
||||
end
|
||||
@ -283,8 +276,12 @@ function project_set_build_flags()
|
||||
if arch == "x86" then
|
||||
buildoptions {
|
||||
-- To support intrinsics like __sync_bool_compare_and_swap on x86
|
||||
-- we need to set -march to something that supports them
|
||||
"-march=i686"
|
||||
-- we need to set -march to something that supports them (i686).
|
||||
-- We use pentium3 to also enable other features like mmx and sse,
|
||||
-- while tuning for generic to have good performance on every
|
||||
-- supported CPU.
|
||||
-- Note that all these features are already supported on amd64.
|
||||
"-march=pentium3 -mtune=generic"
|
||||
}
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user