-
Notifications
You must be signed in to change notification settings - Fork 343
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug#36108397 Upgrade to latest protobuf library [patches]
Followup patch: We no longer need to support el6, so remove our own homegrown linker scripts for the protobuf libraries. This fixes problems with ODR violations when running protoc with gRPC plugins. It also fixes bad symbol bindings for our plugins which link with the protobuf shared libraries. We switch from STATIC to SHARED abseil libraries, in order to make linking consistent for MySQL and plugins, and for protoc and its (gRPC) plugins. One extension to extra/protobuf/protobuf-24.4/src/libprotobuf.map was needed for UBSAN builds with gcc/clang. Change-Id: Icaddbfc1dbebe26cfe1d79a7acb39d329dd66e25
- Loading branch information
Tor Didriksen
committed
Feb 15, 2024
1 parent
fb665eb
commit 36a97ba
Showing
15 changed files
with
623 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/* | ||
Copyright (c) 2024, Oracle and/or its affiliates. | ||
|
||
This program is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License, version 2.0, | ||
as published by the Free Software Foundation. | ||
|
||
This program is designed to work with certain software (including | ||
but not limited to OpenSSL) that is licensed under separate terms, | ||
as designated in a particular file or component or in included license | ||
documentation. The authors of MySQL hereby grant you an additional | ||
permission to link the program and your derivative works with the | ||
separately licensed software that they have either included with | ||
the program or referenced in the documentation. | ||
|
||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License, version 2.0, for more details. | ||
|
||
You should have received a copy of the GNU General Public License | ||
along with this program; if not, write to the Free Software | ||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
*/ | ||
|
||
/* | ||
Hide all symbols from the standard library. | ||
|
||
This is a workaround for libstdc++ problems which are caused | ||
by our INSTALL_DEBUG_TARGET cmake macro: we *link* with one .so library, | ||
but *run* with a different version. | ||
|
||
The installed mysqld-debug will not start because of: | ||
./bin/mysqld-debug: symbol lookup error: ./bin/mysqld-debug: | ||
undefined symbol: | ||
_ZNSt18basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev | ||
|
||
Running c++filt on that, we get | ||
std::basic_stringstream<char, std::char_traits<char>, | ||
std::allocator<char> >::basic_stringstream() | ||
|
||
The abseil libraries do not come with any --version-script, and | ||
hence will export *all* symbols. By providing this version script | ||
we explicitly disable the export of everything from the standard | ||
library. | ||
|
||
For mangling of names in the standard library, see: | ||
https://itanium-cxx-abi.github.io/cxx-abi/abi.html#mangling | ||
|
||
<substitution> ::= St # ::std:: | ||
<substitution> ::= Sa # ::std::allocator | ||
<substitution> ::= Sb # ::std::basic_string | ||
<substitution> ::= Ss # ::std::basic_string < char, | ||
::std::char_traits<char>, | ||
::std::allocator<char> > | ||
<substitution> ::= Si # ::std::basic_istream<char, std::char_traits<char> > | ||
<substitution> ::= So # ::std::basic_ostream<char, std::char_traits<char> > | ||
<substitution> ::= Sd # ::std::basic_iostream<char, std::char_traits<char> > | ||
*/ | ||
|
||
MYSQL_HIDE_STD { | ||
local: | ||
_ZS[tabsiod]*; | ||
_ZNS[tabsiod]*; | ||
_ZNKS[tabsiod]*; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.