--- gcc/config/i386isc.h 2018/04/24 17:51:38 1.1.1.1 +++ gcc/config/i386isc.h 2018/04/24 17:55:22 1.1.1.2 @@ -6,20 +6,24 @@ #include "i386v.h" -/* Use crt0.o or crt1.o as a startup file and crtn.o as a closing file. */ +/* Use crt1.o, not crt0.o, as a startup file, and crtn.o as a closing file. */ #undef STARTFILE_SPEC #define STARTFILE_SPEC \ - "%{!shlib:%{posix:%{pg:mcrtp1.o%s}%{!pg:%{p:mcrtp1.o%s}%{!p:crtp0.o%s}}}\ - %{!posix:%{pg:mcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}\ + "%{!shlib:%{posix:%{pg:mcrtp1.o%s}%{!pg:%{p:mcrtp1.o%s}%{!p:crtp1.o%s}}}\ + %{!posix:%{pg:mcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}\ %{p:-L/lib/libp} %{pg:-L/lib/libp}}}\ - %{shlib:%{posix:crtp1.o%s}%{!posix:crt1.o%s}} " - -#define ENDFILE_SPEC "crtn.o%s" + %{shlib:%{posix:crtp1.o%s}%{!posix:crt1.o%s}} crtbegin.o%s" + +#define ENDFILE_SPEC "crtend.o%s crtn.o%s" /* Library spec */ #undef LIB_SPEC -#define LIB_SPEC "%{posix:-lcposix} %{shlib:-lc_s} -lc" +#define LIB_SPEC "%{posix:-lcposix} %{shlib:-lc_s} -lc -lg" +#if 0 +/* This is apparently not true: ISC versions up to 3.0,at least, use + the standard calling sequence in which the called function pops the + extra arg. */ /* caller has to pop the extra argument passed to functions that return structures. */ @@ -33,4 +37,4 @@ : 0) /* On other 386 systems, the last line looks like this: : (aggregate_value_p (FUNTYPE)) ? GET_MODE_SIZE (Pmode) : 0) */ - +#endif