13
0

mingw/gcc-8.2 compat: _xgetbv() needs -mxsave

Otherwise this causes PBD::FPU to fail with
error: inlining failed in call to always_inline ‘long long int _xgetbv(unsigned int)’
This commit is contained in:
Robin Gareus 2020-03-08 02:41:15 +01:00
parent b0e7ba1262
commit f265bbbf82
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -52,6 +52,8 @@ compiler_flags_dictionaries= {
'sse' : '-msse',
# Flags required to use SSE unit for floating point math
'fpmath-sse' : '-mfpmath=sse',
# Flags required to use _xgetbv with mingw+gcc > 8.2
'xsaveintrin' : '-mxsave',
# Flags required to use XMM Intrinsics
'xmmintrinsics' : '-DUSE_XMMINTRIN',
# Flags to use posix pipes between compiler stages
@ -97,6 +99,7 @@ compiler_flags_dictionaries= {
'sse' : '/arch:SSE',
'silence-unused-arguments' : '',
'sse' : '',
'xsaveintrin' : '',
'fpmath-sse' : '',
'xmmintrinsics' : '',
'pipe' : '',
@ -135,6 +138,7 @@ compiler_flags_dictionaries['gcc-darwin'] = gcc_darwin_dict;
clang_dict = compiler_flags_dictionaries['gcc'].copy();
clang_dict['sse'] = ''
clang_dict['fpmath-sse'] = ''
clang_dict['xsaveintrin'] = ''
clang_dict['xmmintrinsics'] = ''
clang_dict['silence-unused-arguments'] = '-Qunused-arguments'
clang_dict['extra-cxx-warnings'] = [ '-Woverloaded-virtual', '-Wno-mismatched-tags', '-Wno-cast-align', '-Wno-unused-local-typedefs', '-Wunneeded-internal-declaration' ]
@ -543,6 +547,9 @@ int main() { return 0; }''',
compiler_flags.extend ([ flags_dict['sse'], flags_dict['fpmath-sse'], flags_dict['xmmintrinsics'], flags_dict['attasm'] ])
# mingw/gcc-8.2
compiler_flags.append(lags_dict['xsaveintrin'])
# end of processor-specific section
# optimization section