aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorStephanos Ioannidis <root@stephanos.io>2022-05-10 01:11:23 +0900
committerChris Packham <judge.packham@gmail.com>2022-05-12 20:58:29 +1200
commit1da7698b7cce647a91cbb885d1ec9da69a45a1df (patch)
tree80d713307e86477a39699ee66082e2e5c02862d6 /scripts
parent396f23d3dee16a55e0da0ed985dab1c94c2e57a9 (diff)
downloadcrosstool-ng-1da7698b7cce647a91cbb885d1ec9da69a45a1df.tar.gz
crosstool-ng-1da7698b7cce647a91cbb885d1ec9da69a45a1df.tar.bz2
crosstool-ng-1da7698b7cce647a91cbb885d1ec9da69a45a1df.zip
newlib-nano: Fix include path for CT_NEWLIB_NANO_INSTALL_IN_TARGET
When `CT_NEWLIB_NANO_INSTALL_IN_TARGET=y`, the `nano.specs` file emitted by the newlib-nano build script contains an invalid include path, resulting in the full `newlib.h` being included instead of the nano `newlib.h` by the application. `=/include/newlib-nano` is not a valid path (`=` does not mean anything and that string is taken as an include path as-is) and GCC ignores this include path, resulting in application including the `newlib.h` from `include/` which contains the newlib build configurations for the full newlib. This commit modifies the newlib-nano build script to emit a proper newlib-nano include path relative to the `GCC_EXEC_PREFIX`. Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/build/companion_libs/350-newlib_nano.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/build/companion_libs/350-newlib_nano.sh b/scripts/build/companion_libs/350-newlib_nano.sh
index d4a59f29..2d889d4d 100644
--- a/scripts/build/companion_libs/350-newlib_nano.sh
+++ b/scripts/build/companion_libs/350-newlib_nano.sh
@@ -203,7 +203,7 @@ ENABLE_TARGET_OPTSPACE:target-optspace
%rename cpp_unique_options nano_cpp_unique_options
*cpp_unique_options:
--isystem =/include/newlib-nano %(nano_cpp_unique_options)
+-isystem %:getenv(GCC_EXEC_PREFIX ../../${CT_TARGET}/include/newlib-nano) %(nano_cpp_unique_options)
*nano_libc:
-lc_nano