Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
608c0e1c
Commit
608c0e1c
authored
Apr 18, 2016
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-5982 `make` fail @ ".../libmysql_versions.ld:155:9: invalid use of VERSION in input file"
add a workaround for gold
parent
ce355304
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
18 deletions
+44
-18
libmysql/CMakeLists.txt
libmysql/CMakeLists.txt
+42
-4
libmysql/libmysql_versions.ld.in
libmysql/libmysql_versions.ld.in
+2
-14
No files found.
libmysql/CMakeLists.txt
View file @
608c0e1c
...
...
@@ -251,6 +251,25 @@ SET(CLIENT_API_FUNCTIONS
)
IF
(
CMAKE_SYSTEM_NAME MATCHES
"Linux"
)
IF
(
NOT DISABLE_LIBMYSQLCLIENT_SYMBOL_VERSIONING
)
INCLUDE
(
CheckCSourceCompiles
)
FILE
(
WRITE
"
${
CMAKE_BINARY_DIR
}${
CMAKE_FILES_DIRECTORY
}
/CMakeTmp/src.ld"
"VERSION {
\n
libmysqlclient_18 {
\n
global: *;
\n
};
\n
}
\n
"
)
SET
(
CMAKE_REQUIRED_LIBRARIES
"-Wl,src.ld"
)
CHECK_C_SOURCE_COMPILES
(
"int main() { return 0; }"
SUPPORTS_VERSION_IN_LINK_SCRIPT
)
SET
(
CMAKE_REQUIRED_LIBRARIES
)
IF
(
NOT SUPPORTS_VERSION_IN_LINK_SCRIPT
)
# https://sourceware.org/bugzilla/show_bug.cgi?id=16895
MESSAGE
(
SEND_ERROR
"Your current linker does not support VERSION "
"command in linker scripts like a GNU ld or any compatible linker "
"should. Perhaps you're using gold? Either switch to GNU ld compatible "
"linker or run cmake with -DDISABLE_LIBMYSQLCLIENT_SYMBOL_VERSIONING=TRUE "
"to be able to complete the build"
)
ENDIF
(
NOT SUPPORTS_VERSION_IN_LINK_SCRIPT
)
# When building RPM, or DEB package on Debian, use ELF symbol versioning
# for compatibility with distribution packages, so client shared library can
# painlessly replace the one supplied by the distribution.
...
...
@@ -335,14 +354,26 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
make_scrambled_password_323
)
# Linker script to version symbols in Fedora- and Debian- compatible way, MDEV-5529
SET
(
VERSION_SCRIPT_TEMPLATE
${
CMAKE_CURRENT_SOURCE_DIR
}
/libmysql_versions.ld.in
)
# Generate version script.
# Create semicolon separated lists of functions to export from
# Since RPM packages use separate versioning for 5.1 API
# and 5.5 API (libmysqlclient_16 vs libmysqlclient_18),
# we need 2 lists.
SET
(
VERSION_HEADER
"VERSION {
libmysqlclient_18 {
global:"
)
SET
(
VERSION_FOOTER
" local:
*;
};
libmysqlclient_16 {
/* empty here. aliases are added above */
};
}
"
)
SET
(
CLIENT_API_5_1_LIST
)
SET
(
CLIENT_API_5_1_ALIASES
)
FOREACH
(
f
${
CLIENT_API_FUNCTIONS_5_1
}
${
CLIENT_API_5_1_EXTRA
}
)
...
...
@@ -355,6 +386,13 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
SET
(
CLIENT_API_5_5_LIST
"
${
CLIENT_API_5_5_LIST
}
\t
${
f
}
;
\n
"
)
ENDFOREACH
()
ELSE
(
NOT DISABLE_LIBMYSQLCLIENT_SYMBOL_VERSIONING
)
SET
(
CLIENT_API_5_1_ALIASES
"/* Versioning disabled per user request. MDEV-5982 */"
)
ENDIF
(
NOT DISABLE_LIBMYSQLCLIENT_SYMBOL_VERSIONING
)
# Linker script to version symbols in Fedora- and Debian- compatible way, MDEV-5529
SET
(
VERSION_SCRIPT_TEMPLATE
${
CMAKE_CURRENT_SOURCE_DIR
}
/libmysql_versions.ld.in
)
CONFIGURE_FILE
(
${
VERSION_SCRIPT_TEMPLATE
}
${
CMAKE_CURRENT_BINARY_DIR
}
/libmysql_versions.ld
...
...
@@ -363,7 +401,7 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
SET
(
VERSION_SCRIPT_LINK_FLAGS
"-Wl,
${
CMAKE_CURRENT_BINARY_DIR
}
/libmysql_versions.ld"
)
ENDIF
()
ENDIF
(
CMAKE_SYSTEM_NAME MATCHES
"Linux"
)
SET
(
CLIENT_SOURCES
...
...
libmysql/libmysql_versions.ld.in
View file @
608c0e1c
...
...
@@ -27,19 +27,7 @@ mysql_get_charset_by_csname = get_charset_by_csname;
mysql_net_realloc = net_realloc;
mysql_client_errors = client_errors;
VERSION {
libmysqlclient_18 {
global:
@VERSION_HEADER@
@CLIENT_API_5_1_LIST@
@CLIENT_API_5_5_LIST@
local:
*;
};
libmysqlclient_16 {
/* empty here. aliases are added above */
};
}
@VERSION_FOOTER@
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment