*endfile:
%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s

*link:
%{mlsp=*:--multilib-dir=%*} %{!static:--eh-frame-hdr} %{shared:-shared} %{!shared: %{!static: %{rdynamic:-export-dynamic} %{!dynamic-linker:-dynamic-linker=/lib/ld-uClibc.so.0}} %{static:-static}}

*lib:
%{pthread:-lpthread} %{shared: -lc} %{!shared: %{profile:-lc_p} %{!profile: -lc}}

*libgcc:
%{static|static-libgcc:-lgcc -lgcc_eh}%{!static:%{!static-libgcc:%{!shared-libgcc:-lgcc --as-needed -lgcc_s --no-as-needed}%{shared-libgcc:-lgcc_s%{!shared: -lgcc}}}}

*predefines:
-D__XTENSA__ -D__ELF__ -Dunix -D__unix -D__unix__ -Dlinux -D__linux -D__linux__ -D__gnu_linux__ -Asystem(posix) -D__PIC__ -D__pic__ -D__SIZEOF_SHORT__=2 -D__SIZEOF_INT__=4 -D__SIZEOF_POINTER__=4 -D__SIZEOF_LONG__=4 -D__SIZEOF_LONG_LONG__=8 -D__SIZEOF_FLOAT__=4 -D__SIZEOF_DOUBLE__=8 -D__SIZEOF_LONG_DOUBLE__=8 -D__unwind_word__=__word__

*subtarget_cpp_spec:
%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}

*startfile:
%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}

*thread_model:
posix
