--- gcc/config/i386/isc.h 2018/04/24 18:10:27 1.1 +++ gcc/config/i386/isc.h 2018/04/24 18:31:01 1.1.1.3 @@ -6,15 +6,20 @@ #undef STARTFILE_SPEC #define STARTFILE_SPEC \ "%{!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}} crtbegin.o%s" + %{Xp:%{pg:mcrtp1.o%s}%{!pg:%{p:mcrtp1.o%s}%{!p:crtp1.o%s}}}\ + %{!posix:%{!Xp:%{pg:mcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}\ + %{p:-L/lib/libp} %{pg:-L/lib/libp}}}}\ + %{shlib:%{Xp:crtp1.o%s}%{posix:crtp1.o%s}%{!posix:%{!Xp:crt1.o%s}}}\ + crtbegin.o%s" #define ENDFILE_SPEC "crtend.o%s crtn.o%s" /* Library spec */ #undef LIB_SPEC -#define LIB_SPEC "%{shlib:-lc_s} %{posix:-lcposix} -lc -lg" +#define LIB_SPEC "%{shlib:-lc_s} %{posix:-lcposix} %{Xp:-lcposix} -lc -lg" + +#undef CPP_SPEC +#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{Xp:-D_POSIX_SOURCE}" /* ISC 2.2 uses `char' for `wchar_t'. */ #undef WCHAR_TYPE @@ -31,7 +36,7 @@ structures. */ #undef RETURN_POPS_ARGS -#define RETURN_POPS_ARGS(FUNTYPE,SIZE) \ +#define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) \ (TREE_CODE (FUNTYPE) == IDENTIFIER_NODE ? 0 \ : (TARGET_RTD \ && (TYPE_ARG_TYPES (FUNTYPE) == 0 \ @@ -39,7 +44,7 @@ == void_type_node))) ? (SIZE) \ : 0) /* On other 386 systems, the last line looks like this: - : (aggregate_value_p (FUNTYPE)) ? GET_MODE_SIZE (Pmode) : 0) */ + : (aggregate_value_p (TREE_TYPE (FUNTYPE))) ? GET_MODE_SIZE (Pmode) : 0) */ #endif /* Handle #pragma pack and #pragma weak. */ @@ -55,3 +60,30 @@ #undef TARGET_DEFAULT #define TARGET_DEFAULT 0201 + +/* The ISC 2.0.2 software FPU emulator apparently can't handle + 80-bit XFmode insns, so don't generate them. */ +#undef LONG_DOUBLE_TYPE_SIZE +#define LONG_DOUBLE_TYPE_SIZE 64 + +/* The ISC assembler does not like a .file directive with a name + longer than 14 characters. Truncating it will not permit + debugging to work properly, but at least we won't get an error + message. */ + +#undef ASM_FILE_START +#define ASM_FILE_START(FILE) \ + do { \ + char c; \ + int max = 0; \ + char *string = dump_base_name; \ + \ + fputs ("\t.file\t\"", FILE); \ + \ + while ((c = *string++) != 0 && max++ < 14) { \ + if (c == '\"' || c == '\\') \ + putc ('\\', FILE); \ + putc (c, FILE); \ + } \ + fputs ("\"\n", FILE); \ + } while (0)