*asm:
%{Zomf} %{s:-Zstrip}

*asm_final:


*cpp:
%{Zdll:-D__DLL__} %{Zwin32:-D__WIN32__ -D_WIN32 -D__RSXNT__} %{Zrsx32:-D__RSX32__  -D__RSXNT__} %{Zcrtdll=crtrsxnt:-D__CRTRSXNT__%{!Zwin32:%e-Zcrtdll requires -Zwin32}} \
%{posix:-D_POSIX_SOURCE} %{Zmt:-D__MT__} %{Zomf} %{ZC++-comments} %{Zc++-comments} %{pg:-D__GPROF__} %{mepilogue:-D__EPILOGUE__}

*cc1:
%{Zwin32:-mprobe} %{Zrsx32:-mprobe}

*cc1plus:
%{Zwin32:-mprobe} %{Zrsx32:-mprobe}

*endfile:


*link:
%{Zexe} %{Zstack*} %{Zmap*} %{Zomf:%{Zdll}}%{!o*:-o %b.%{Zdll:dll}%{!Zdll:exe}} %{static:%{Zcrtdll=*:%e-static and -Zcrtdll are incompatible}}%{Zdll:%{Zexe:%e-Zdll and -Zexe are incompatible}}%{Zso:%{!Zsys:%e-Zso requires -Zsys}}%{Zso:%{!Zdll:%e-Zso requires -Zdll}}%{Zno-rte:%{!Zdll:%e-Zno-rte requires -Zdll}}%{Zno-rte:%{!Zwin32:%{!Zomf:%e-Zno-rte requires -Zomf}}}%{Zno-rte:%{Zsys:%e-Zno-rte and -Zsys are incompatible}}%{Zno-rte:%{Zso:%e-Zno-rte and -Zso are incompatible}}%{Zno-rte:%{Zcrtdll=*:%e-Zcrtdll and -Zno-rte are incompatible}}%{Zno-rte:%{Zmt:%e-Zmt and -Zno-rte are incompatible}}%{Zsys:%{Zcrtdll=*:%e-Zcrtdll and -Zsys are incompatible}}%{Zsys:%{!Zomf:%{!Zwin32:%e-Zsys requires -Zomf}}} \
%{Zsys:%{!Zwin32:%{Zbsd-signals:%e-Zbsd-signals and -Zsys are incompatible}}}%{Zsys:%{!Zwin32:%{Zsysv-signals:%e-Zsysv-signals and -Zsys are incompatible}}}%{Zbsd-signals:%{Zsysv-signals:%e-Zbsd-signals and -Zsysv-signals are incompatible}}%{Zsmall-conv:%{Zcrtdll=*:%e-Zsmall-conv and -Zcrtdll are incompatible}} \
%{Zcrtdll=crtrsxnt:%{!Zwin32:%e-Zcrtdll requires -Zwin32}} \
%{Zwin32}%{Zrsx32}%{Zwin32: -Ttext=0x410000}%{Zrsx32: -Ttext=0x410000}

*link_command:
%{!fsyntax-only: \
 %{!c:%{!M:%{!MM:%{!E:%{!S:%{!Zomf:ld}%{Zomf:emxomfld}\
  %l %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} \
  %{r} %{s} %{t} %{u*} %{x} %{z} %{Z}\
  %{!A:%{!nostdlib:%{!nostartfiles:%S}}}\
  %{static:} %{L*} %D %{T*} %o\
  %{fbounds-checking:-lcheck} \
  %{!nostdlib:%{!nodefaultlibs: %{Zwin32:%{!Zdll: -lwinmain}%{Zdll: -llibmain}} %{!Znoalias: -lc_alias} \
    %{Zcrtdll=*:-lc_static -l%* %{!Zwin32: -los2%{pg:_p}}%{Zwin32: -lwemx2}%{Zrsx32: -lwemx2} -lemx2 %{Zrsx32: -lkernel32} %{Zwin32: -lkernel32 -luser32 -lgdi32}}\
    %{!Zcrtdll:%{!Zcrtdll=*:%G %L %G\
       %{Zno-rte:%{!Zwin32: -los2%{pg:_p}}%{Zrsx32: -lkernel32}%{Zwin32: -lkernel32 -luser32 -lgdi32}}\
       %{!Zno-rte:%{Zsys:%{!Zwin32:-lsys -los2%{pg:_p}}%{Zwin32:-lsys -lkernel32 -luser32 -lgdi32}}\
		  %{!Zsys:-lemx -los2%{pg:_p} %{Zwin32: -lwemx2}%{Zrsx32: -lwemx2} -lemx2 %{Zrsx32: -lkernel32}%{Zwin32: -lkernel32 -luser32 -lgdi32}}}}}\
    %{Zomf:-lend}}}\
  %{!A:%{!nostdlib:%{!nostartfiles:%E}}}}}}}}}

*lib:
%{Zwin32:%{Zmt: -lwthreads} -lc_patch} %{Zrsx32: -lc_patch} \
%{g*:-lg} %{p:-lc_p}%{pg:-lc_p} -lc %{Zdll:%{Zso:-lc_dllso}%{Zno-rte:-lc_dllnrt}%{!Zso:%{!Zno-rte:-lc_dllrt}}}%{!Zdll:-lc_app%{pg:_p}} %{p:-lc_p}%{pg:-lc_p} -lc %{Zwin32:%{Zdll:%{Zso:-lc_dllso}}}

*libgcc:
-lgcc%{pg:_p}

*startfile:
%{Zdll:%{!Zwin32:dll0%O%s}%{Zwin32:dll0w32%O%s}}%{!Zdll:%{pg:gcrt0%O%s}%{!pg:%{pn:gcrt0%O%s}%{!pn:%{p:mcrt0%O%s}%{!p:crt0%O%s}}} %{Zsysv-signals:sigsysv%O%s} %{Zbsd-signals:sigbsd%O%s} %{Zbin-files:binmode%O%s}%{Zsmall-conv:smallcnv%O%s}} \
%{Zwin32:%{!Zcrtdll=*:%{!Zno-rte:clib%O%s}}%{Zcrtdll=*:reloc%O%s}}%{Zrsx32:clib%O%s}

*switches_need_spaces:


*signed_char:
%{funsigned-char:-D__CHAR_UNSIGNED__}

*predefines:
-D__32BIT__ -D__EMX__ -Di386  -Asystem(unix) -Asystem(emx) -Acpu(i386) -Amachine(i386)

*cross_compile:
0

*multilib:
st !Zmtd !Zmts !Zmt;mt Zmtd;mt Zmts;mt Zmt;

