Create nano.spec file that sits atop the existing nano build

Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Keith Packard 2021-01-11 21:25:07 -08:00
parent 945b4c6436
commit 15e053fdc4

View File

@ -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
}