--- gcc/config/svr4.h 2018/04/24 18:00:15 1.1.1.3 +++ gcc/config/svr4.h 2018/04/24 18:06:14 1.1.1.4 @@ -39,6 +39,9 @@ the Free Software Foundation, 675 Mass A appropriate define for the type of hardware that you are targeting. */ +/* Define a symbol indicating that we are using svr4.h. */ +#define USING_SVR4_H + /* For the sake of libgcc2.c, indicate target supports atexit. */ #define HAVE_ATEXIT @@ -193,10 +196,12 @@ the Free Software Foundation, 675 Mass A .ident string is patterned after the ones produced by native svr4 C compilers. */ +#define IDENT_ASM_OP ".ident" + #define ASM_FILE_END(FILE) \ do { \ - fprintf ((FILE), "\t.ident\t\"GCC: (GNU) %s\"\n", \ - version_string); \ + fprintf ((FILE), "\t%s\t\"GCC: (GNU) %s\"\n", \ + IDENT_ASM_OP, version_string); \ } while (0) /* Allow #sccs in preprocessor. */ @@ -206,7 +211,7 @@ do { \ /* Output #ident as a .ident. */ #define ASM_OUTPUT_IDENT(FILE, NAME) \ - fprintf (FILE, "\t.ident \"%s\"\n", NAME); + fprintf (FILE, "\t%s\t\"%s\"\n", IDENT_ASM_OP, NAME); /* Use periods rather than dollar signs in special g++ assembler names. */ @@ -220,6 +225,10 @@ do { \ #define TARGET_MEM_FUNCTIONS +/* Handle #pragma weak and #pragma pack. */ + +#define HANDLE_SYSV_PRAGMA + /* System V Release 4 uses DWARF debugging info. */ #define DWARF_DEBUGGING_INFO @@ -315,6 +324,28 @@ do { \ sprintf (LABEL, "*.%s%d", PREFIX, NUM); \ } while (0) +/* Output the label which preceeds a jumptable. Note that for all svr4 + systems where we actually generate jumptables (which is to say every + svr4 target except i386, where we use casesi instead) we put the jump- + tables into the .rodata section and since other stuff could have been + put into the .rodata section prior to any given jumptable, we have to + make sure that the location counter for the .rodata section gets pro- + perly re-aligned prior to the actual beginning of the jump table. */ + +#define ALIGN_ASM_OP ".align" + +#ifndef ASM_OUTPUT_BEFORE_CASE_LABEL +#define ASM_OUTPUT_BEFORE_CASE_LABEL(FILE,PREFIX,NUM,TABLE) \ + ASM_OUTPUT_ALIGN ((FILE), 2); +#endif + +#undef ASM_OUTPUT_CASE_LABEL +#define ASM_OUTPUT_CASE_LABEL(FILE,PREFIX,NUM,JUMPTABLE) \ + do { \ + ASM_OUTPUT_BEFORE_CASE_LABEL (FILE, PREFIX, NUM, JUMPTABLE) \ + ASM_OUTPUT_INTERNAL_LABEL (FILE, PREFIX, NUM); \ + } while (0) + /* The standard SVR4 assembler seems to require that certain builtin library routines (e.g. .udiv) be explicitly declared as .globl in each assembly file where they are referenced. */