Disable IPO on mingw win32

/usr/lib/gcc/i686-w64-mingw32/11.2.0/../../../../i686-w64-mingw32/bin/ld: /usr/lib/gcc/i686-w64-mingw32/11.2.0/../../../../i686-w64-mingw32/bin/ld: DWARF error: could not find variable specification at offset 378
/usr/lib/gcc/i686-w64-mingw32/11.2.0/../../../../i686-w64-mingw32/lib/../lib/libstdc++.a(string-inst.o): in function `ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag':
/build/mingw-w64-gcc/src/build-i686-w64-mingw32/i686-w64-mingw32/libstdc++-v3/include/bits/basic_string.tcc:206: multiple definition of `void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*, std::forward_iterator_tag)';
glsl_shader_compiler.cpp.obj (symbol from plugin):(.gnu.linkonce.t._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag+0x0): first defined here
...
This commit is contained in:
def 2022-05-16 00:56:23 +02:00 committed by Dennis Felsing
parent bbb1b42bb5
commit dc03f410ad
2 changed files with 4 additions and 7 deletions

View file

@ -106,6 +106,9 @@ if(MSVC)
# For some reason on MSVC platform the client and server binaries
# become even bigger with IPO enabled.
set(AUTO_IPO OFF)
elseif(MINGW AND TARGET_CPU_ARCHITECTURE STREQUAL "x86")
# DWARF error: could not find variable specification and further failures
set(AUTO_IPO OFF)
endif()
set(AUTO_VULKAN_BACKEND ON)
@ -281,6 +284,7 @@ if(NOT MSVC AND NOT HAIKU)
add_c_compiler_flag_if_supported(OUR_FLAGS_OWN -Wformat=2) # Warn about format strings.
add_c_compiler_flag_if_supported(OUR_FLAGS_DEP -Wno-implicit-function-declaration)
add_c_compiler_flag_if_supported(OUR_FLAGS_OWN -Wno-nullability-completeness) # Mac OS build on github
add_c_compiler_flag_if_supported(OUR_FLAGS_OWN -Wno-tautological-constant-out-of-range-compare) # Check needed for x86, but warns on x86-64
add_c_compiler_flag_if_supported(OUR_FLAGS_OWN -Wduplicated-cond)
add_c_compiler_flag_if_supported(OUR_FLAGS_OWN -Wduplicated-branches)
add_c_compiler_flag_if_supported(OUR_FLAGS_OWN -Wlogical-op)

View file

@ -302,15 +302,8 @@ bool CMapLayers::STileLayerVisuals::Init(unsigned int Width, unsigned int Height
{
m_Width = Width;
m_Height = Height;
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare"
#endif
if(Width == 0 || Height == 0 || Width >= std::numeric_limits<std::ptrdiff_t>::max() || Height >= std::numeric_limits<std::ptrdiff_t>::max())
return false;
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif
m_pTilesOfLayer = new CMapLayers::STileLayerVisuals::STileVisual[Height * Width];