Merge branch 'master' into bitmask-ubsan

This commit is contained in:
Alexey Milovidov 2019-02-09 23:57:36 +03:00
commit a42d1e0edf
2 changed files with 0 additions and 31 deletions

View File

@ -42,22 +42,7 @@ else ()
find_library (ICONV_LIBRARY iconv)
set (MYSQLCLIENT_LIBRARIES ${MYSQLCLIENT_LIBRARIES} ${STATIC_MYSQLCLIENT_LIB} ${ICONV_LIBRARY})
elseif (USE_STATIC_LIBRARIES AND STATIC_MYSQLCLIENT_LIB)
if (0)
# old lib patcher (ubuntu trusty?)
set (MYSQLCLIENT_LIB ${CMAKE_CURRENT_BINARY_DIR}/libmysqlclient.a)
message(STATUS "will patch mysql lib ${STATIC_MYSQLCLIENT_LIB} => ${MYSQLCLIENT_LIB}")
add_custom_command (
OUTPUT ${MYSQLCLIENT_LIB}
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/patch.sh ${STATIC_MYSQLCLIENT_LIB} ${MYSQLCLIENT_LIB}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS ${STATIC_MYSQLCLIENT_LIB}
COMMENT "Patching mysqlclient library.")
add_custom_target (our_mysql_client DEPENDS ${MYSQLCLIENT_LIB})
add_dependencies (mysqlxx our_mysql_client)
set (MYSQLCLIENT_LIBRARIES ${MYSQLCLIENT_LIB})
else()
set (MYSQLCLIENT_LIBRARIES ${STATIC_MYSQLCLIENT_LIB})
endif()
endif ()
endif ()

View File

@ -1,16 +0,0 @@
#!/usr/bin/env bash
# Exclude from libmysqlclient.a those object files that contain symbols conflicting with symbols from the libraries we use.
LIB=$1
OUT=$2
ZLIB_OBJS_REGEX="(my_new.cc.o|adler32.c.o|compress.c.o|crc32.c.o|deflate.c.o|gzio.c.o|infback.c.o|inffast.c.o|inflate.c.o|inftrees.c.o|trees.c.o|uncompr.c.o|zutil.c.o|my_sha2.cc.o)"
mkdir -p tmp
cd tmp
ar x $LIB
ar t $LIB | egrep --word-regex -v $ZLIB_OBJS_REGEX | xargs ar rcs $OUT
cd ..