[llvm-dev] Compile mysql with CFI enabled

zhangjun02@ict.ac.cn via llvm-dev llvm-dev at lists.llvm.org
Mon Aug 21 20:51:27 PDT 2017


Hi all, 

I try to compile mysql with CFI enabled by LLVM. The version of the softwares are as following:
clang-6.0
mysql-5.6.26
binutils-2.28.1
 I can compile mysal with the flowing configuration:

CC="clang" CXX="clang++" CFLAGS="-g -flto -fvisibility=hidden -fsanitize=cfi" CXXFLAGS="-g -flto -fvisibility=hidden -fsanitize=cfi" cmake -DCMAKE_{EXE,SHARED,MODULE}_LINKER_FLAGS="-flto -fsanitize=cfi" -DCMAKE_AR=/home/zhangjun/work/llvm/llvm-3.7.1/bin/llvm-ar -DCMAKE_RANLIB=/home/zhangjun/work/llvm/llvm-3.7.1/bin/llvm-ranlib -DCMAKE_INSTALL_PREFIX=../mysql -DWITH_BOOST=./boost .

and the reported error is as following:

ld: /home/zhangjun/work/llvm/llvm/tools/gold/goldplugin.cpp:879: ld_plugin_status allSymbolsReadHook(): Assertion `ObjFilename.second' failed.
clang-6.0: error: unable to execute command: Aborted (core dumped)
clang-6.0: error: linker command failed due to signal (use -v to see invocation)
make[2]: *** [extra/comp_err] Error 254
make[2]: Leaving directory `/home/zhangjun/work/mysql/mysql-5.6.26'
make[1]: *** [extra/CMakeFiles/comp_err.dir/all] Error 2
make[1]: Leaving directory `/home/zhangjun/work/mysql/mysql-5.6.26'
make: *** [all] Error 2

Please help me!

Regards,
Jun


zhangjun02 at ict.ac.cn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170822/2fd7cc1f/attachment.html>


More information about the llvm-dev mailing list