-
Tor Didriksen authored
This patch adds link-time optimization support for gcc7. The patch contains workarounds for misc bugs in gcc7, which are fixed in gcc8. ================ storage/perfschema/pfs.h:80:40: warning: type of THR_PFS_contexts does not match original declaration [-Wlto-type-mismatch] extern thread_local PFS_table_context *THR_PFS_contexts[THR_PFS_NUM_KEYS]; ^ storage/perfschema/pfs.cc:2092:33: note: THR_PFS_contexts was previously declared here thread_local PFS_table_context *THR_PFS_contexts[THR_PFS_NUM_KEYS]; ^ storage/perfschema/pfs.cc:2092:33: note: code may be misoptimized unless -fno-strict-aliasing is used Workaround is to move the declaration of THR_PFS_contexts array from storage/perfschema/pfs.h to storage/perfschema/pfs_engine_table.h so that 'class PFS_table_context' is known when declaring the array. ================ extra/icu/source/common/udata.cpp:632:0: warning: type of icudt59_dat does not match original declaration [-Wlto-type-mismatch] extern "C" const DataHeader U_DATA_API U_ICUDATA_ENTRY_POINT; extra/icu/source/stubdata/stubdata.cpp:41:0: note: type name ICU_Data_Header should match type name DataHeader } ICU_Data_Header; The preferred solution is to configure with -DWITH_ICU=system. To remove warnings when building with bundled ICU, we disable -flto. ================ sql/json_dom.h:817: error: undefined reference to 'vtable for Json_int' /usr/bin/ld.gold: the vtable symbol may be undefined because the class is missing its key function Solution: move Json_int DTOR to .cc file. ================ storage/innobase/include/dict0dd.h:209: error: undefined reference to 'std::__cxx11::basic_string<char, std::char_traits<char>, Stateless_allocator<char, dd::String_type_alloc, My_free_functor> >::~basic_string()' /usr/bin/ld.gold: the symbol should have been defined by a plugin Solution: // Explicit template instantiation needed for gcc7 -flto template dd::String_type::~basic_string(); Change-Id: I04b3beeec4e2f6627f17ba379df917bb50b14680
Tor Didriksen authoredThis patch adds link-time optimization support for gcc7. The patch contains workarounds for misc bugs in gcc7, which are fixed in gcc8. ================ storage/perfschema/pfs.h:80:40: warning: type of THR_PFS_contexts does not match original declaration [-Wlto-type-mismatch] extern thread_local PFS_table_context *THR_PFS_contexts[THR_PFS_NUM_KEYS]; ^ storage/perfschema/pfs.cc:2092:33: note: THR_PFS_contexts was previously declared here thread_local PFS_table_context *THR_PFS_contexts[THR_PFS_NUM_KEYS]; ^ storage/perfschema/pfs.cc:2092:33: note: code may be misoptimized unless -fno-strict-aliasing is used Workaround is to move the declaration of THR_PFS_contexts array from storage/perfschema/pfs.h to storage/perfschema/pfs_engine_table.h so that 'class PFS_table_context' is known when declaring the array. ================ extra/icu/source/common/udata.cpp:632:0: warning: type of icudt59_dat does not match original declaration [-Wlto-type-mismatch] extern "C" const DataHeader U_DATA_API U_ICUDATA_ENTRY_POINT; extra/icu/source/stubdata/stubdata.cpp:41:0: note: type name ICU_Data_Header should match type name DataHeader } ICU_Data_Header; The preferred solution is to configure with -DWITH_ICU=system. To remove warnings when building with bundled ICU, we disable -flto. ================ sql/json_dom.h:817: error: undefined reference to 'vtable for Json_int' /usr/bin/ld.gold: the vtable symbol may be undefined because the class is missing its key function Solution: move Json_int DTOR to .cc file. ================ storage/innobase/include/dict0dd.h:209: error: undefined reference to 'std::__cxx11::basic_string<char, std::char_traits<char>, Stateless_allocator<char, dd::String_type_alloc, My_free_functor> >::~basic_string()' /usr/bin/ld.gold: the symbol should have been defined by a plugin Solution: // Explicit template instantiation needed for gcc7 -flto template dd::String_type::~basic_string(); Change-Id: I04b3beeec4e2f6627f17ba379df917bb50b14680
Loading