%rename lib old_lib
%rename endfile old_endfile
%rename startfile old_startfile
%rename link old_link


*lib:
%{!qrtems: %(old_lib)} \
%{!nostdlib: %{qrtems: --start-group -lrtemsbsp -lrtemscpu \
 -lc -lgcc --end-group \
 %{!qnolinkcmds: %{ml: -T linkcmds-le%s} %{!ml: -T linkcmds%s}}}}

*startfile:
%{!qrtems: %(old_startfile)} \
%{!nostdlib: %{qrtems: start.o%s}}

*link:
%(old_link) %{qrtems: -dc -dp -N -e _start}

