Browse Source

Fix GCC version detection

pull/1529/head
josetr 5 years ago
parent
commit
64f237db0f
  1. 9
      build/Helpers.lua

9
build/Helpers.lua

@ -184,12 +184,13 @@ function GccVersion()
if out == nil then if out == nil then
return default_gcc_version return default_gcc_version
end end
local version = string.match(out, "gcc version [0-9\\.]+") local version = string.match(out, "gcc[ -][Vv]ersion [0-9\\.]+")
if version == nil then if version ~= nil then
version = string.match(out, "clang version [0-9\\.]+")
end
return string.sub(version, 13) return string.sub(version, 13)
end end
version = string.match(out, "clang[ -][Vv]ersion [0-9\\.]+")
return string.sub(version, 15)
end
function UseCxx11ABI() function UseCxx11ABI()
if os.istarget("linux") and GccVersion() >= '4.9.0' and _OPTIONS["no-cxx11-abi"] == nil then if os.istarget("linux") and GccVersion() >= '4.9.0' and _OPTIONS["no-cxx11-abi"] == nil then

Loading…
Cancel
Save