https://github.com/weliveindetail created https://github.com/llvm/llvm-project/pull/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 From 0449f8fc14a703aae515db1696bbbee578914629 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=A4nitz?= <stefan.graen...@gmail.com> Date: Sat, 20 Jan 2024 11:13:45 +0100 Subject: [PATCH] [clang-repl] Fix linker error on ARM Error in gold linker is: PLT offset too large, try linking with --long-plt --- clang/tools/clang-repl/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/clang/tools/clang-repl/CMakeLists.txt b/clang/tools/clang-repl/CMakeLists.txt index 2ccbe292fd49e09..8589e37418354e7 100644 --- a/clang/tools/clang-repl/CMakeLists.txt +++ b/clang/tools/clang-repl/CMakeLists.txt @@ -22,3 +22,7 @@ clang_target_link_libraries(clang-repl PRIVATE if(CLANG_PLUGIN_SUPPORT) export_executable_symbols_for_plugins(clang-repl) endif() + +if(${CMAKE_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