--- gcc/config/tm-apollo68.h 2018/04/24 16:53:27 1.1 +++ gcc/config/tm-apollo68.h 2018/04/24 17:00:15 1.1.1.4 @@ -58,14 +58,16 @@ the Free Software Foundation, 675 Mass A /* -m68881 is the default */ #define CPP_SPEC \ "%{!msoft-float:%{mfpa:-D__HAVE_FPA__ }%{!mfpa:-D__HAVE_68881__ }}\ -%{!ansi:%{m68000:-Dmc68010}%{mc68000:-Dmc68010}%{!mc68000:%{!m68000:-Dmc68020}}}" +%{!ansi:%{m68000:-Dmc68010 }%{mc68000:-Dmc68010 }%{!mc68000:%{!m68000:-Dmc68020 }}\ +%{!ansi:-D_APOLLO_SOURCE}}" #else /* -msoft-float is the default */ #define CPP_SPEC \ "%{m68881:-D__HAVE_68881__ }%{mfpa:-D__HAVE_FPA__ }\ -%{!ansi:%{m68000:-Dmc68010}%{mc68000:-Dmc68010}%{!mc68000:%{!m68000:-Dmc68020}}}" +%{!ansi:%{m68000:-Dmc68010 }%{mc68000:-Dmc68010 }%{!mc68000:%{!m68000:-Dmc68020 }}\ +%{!ansi:-D_APOLLO_SOURCE}}" #endif @@ -90,7 +92,8 @@ the Free Software Foundation, 675 Mass A /* -m68000 requires special flags to the assembler. The -C flag is passed to a modified GNU assembler to cause COFF - modules to be produced. Remove it if you're not using this. */ + modules to be produced. Remove it if you're not using this. + (See vasta@apollo.com.) */ #define ASM_SPEC \ "-C %{m68000:-mc68010}%{mc68000:-mc68010}%{!mc68000:%{!m68000:-mc68020}}" @@ -99,20 +102,17 @@ the Free Software Foundation, 675 Mass A Note that includes knowledge of the default specs for gcc, ie. no args translates to the same effect as -m68881 */ -#if TARGET_DEFAULT & 2 -/* -m68881 is the default */ -#define STARTFILE_SPEC \ - "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}" -#else -/* -msoft-float is the default */ -#define STARTFILE_SPEC \ - "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}" -#endif - -/* Specify library to handle `-a' basic block profiling. */ +/* To get ANSI-conformant behavior, a special version of crt0.o must be used. + We use the -ansi switch to pick up that version. */ -#define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p} \ -%{a:/usr/lib/bb_link.o} " +#define STARTFILE_SPEC \ + "%{ansi:/usr/apollo/lib/%{pg:gcrt0.o}%{!pg:%{p:mcrt0.o}%{!p:crt0.o}}}\ +%{!ansi:%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}" + +/* Make sure ld sets the entry point to _start. + This is in LIB_SPEC rather than LINK_SPEC because it needs to + come after _start is defined, and to eliminate the default LIB_SPEC. */ +#define LIB_SPEC "-e _start" /* Debugging is not supported yet */ @@ -137,16 +137,15 @@ the Free Software Foundation, 675 Mass A gen_rtx (PLUS, SImode, frame_pointer_rtx, \ gen_rtx (CONST_INT, VOIDmode, 8))) +/* Boundary (in *bits*) on which stack pointer should be aligned. */ +#undef STACK_BOUNDARY +#define STACK_BOUNDARY 32 + /* Specify how to pad function arguments. - Arguments sizes < sizeof(int) are padded upward, and larger arguments - are not padded at all. */ + Arguments are not padded at all; the stack is kept aligned on long + boundaries. */ -#define FUNCTION_ARG_PADDING(mode, size) \ - (((mode) == BLKmode \ - ? (GET_CODE (size) == CONST_INT \ - && INTVAL (size) < PARM_BOUNDARY / BITS_PER_UNIT) \ - : GET_MODE_BITSIZE (mode) < PARM_BOUNDARY) \ - ? upward : none) +#define FUNCTION_ARG_PADDING(mode, size) none /* Short integral argument prototype promotion is not done */