summaryrefslogtreecommitdiff
path: root/scripts/build
diff options
context:
space:
mode:
authorAlexey Brodkin <abrodkin@synopsys.com>2021-04-14 19:10:40 (GMT)
committerAlexey Brodkin <abrodkin@synopsys.com>2021-04-16 14:11:01 (GMT)
commit89273b59af94fa1a40991762c780f668a7f032ec (patch)
treed89f4634bd3089d52f15d105b7334d96dbebce10 /scripts/build
parentf582f1c22d4e79edb15f14c1cc282cc7cc77f241 (diff)
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 <abrodkin@synopsys.com>
Diffstat (limited to 'scripts/build')
-rw-r--r--scripts/build/companion_libs/350-newlib_nano.sh6
1 files changed, 3 insertions, 3 deletions
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