--- gcc/config/a29kunix.h 2018/04/24 17:51:34 1.1 +++ gcc/config/a29kunix.h 2018/04/24 18:04:51 1.1.1.3 @@ -36,11 +36,9 @@ the Free Software Foundation, 675 Mass A #undef CPP_SPEC #define CPP_SPEC "%{!m29000:-Dam29050 -D__am29050__}" +/* Use a default linker configuration file. */ #undef LINK_SPEC -#define LINK_SPEC "-c /usr/lib/default.ld" - -/* We can't say "-lgcc" due to a bug in gld for now. */ -#define LINK_LIBGCC_SPECIAL +#define LINK_SPEC "-T default.gld%s" /* For some systems, it is best if double-word objects are aligned on a doubleword boundary. We want to maintain compatibility with MetaWare in @@ -48,3 +46,39 @@ the Free Software Foundation, 675 Mass A #undef BIGGEST_ALIGNMENT #define BIGGEST_ALIGNMENT 64 + +/* Add shared data as a kludge for now. */ + +#undef ASM_FILE_START +#define ASM_FILE_START(FILE) \ +{ char *p, *after_dir = main_input_filename; \ + if (TARGET_29050) \ + fprintf (FILE, "\t.cputype 29050\n"); \ + for (p = main_input_filename; *p; p++) \ + if (*p == '/') \ + after_dir = p + 1; \ + fprintf (FILE, "\t.file \"%s\"\n", after_dir); \ + if (flag_shared_data) \ + fprintf (FILE, "\t.sect .shdata,data\n"); \ + fprintf (FILE, "\t.sect .lit,lit\n"); } + +/* Output before shared data. */ + +#define SHARED_SECTION_ASM_OP "\t.use .shdata" + +/* If we want shared data, we have to turn off commons. */ + +#define OVERRIDE_OPTIONS if (flag_shared_data) flag_no_common = 1; + +#if 0 /* This would be needed except that the 29k doesn't have strict + alignment requirements. */ + +#define FUNCTION_ARG_BOUNDARY(MODE, TYPE) \ + (((TYPE) != 0) \ + ? ((TYPE_ALIGN(TYPE) <= PARM_BOUNDARY) \ + ? PARM_BOUNDARY \ + : TYPE_ALIGN(TYPE)) \ + : ((GET_MODE_ALIGNMENT(MODE) <= PARM_BOUNDARY) \ + ? PARM_BOUNDARY \ + : GET_MODE_ALIGNMENT(MODE))) +#endif