[libcxx-commits] [PATCH] D60049: [libc++abi] Add LIBCXXABI_ENABLE_PIC cmake option
Brian Rzycki via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Apr 2 10:03:27 PDT 2019
brzycki added a comment.
Hello @sbc100, I'm seeing a build break caused by D60005 <https://reviews.llvm.org/D60005> when I attempt to do the following:
1. compile llvm for aarch64 with a gnu toolchain sysroot
2. use the freshly built llvm aarch64 compiler to build libcxxabi aarch64 before building libcxx aarch64
I see the following ninja error when attempting to create the libc++abi.so.1.0. I do not see this issue with the immediately previous SHA commit of 5f0c4c67bbff53 <https://reviews.llvm.org/rG5f0c4c67bbff5374b196578486a16147cb786548>.
I also tried applying the patch in this ticket to tip and recompiled and I still see the same error.
Please let me know if you need further build details.
cmake -G Ninja -D CMAKE_INSTALL_PREFIX=/work/b.rzycki/4/aarch64-sarc-linux-gnu/sysroot -D LLVM_PATH=/tmp/tmp.N01uFPofsv/src/llvm -D LIBCXXABI_LIBCXX_PATH=/tmp/tmp.N01uFPofsv/src/libcxx -D CMAKE_C_FLAGS= -D CMAKE_CXX_FLAGS= /tmp/tmp.N01uFPofsv/src/libcxxabi
Re-run cmake no build system arguments
-- The CXX compiler identification is Clang 9.0.0
-- The C compiler identification is Clang 9.0.0
-- Check for working CXX compiler: /work/b.rzycki/4/bin/aarch64-linux-clang++
-- Check for working CXX compiler: /work/b.rzycki/4/bin/aarch64-linux-clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /work/b.rzycki/4/bin/aarch64-linux-clang
-- Check for working C compiler: /work/b.rzycki/4/bin/aarch64-linux-clang -- works
...
ninja -v -j 64
...
FAILED: lib/libc++abi.so.1.0
: && /work/b.rzycki/4/bin/aarch64-linux-clang++ -fPIC -nodefaultlibs -shared -Wl,-soname,libc++abi.so.1
-o lib/libc++abi.so.1.0 src/CMakeFiles/cxxabi_shared_objects.dir/cxa_aux_runtime.cpp.o src/CMakeFiles/cxxa
bi_shared_objects.dir/cxa_default_handlers.cpp.o src/CMakeFiles/cxxabi_shared_objects.dir/cxa_demangle.cpp
.o src/CMakeFiles/cxxabi_shared_objects.dir/cxa_exception_storage.cpp.o src/CMakeFiles/cxxabi_shared_objec
ts.dir/cxa_guard.cpp.o src/CMakeFiles/cxxabi_shared_objects.dir/cxa_handlers.cpp.o src/CMakeFiles/cxxabi_s
hared_objects.dir/cxa_unexpected.cpp.o src/CMakeFiles/cxxabi_shared_objects.dir/cxa_vector.cpp.o src/CMake
Files/cxxabi_shared_objects.dir/cxa_virtual.cpp.o src/CMakeFiles/cxxabi_shared_objects.dir/stdlib_exceptio
n.cpp.o src/CMakeFiles/cxxabi_shared_objects.dir/stdlib_stdexcept.cpp.o src/CMakeFiles/cxxabi_shared_objec
ts.dir/stdlib_typeinfo.cpp.o src/CMakeFiles/cxxabi_shared_objects.dir/abort_message.cpp.o src/CMakeFiles/c
xxabi_shared_objects.dir/fallback_malloc.cpp.o src/CMakeFiles/cxxabi_shared_objects.dir/private_typeinfo.c
pp.o src/CMakeFiles/cxxabi_shared_objects.dir/stdlib_new_delete.cpp.o src/CMakeFiles/cxxabi_shared_objects
.dir/cxa_exception.cpp.o src/CMakeFiles/cxxabi_shared_objects.dir/cxa_personality.cpp.o src/CMakeFiles/cxx
abi_shared_objects.dir/cxa_thread_atexit.cpp.o -Wl,-rpath,"\$ORIGIN/../lib" -lpthread -lc -lgcc_s && :
/work/b.rzycki/4/bin/aarch64-sarc-linux-gnu-ld: src/CMakeFiles/cxxabi_shared_objects.dir/cxa_default_handl
ers.cpp.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `__cxa_unexpected_handler' which may bind
externally can not be used when making a shared object; recompile with -fPIC
/work/b.rzycki/4/bin/aarch64-sarc-linux-gnu-ld: src/CMakeFiles/cxxabi_shared_objects.dir/cxa_default_handl
ers.cpp.o: in function `std::set_unexpected(void (*)())':
cxa_default_handlers.cpp:(.text+0x18): dangerous relocation: unsupported relocation
/work/b.rzycki/4/bin/aarch64-sarc-linux-gnu-ld: src/CMakeFiles/cxxabi_shared_objects.dir/cxa_default_handl
ers.cpp.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `__cxa_terminate_handler' which may bind e
xternally can not be used when making a shared object; recompile with -fPIC
/work/b.rzycki/4/bin/aarch64-sarc-linux-gnu-ld: src/CMakeFiles/cxxabi_shared_objects.dir/cxa_default_handl
ers.cpp.o: in function `std::set_terminate(void (*)())':
cxa_default_handlers.cpp:(.text+0x234): dangerous relocation: unsupported relocation
/work/b.rzycki/4/bin/aarch64-sarc-linux-gnu-ld: src/CMakeFiles/cxxabi_shared_objects.dir/cxa_default_handl
ers.cpp.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `_ZTISt9exception' which may bind external
ly can not be used when making a shared object; recompile with -fPIC
/work/b.rzycki/4/bin/aarch64-sarc-linux-gnu-ld: src/CMakeFiles/cxxabi_shared_objects.dir/cxa_default_handl
ers.cpp.o: in function `demangling_terminate_handler()':
cxa_default_handlers.cpp:(.text+0x2c0): dangerous relocation: unsupported relocation
/work/b.rzycki/4/bin/aarch64-sarc-linux-gnu-ld: src/CMakeFiles/cxxabi_shared_objects.dir/cxa_default_handlers.cpp.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `__cxa_terminate_handler' which may bind externally can not be used when making a shared object; recompile with -fPIC
/work/b.rzycki/4/bin/aarch64-sarc-linux-gnu-ld: src/CMakeFiles/cxxabi_shared_objects.dir/cxa_default_handlers.cpp.o: in function `__cxx_global_var_init':
cxa_default_handlers.cpp:(.text.startup+0x8): dangerous relocation: unsupported relocation
/work/b.rzycki/4/bin/aarch64-sarc-linux-gnu-ld: src/CMakeFiles/cxxabi_shared_objects.dir/cxa_default_handlers.cpp.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `__cxa_unexpected_handler' which may bind externally can not be used when making a shared object; recompile with -fPIC
/work/b.rzycki/4/bin/aarch64-sarc-linux-gnu-ld: src/CMakeFiles/cxxabi_shared_objects.dir/cxa_default_handlers.cpp.o: in function `__cxx_global_var_init.1':
cxa_default_handlers.cpp:(.text.startup+0x24): dangerous relocation: unsupported relocation
/work/b.rzycki/4/bin/aarch64-sarc-linux-gnu-ld: src/CMakeFiles/cxxabi_shared_objects.dir/cxa_aux_runtime.cpp.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `_ZTISt8bad_cast' which may bind externally can not be used when making a shared object; recompile with -fPIC
/work/b.rzycki/4/bin/aarch64-sarc-linux-gnu-ld: src/CMakeFiles/cxxabi_shared_objects.dir/cxa_aux_runtime.cpp.o: in function `__cxa_bad_cast':
cxa_aux_runtime.cpp:(.text+0x10): dangerous relocation: unsupported relocation
/work/b.rzycki/4/bin/aarch64-sarc-linux-gnu-ld: src/CMakeFiles/cxxabi_shared_objects.dir/cxa_aux_runtime.cpp.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `_ZNSt8bad_castD1Ev' which may bind externally can not be used when making a shared object; recompile with -fPIC
/work/b.rzycki/4/bin/aarch64-sarc-linux-gnu-ld: cxa_aux_runtime.cpp:(.text+0x18): dangerous relocation: unsupported relocation
/work/b.rzycki/4/bin/aarch64-sarc-linux-gnu-ld: src/CMakeFiles/cxxabi_shared_objects.dir/cxa_aux_runtime.cpp.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `_ZTISt10bad_typeid' which may bind externally can not be used when making a shared object; recompile with -fPIC
/work/b.rzycki/4/bin/aarch64-sarc-linux-gnu-ld: src/CMakeFiles/cxxabi_shared_objects.dir/cxa_aux_runtime.cpp.o: in function `__cxa_bad_typeid':
cxa_aux_runtime.cpp:(.text+0x54): dangerous relocation: unsupported relocation
/work/b.rzycki/4/bin/aarch64-sarc-linux-gnu-ld: src/CMakeFiles/cxxabi_shared_objects.dir/cxa_aux_runtime.cpp.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `_ZNSt10bad_typeidD1Ev' which may bind externally can not be used when making a shared object; recompile with -fPIC
/work/b.rzycki/4/bin/aarch64-sarc-linux-gnu-ld: cxa_aux_runtime.cpp:(.text+0x5c): dangerous relocation: unsupported relocation
/work/b.rzycki/4/bin/aarch64-sarc-linux-gnu-ld: src/CMakeFiles/cxxabi_shared_objects.dir/cxa_aux_runtime.cpp.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `_ZTISt20bad_array_new_length' which may bind externally can not be used when making a shared object; recompile with -fPIC
/work/b.rzycki/4/bin/aarch64-sarc-linux-gnu-ld: src/CMakeFiles/cxxabi_shared_objects.dir/cxa_aux_runtime.cpp.o: in function `__cxa_throw_bad_array_new_length':
cxa_aux_runtime.cpp:(.text+0x98): dangerous relocation: unsupported relocation
/work/b.rzycki/4/bin/aarch64-sarc-linux-gnu-ld: src/CMakeFiles/cxxabi_shared_objects.dir/cxa_aux_runtime.cpp.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `_ZNSt20bad_array_new_lengthD1Ev' which may bind externally can not be used when making a shared object; recompile with -fPIC
/work/b.rzycki/4/bin/aarch64-sarc-linux-gnu-ld: cxa_aux_runtime.cpp:(.text+0xa0): dangerous relocation: unsupported relocation
/work/b.rzycki/4/bin/aarch64-sarc-linux-gnu-ld: src/CMakeFiles/cxxabi_shared_objects.dir/cxa_demangle.cpp.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `stderr@@GLIBC_2.17' which may bind externally can not be used when making a shared object; recompile with -fPIC
/work/b.rzycki/4/bin/aarch64-sarc-linux-gnu-ld: src/CMakeFiles/cxxabi_shared_objects.dir/cxa_demangle.cpp.o(.text+0x17c8): unresolvable R_AARCH64_ADR_PREL_PG_HI21 relocation against symbol `stderr@@GLIBC_2.17'
/work/b.rzycki/4/bin/aarch64-sarc-linux-gnu-ld: final link failed: bad value
clang-9: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60049/new/
https://reviews.llvm.org/D60049
More information about the libcxx-commits
mailing list