diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-05-01 16:50:49 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-05-01 16:50:49 +0000 |
commit | 8dd5a22432913264cd4477e1fb1cb5a85acb7463 (patch) | |
tree | b3f651a4cc30167aa9859d8cd00032a7496f5a5a /gcc/config/i386/djgpp.h | |
parent | 580f4a8a8aeaf8253a0e066ea5326c2086796e90 (diff) | |
download | gcc-8dd5a22432913264cd4477e1fb1cb5a85acb7463.tar.gz |
* config/i386/djgpp.h (INT_ASM_OP): Define.
(CPP_PREDEFINES): Rename MSDOS to __MSDOS__.
(ASM_WEAKEN_LABEL): Define.
(MASK_BNU210): Define.
(SUBTARGET_SWITCHES): Define.
(SUPPORTS_WEAK, SUPPORTS_ONE_ONLY): Define.
(MAKE_DECL_ONE_ONLY): Define.
(UNIQUE_SECTION_P, UNIQUE_SECTION): Define.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33570 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/i386/djgpp.h')
-rw-r--r-- | gcc/config/i386/djgpp.h | 69 |
1 files changed, 68 insertions, 1 deletions
diff --git a/gcc/config/i386/djgpp.h b/gcc/config/i386/djgpp.h index 23591c54784..86ebfbf4b30 100644 --- a/gcc/config/i386/djgpp.h +++ b/gcc/config/i386/djgpp.h @@ -63,6 +63,10 @@ Boston, MA 02111-1307, USA. */ #undef IDENT_ASM_OP #define IDENT_ASM_OP "\t.ident" +/* Define the name of the .int op. */ +#undef INT_ASM_OP +#define INT_ASM_OP "\t.long" + /* Enable alias attribute support. */ #ifndef SET_ASM_OP #define SET_ASM_OP "\t.set" @@ -81,7 +85,7 @@ Boston, MA 02111-1307, USA. */ (((NAME)[0] >= 'A') && ((NAME)[0] <= 'z') && ((NAME)[1] == ':'))) #undef CPP_PREDEFINES -#define CPP_PREDEFINES "-DGO32 -DDJGPP=2 -DMSDOS -Asystem(msdos)" +#define CPP_PREDEFINES "-DGO32 -DDJGPP=2 -D__MSDOS__ -Asystem(msdos)" /* Include <sys/version.h> so __DJGPP__ and __DJGPP_MINOR__ are defined. */ #undef CPP_SPEC @@ -193,6 +197,12 @@ dtor_section () \ #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ asm_output_aligned_bss ((FILE), (DECL), (NAME), (SIZE), (ALIGN)) +/* This is how to tell assembler that a symbol is weak */ +#undef ASM_WEAKEN_LABEL +#define ASM_WEAKEN_LABEL(FILE,NAME) \ + do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \ + fputc ('\n', FILE); } while (0) + /* djgpp automatically calls its own version of __main, so don't define one in libgcc, nor call one in main(). */ #define HAS_INIT_SECTION @@ -205,3 +215,60 @@ dtor_section () \ /* Used to be defined in xm-djgpp.h, but moved here for cross-compilers. */ #define LIBSTDCXX "-lstdcxx" + +/* Add command line option -mbnu210 to indicate we can use binutil 2.10's features. */ +#undef MASK_BNU210 +#define MASK_BNU210 (0x40000000) + +#undef SUBTARGET_SWITCHES +#define SUBTARGET_SWITCHES \ + { "bnu210", MASK_BNU210, "Enable weak symbol and enhanced C++ template support. Binutils 2.9.5.1 or higher required." }, \ + { "no-bnu210", -MASK_BNU210, "Disable weak symbol and enhanced C++ template support." }, + +/* Weak symbols and .gnu.linkonce are only in the binutils snapshots + and binutils-2.10. So do it only when -mbnu210 is specified. */ +#undef SUPPORTS_WEAK +#define SUPPORTS_WEAK (target_flags & MASK_BNU210) + +#undef SUPPORTS_ONE_ONLY +#define SUPPORTS_ONE_ONLY (target_flags & MASK_BNU210) + +/* Support for C++ templates. */ +#undef MAKE_DECL_ONE_ONLY +#define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1) + +/* Additional support for C++ templates and support for + garbage collection. */ +#undef UNIQUE_SECTION_P +#define UNIQUE_SECTION_P(DECL) (DECL_ONE_ONLY (DECL)) + +#undef UNIQUE_SECTION +#define UNIQUE_SECTION(DECL,RELOC) \ +do { \ + int len; \ + char *name, *string, *prefix; \ + \ + name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (DECL)); \ + \ + if (! DECL_ONE_ONLY (DECL)) \ + { \ + if (TREE_CODE (DECL) == FUNCTION_DECL) \ + prefix = ".text."; \ + else if (DECL_READONLY_SECTION (DECL, RELOC)) \ + prefix = ".rodata."; \ + else \ + prefix = ".data."; \ + } \ + else if (TREE_CODE (DECL) == FUNCTION_DECL) \ + prefix = ".gnu.linkonce.t."; \ + else if (DECL_READONLY_SECTION (DECL, RELOC)) \ + prefix = ".gnu.linkonce.r."; \ + else \ + prefix = ".gnu.linkonce.d."; \ + \ + len = strlen (name) + strlen (prefix); \ + string = alloca (len + 1); \ + sprintf (string, "%s%s", prefix, name); \ + \ + DECL_SECTION_NAME (DECL) = build_string (len, string); \ +} while (0) |