Skip to content
Commit 6a42ede4 authored by Nicolas Lebedenco's avatar Nicolas Lebedenco Committed by Carles Cufí
Browse files

cmake: Normalize GNULD_LINKER variable



Some toolchains may generate convoluted paths when reporting accessory
tools. This is the case with GCC in the Zephyr SDK toolchain. For
example, for a Zephyr SDK installed under `C:\Portable\Zephyr` a call to
`gcc --print-prog-name=ld.bfd` should normally return something like
`c:/portable/zephyr/zephyr-sdk-0.16.5/arm-zephyr-eabi/arm-zephyr-eabi/bin/ld.bfd.exe`
but because of how the toolchain was created the path reported gets all
messed up with relative fragments. In above case, the actual path reported
was `c:/portable/zephyr/zephyr-sdk-0.16.5/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe`
One might argue that this should be fixed in the toolchain which could be
possible for the Zephyr SDK but not for other toolchains (definitely not
for proprietary ones).

Signed-off-by: default avatarNicolas Lebedenco <nicolas@lebedenco.net>
parent bec4faeb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment