Author: Stefan Gränitz Date: 2024-01-22T13:56:44+01:00 New Revision: 4821c90c24d52d4a42990fd9371caedb157bc58b
URL: https://github.com/llvm/llvm-project/commit/4821c90c24d52d4a42990fd9371caedb157bc58b DIFF: https://github.com/llvm/llvm-project/commit/4821c90c24d52d4a42990fd9371caedb157bc58b.diff LOG: [clang-repl] Fix PLT offset too large linker error on ARM (#78959) I cross-compile clang-repl with GCC-10 on Ubuntu 20.04 and get this error when linking with gold: PLT offset too large, try linking with --long-plt Added: Modified: clang/tools/clang-repl/CMakeLists.txt Removed: ################################################################################ diff --git a/clang/tools/clang-repl/CMakeLists.txt b/clang/tools/clang-repl/CMakeLists.txt index 2ccbe292fd49e0..b0aaf39f011547 100644 --- a/clang/tools/clang-repl/CMakeLists.txt +++ b/clang/tools/clang-repl/CMakeLists.txt @@ -22,3 +22,8 @@ clang_target_link_libraries(clang-repl PRIVATE if(CLANG_PLUGIN_SUPPORT) export_executable_symbols_for_plugins(clang-repl) endif() + +string(TOUPPER ${CMAKE_SYSTEM_PROCESSOR} system_processor) +if(${system_processor} MATCHES "ARM") + target_link_options(clang-repl PRIVATE LINKER:--long-plt) +endif() _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits