Skip to content

Commit

Permalink
Use the bfd linker in the armv7 toolchain (#7406)
Browse files Browse the repository at this point in the history
  • Loading branch information
fealebenpae authored Mar 1, 2024
1 parent 8cfcb52 commit e1042b8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
-----------

### Internals
* None.
* The Linux-armv7 cross-compiling toolchain file prefers the bfd linker over gold because of issues linking against OpenSSL 3.2.0.

----------------------------------------------

Expand Down
5 changes: 5 additions & 0 deletions tools/cmake/armv7-linux-gnueabihf.toolchain.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
set(_TRIPLET "armv7-unknown-linux-gnueabihf")
set(_TOOLCHAIN_MD5 fbf817b1428bb35c93be8e6c15f73d7d)
include("${CMAKE_CURRENT_LIST_DIR}/linux.toolchain.base.cmake")

# Explicitly opt-in to the slower bfd linker over gold, because gold in GCC 11.2 doesn't play nice with R_ARM_REL32 relocations
set(CMAKE_EXE_LINKER_FLAGS_INIT "-fuse-ld=bfd ${CMAKE_EXE_LINKER_FLAGS_INIT}")
set(CMAKE_SHARED_LINKER_FLAGS_INIT "-fuse-ld=bfd ${CMAKE_SHARED_LINKER_FLAGS_INIT}")
set(CMAKE_MODULE_LINKER_FLAGS_INIT "-fuse-ld=bfd ${CMAKE_MODULE_LINKER_FLAGS_INIT}")

0 comments on commit e1042b8

Please sign in to comment.