summaryrefslogtreecommitdiff
path: root/scripts/build
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2021-01-12 05:25:07 (GMT)
committerKeith Packard <keithp@keithp.com>2021-01-14 23:05:10 (GMT)
commit15e053fdc44e8c4a8fe1f87ea2e6787b8420dcd1 (patch)
tree522d1212295d2c8029dc642aab22f69cfc15463c /scripts/build
parent945b4c64368b895c190a9b7592d6514bd1ee1d5d (diff)
Create nano.spec file that sits atop the existing nano build
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'scripts/build')
-rw-r--r--scripts/build/companion_libs/350-newlib_nano.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/scripts/build/companion_libs/350-newlib_nano.sh b/scripts/build/companion_libs/350-newlib_nano.sh
index c9a7396..498ef63 100644
--- a/scripts/build/companion_libs/350-newlib_nano.sh
+++ b/scripts/build/companion_libs/350-newlib_nano.sh
@@ -121,6 +121,22 @@ ENABLE_TARGET_OPTSPACE:target-optspace
CT_DoLog EXTRA "Installing Newlib Nano C library"
CT_DoExecLog ALL make install
+ cat > "${CT_SYSROOT_DIR}/lib/nano.specs" <<EOF
+%rename link newlib_nano_link
+%rename cpp newlib_nano_cpp
+%rename cc1plus newlib_nano_cc1plus
+
+*cpp:
+-isystem ${CT_PREFIX_DIR}/newlib-nano/${CT_TARGET}/include %(newlib_nano_cpp)
+
+*cc1plus:
+-idirafter ${CT_PREFIX_DIR}/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
+
+EOF
+
CT_Popd
CT_EndStep
}