Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add -fPIC to compile examples/cpp and tests/cc
I use clang-8.0.1 and gcc-8.3.1 to compile bcc-0.8.1, without -fPIC, will get errors like this: /usr/bin/ld: CMakeFiles/test_libbcc.dir/test_libbcc.cc.o: relocation R_X86_64_32S against symbol `_ZTVN5Catch21LegacyReporterAdapterE' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: CMakeFiles/test_libbcc.dir/test_c_api.cc.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: CMakeFiles/CGroupTest.dir/CGroupTest.cc.o: relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIC Signed-off-by: Chunmei Xu <xuchunmei@linux.alibaba.com>
- Loading branch information