From 89273b59af94fa1a40991762c780f668a7f032ec Mon Sep 17 00:00:00 2001 From: Alexey Brodkin Date: Wed, 14 Apr 2021 22:10:40 +0300 Subject: newlib-nano: Use run-time calculated paths in top-level nano.specs In currently generated top-level "nano.specs" we resolve paths during toolchain building and then use those pre-defined full paths once the toolchain got built. That's OK until the toolchain is used right were it was built, otherwise paths used in the top-level "nano.specs" become irrelevant and linker fails to find "nano" libs reverting to non-"nano" libs in the default location. See https://github.com/crosstool-ng/crosstool-ng/issues/1491. Signed-off-by: Alexey Brodkin diff --git a/scripts/build/companion_libs/350-newlib_nano.sh b/scripts/build/companion_libs/350-newlib_nano.sh index 28992c0..4cbfd71 100644 --- a/scripts/build/companion_libs/350-newlib_nano.sh +++ b/scripts/build/companion_libs/350-newlib_nano.sh @@ -199,13 +199,13 @@ ENABLE_TARGET_OPTSPACE:target-optspace %rename cc1plus newlib_nano_cc1plus *cpp: --isystem ${CT_PREFIX_DIR}/newlib-nano/${CT_TARGET}/include %(newlib_nano_cpp) +-isystem %:getenv(GCC_EXEC_PREFIX ../../newlib-nano/${CT_TARGET}/include) %(newlib_nano_cpp) *cc1plus: --idirafter ${CT_PREFIX_DIR}/newlib-nano/${CT_TARGET}/include %(newlib_nano_cc1plus) +-idirafter %:getenv(GCC_EXEC_PREFIX ../../newlib-nano/${CT_TARGET}/include) %(newlib_nano_cc1plus) *link: --L${CT_PREFIX_DIR}/newlib-nano/${CT_TARGET}/lib/%M -L${CT_PREFIX_DIR}/newlib-nano/${CT_TARGET}/lib +-L%:getenv(GCC_EXEC_PREFIX ../../newlib-nano/${CT_TARGET}/lib/%M) -L%:getenv(GCC_EXEC_PREFIX ../../newlib-nano/${CT_TARGET}/lib) EOF -- cgit v0.10.2-6-g49f6