diff options
author | Robin Gareus <robin@gareus.org> | 2020-03-08 02:41:15 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2020-03-08 02:41:15 +0100 |
commit | f265bbbf82e9cbd6403a1e6a94bc8a8544638775 (patch) | |
tree | 59b9b7a3a11038d4be86319d864c8966cf135e1e /wscript | |
parent | b0e7ba1262590642aed7072b94c5448f1ca39a6d (diff) |
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)’
Diffstat (limited to 'wscript')
-rw-r--r-- | wscript | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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 |