%include <picolibc.specs>

%rename cc1plus blocksds_cc1plus
%rename cpp blocksds_cpp
%rename link blocksds_link

*cpp:
-D__NDS__ -D__BLOCKSDS__ -DARM7 %(blocksds_cpp)

*cc1_cpu:
-mcpu=arm7tdmi

*cc1plus:
%(cpp) %(blocksds_cc1plus)

*link:
%(blocksds_link) -T arm7/dldi_ds_arm7.ld --gc-sections --no-warn-rwx-segments

*startfile:
%:getenv(BLOCKSDS /sys/crts/ds_arm7_crt0%O)

*lib:
%(libgcc)
