--- gcc/config/m88kdgux.h 2018/04/24 17:51:32 1.1.1.1 +++ gcc/config/m88kdgux.h 2018/04/24 18:04:09 1.1.1.3 @@ -27,10 +27,12 @@ the Free Software Foundation, 675 Mass A /* DWARF_DEBUGGING_INFO defined in svr4.h. */ #define SDB_DEBUGGING_INFO #define PREFERRED_DEBUGGING_TYPE \ - (VERSION_0300_SYNTAX ? DWARF_DEBUG : SDB_DEBUG) + (GET_VERSION_0300_SYNTAX ? DWARF_DEBUG : SDB_DEBUG) #ifndef NO_BUGS #define AS_BUG_IMMEDIATE_LABEL +/* The DG/UX 4.30 assembler doesn't accept the symbol `fcr63'. */ +#define AS_BUG_FLDCR #endif #include "svr4.h" @@ -58,6 +60,8 @@ the Free Software Foundation, 675 Mass A #define TARGET_DEFAULT (MASK_CHECK_ZERO_DIV | \ MASK_OCS_DEBUG_INFO | \ MASK_OCS_FRAME_POSITION) +#undef CPU_DEFAULT +#define CPU_DEFAULT MASK_88000 /* Macros to be automatically defined. __svr4__ is our extension. __CLASSIFY_TYPE__ is used in the and header @@ -68,17 +72,21 @@ the Free Software Foundation, 675 Mass A #define CPP_PREDEFINES "-Dm88000 -Dm88k -Dunix -DDGUX -D__CLASSIFY_TYPE__=2\ -D__svr4__ -Asystem(unix) -Acpu(m88k) -Amachine(m88k)" -/* If not -ansi, -traditional, or restricting include files to one - specific source target, specify full DG/UX features. */ +/* If -m88100 is in effect, add -Dm88100; similarly for -m88110. + Here, the CPU_DEFAULT is assumed to be -m88000. If not -ansi, + -traditional, or restricting include files to one specific source + target, specify full DG/UX features. */ #undef CPP_SPEC -#define CPP_SPEC "%{!ansi:%{!traditional:-D__OPEN_NAMESPACE__}}" +#define CPP_SPEC "%{!m88000:%{!m88100:%{m88110:-D__m88110__}}} \ + %{!m88000:%{!m88110:%{m88100:-D__m88100__}}} \ + %{!ansi:%{!traditional:-D__OPEN_NAMESPACE__}}" /* Assembler support (-V, silicon filter, legends for mxdb). */ #undef ASM_SPEC #define ASM_SPEC "\ %{V} %{v:%{!V:-V}} %{pipe: - %{msvr4:%{mversion-03.00:-KV3}}}\ %{!mlegend:%{mstandard:-Wc,off}}\ -%{mlegend:-Wc,-fix-bb,-h\"gcc-1.96.5\",-s\"%i\"\ +%{mlegend:-Wc,-fix-bb,-h\"gcc-2.2.14\",-s\"%i\"\ %{traditional:,-lc}%{!traditional:,-lansi-c}\ %{mstandard:,-keep-std}\ %{mkeep-coff:,-keep-coff}\ @@ -120,7 +128,11 @@ the Free Software Foundation, 675 Mass A /* DGUX V.4 isn't quite ELF--yet. */ #undef VERSION_0300_SYNTAX -#define VERSION_0300_SYNTAX (TARGET_SVR4 && TARGET_VERSION_0300) +#define VERSION_0300_SYNTAX (TARGET_SVR4 && m88k_version_0300) + +/* Same, but used before OVERRIDE_OPTIONS has been processed. */ +#define GET_VERSION_0300_SYNTAX \ + (TARGET_SVR4 && m88k_version != 0 && strcmp (m88k_version, "03.00") >= 0) /* Output the legend info for mxdb when debugging except if standard debugging information only is explicitly requested. */ @@ -128,7 +140,7 @@ the Free Software Foundation, 675 Mass A #define ASM_FIRST_LINE(FILE) \ do { \ if (VERSION_0300_SYNTAX) \ - fprintf (FILE, "%s\t \"03.00\"\n", VERSION_ASM_OP); \ + fprintf (FILE, "\t%s\t \"03.00\"\n", VERSION_ASM_OP); \ if (write_symbols != NO_DEBUG \ && ! (TARGET_STANDARD && ! TARGET_LEGEND)) \ { \ @@ -150,20 +162,20 @@ the Free Software Foundation, 675 Mass A #undef WCHAR_TYPE #undef WCHAR_TYPE_SIZE -/* Override svr4.h and m88k.h except when compling crtstuff.c. */ +/* Override svr4.h and m88k.h except when compiling crtstuff.c. */ #if !defined (CRT_BEGIN) && !defined (CRT_END) #if 0 /* The SVR4 init method doesn't yet work. */ #undef INIT_SECTION_ASM_OP #define INIT_SECTION_ASM_OP (VERSION_0300_SYNTAX \ - ? "\tsection\t .init,\"xa\"\n" \ - : "\tsection\t .init,\"x\"\n") + ? "section\t .init,\"xa\"" \ + : "section\t .init,\"x\"") #endif #undef CTORS_SECTION_ASM_OP #define CTORS_SECTION_ASM_OP (VERSION_0300_SYNTAX \ - ? "\tsection\t .ctors,\"aw\"\n" \ - : "\tsection\t .ctors,\"d\"\n") + ? "section\t .ctors,\"aw\"" \ + : "section\t .ctors,\"d\"") #undef DTORS_SECTION_ASM_OP #define DTORS_SECTION_ASM_OP (VERSION_0300_SYNTAX \ - ? "\tsection\t .dtors,\"aw\"\n" \ - : "\tsection\t .dtors,\"d\"\n") + ? "section\t .dtors,\"aw\"" \ + : "section\t .dtors,\"d\"") #endif /* crtstuff.c */