From b7357de32427c27a8aa7d243815041628b93fcbb Mon Sep 17 00:00:00 2001 From: Jethro Beekman Date: Mon, 21 Jan 2019 18:28:42 +0530 Subject: [PATCH] Avoid too new relocation types being emitted --- libunwind/src/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libunwind/src/CMakeLists.txt b/libunwind/src/CMakeLists.txt index 8fcec5024e7b16e..5e4757d6b126f9f 100644 --- a/libunwind/src/CMakeLists.txt +++ b/libunwind/src/CMakeLists.txt @@ -50,6 +50,11 @@ if (RUST_SGX) list(APPEND LIBUNWIND_COMPILE_FLAGS -fno-stack-protector) list(APPEND LIBUNWIND_COMPILE_FLAGS -ffreestanding) list(APPEND LIBUNWIND_COMPILE_FLAGS -fexceptions) + # Avoid too new relocation types being emitted, which might prevent linking + # on older platforms. + # + # See https://github.com/rust-lang/rust/issues/34978 + list(APPEND LIBUNWIND_COMPILE_FLAGS -Wa,-mrelax-relocations=no) # Sources list(APPEND LIBUNWIND_C_SOURCES UnwindRustSgx.c)