--- gcc/config/mips/osfrose.h 2018/04/24 18:15:33 1.1.1.2 +++ gcc/config/mips/osfrose.h 2018/04/24 18:21:50 1.1.1.3 @@ -33,18 +33,19 @@ the Free Software Foundation, 675 Mass A -DOSF -DOSF1 -Dbsd4_2 -DMIPSEL -Dhost_mips -Dmips -Dunix -DR3000 -DSYSTYPE_BSD \ -Asystem(unix) -Asystem(xpg4) -Acpu(mips) -Amachine(mips)" -#define ASM_SPEC "\ +#define ASM_SPEC "\ %{mmips-as: \ - %{pipe:%e:-pipe not supported} \ - %{EL} %{!EL:-EL} \ - %{EB: %e-EB not supported} \ - %{!mrnames: %{!.s:-nocpp} %{.s: %{cpp} %{nocpp}}} \ - %{mips1} %{mips2} %{mips3} \ - %{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3} \ - %{g} %{g0} %{g1} %{g2} %{g3} \ - %{K} %{Q}} \ - %{v*: -v} \ - %{G*}" + %{!.s:-nocpp} %{.s: %{cpp} %{nocpp}} \ + %{pipe: %e-pipe is not supported.} \ + %{K}} \ +%{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} %{v} \ +%{noasmopt:-O0} \ +%{!noasmopt:%{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3}} \ +%{g} %{g0} %{g1} %{g2} %{g3} \ +%{ggdb:-g} %{ggdb0:-g0} %{ggdb1:-g1} %{ggdb2:-g2} %{ggdb3:-g3} \ +%{gstabs:-g} %{gstabs0:-g0} %{gstabs1:-g1} %{gstabs2:-g2} %{gstabs3:-g3} \ +%{gstabs+:-g} %{gstabs+0:-g0} %{gstabs+1:-g1} %{gstabs+2:-g2} %{gstabs+3:-g3} \ +%{gcoff:-g} %{gcoff0:-g0} %{gcoff1:-g1} %{gcoff2:-g2} %{gcoff3:-g3}" #ifndef CROSS_COMPILE #define ASM_FINAL_SPEC "\ @@ -76,15 +77,16 @@ the Free Software Foundation, 675 Mass A %{.cxx: -D__LANGUAGE_C_PLUS_PLUS__ -D__LANGUAGE_C_PLUS_PLUS} \ %{.C: -D__LANGUAGE_C_PLUS_PLUS__ -D__LANGUAGE_C_PLUS_PLUS} \ %{.m: -D__LANGUAGE_OBJECTIVE_C__ -D__LANGUAGE_OBJECTIVE_C} \ -%{!.S:%{!.s: -D__LANGUAGE_C__ -D__LANGUAGE_C %{!ansi:-DLANGUAGE_C}}}" +%{!.S:%{!.s: -D__LANGUAGE_C__ -D__LANGUAGE_C %{!ansi:-DLANGUAGE_C}}} \ +%{mlong64:-D__PTRDIFF_TYPE__=long\\ int} \ +%{!mlong64:-D__PTRDIFF_TYPE__=int} \ +%{mips3:-U__mips -D__mips=3}" +/* ??? This assumes that GNU as is always used with GNU ld, and MIPS as is + always used with MIPS ld. */ #define LINK_SPEC "\ -%{G*} \ -%{mmips-as: \ - %{EL} %{!EL: -EL} \ - %{EB: %e-EB not supported} \ - %{mips1} %{mips2} %{mips3} \ - %{bestGnum}} \ +%{G*} %{EL} %{EB} %{mips1} %{mips2} %{mips3} \ +%{bestGnum} \ %{!mmips-as: \ %{v*: -v} \ %{!noshrlib: %{pic-none: -noshrlib} %{!pic-none: -warn_nopic}} \ @@ -113,6 +115,7 @@ the Free Software Foundation, 675 Mass A /* Turn on -mpic-extern by default. */ #define CC1_SPEC "\ %{gline:%{!g:%{!g0:%{!g1:%{!g2: -g1}}}}} \ +%{mips1:-mfp32 -mgp32}%{mips2:-mfp32 -mgp32}%{mips3:-mfp64 -mgp64} \ %{G*} \ %{pic-none: -mno-half-pic} \ %{pic-lib: -mhalf-pic} \ @@ -121,11 +124,11 @@ the Free Software Foundation, 675 Mass A %{pic-names*: -mhalf-pic} \ %{!pic-*: -mhalf-pic}" -/* Specify size_t, ptrdiff_t, and wchar_t types. */ +/* Specify size_t and wchar_t types. */ #define SIZE_TYPE "long unsigned int" -#define PTRDIFF_TYPE "int" #define WCHAR_TYPE "unsigned int" #define WCHAR_TYPE_SIZE BITS_PER_WORD +#define MAX_WCHAR_TYPE_SIZE MAX_LONG_TYPE_SIZE /* OSF/1 uses gas, not the mips assembler. */ #define TARGET_DEFAULT MASK_GAS @@ -135,6 +138,8 @@ the Free Software Foundation, 675 Mass A /* enable dwarf debugging for testing */ #define DWARF_DEBUGGING_INFO +/* This is needed by dwarfout.c. */ +#define SET_ASM_OP ".set" /* Tell collect that the object format is OSF/rose. */ #define OBJECT_FORMAT_ROSE