+2000-02-16 Mark Elbrecht <snowball3@bigfoot.com>
+ * i386/xm-djgpp.h (LIBSTDCXX): Delete. Moved to config/i386/djgpp.h.
+ (XREF_FILE_NAME): Define.
+
+ * i386/djgpp.h (DATA_SECTION_ASM_OP): Define.
+ (EH_FRAME_SECTION_ASM_OP): Define.
+ (IDENT_ASM_OP): Define.
+ (TEXT_SECTION_ASM_OP): Define.
+ (CPP_SPEC): Define.
+ (CTORS_SECTION_ASM_OP): Define.
+ (CTOR_SECTION_FUNCTION): Use it.
+ (DTORS_SECTION_ASM_OP): Define.
+ (DTOR_SECTION_FUNCTION): Use it.
+
2000-02-16 Zack Weinberg <zack@wolery.cumb.org>
* reg-stack.c (emit_swap_insn): Do not put a new insn before a
/* Configuration for an i386 running MS-DOS with DJGPP.
- Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of GNU CC.
#undef BSS_SECTION_ASM_OP
#define BSS_SECTION_ASM_OP "\t.section\t.bss"
+/* Define the name of the .ctor section. */
+#undef CTORS_SECTION_ASM_OP
+#define CTORS_SECTION_ASM_OP "\t.section .ctor"
+
+/* Define the name of the .data section. */
+#undef DATA_SECTION_ASM_OP
+#define DATA_SECTION_ASM_OP "\t.section .data"
+
+/* Define the name of the .dtor section. */
+#undef DTORS_SECTION_ASM_OP
+#define DTORS_SECTION_ASM_OP "\t.section .dtor"
+
+/* Define the name of the .eh_frame section. */
+#undef EH_FRAME_SECTION_ASM_OP
+#define EH_FRAME_SECTION_ASM_OP "\t.section .eh_frame"
+
+/* Define the name of the .ident op. */
+#undef IDENT_ASM_OP
+#define IDENT_ASM_OP "\t.ident"
+
/* Enable alias attribute support. */
#ifndef SET_ASM_OP
#define SET_ASM_OP "\t.set"
#endif
+/* Define the name of the .text section. */
+#undef TEXT_SECTION_ASM_OP
+#define TEXT_SECTION_ASM_OP "\t.section .text"
+
/* Search for as.exe and ld.exe in DJGPP's binary directory. */
#define MD_EXEC_PREFIX "$DJDIR/bin/"
#define CPP_PREDEFINES "-Dunix -DGO32 -DDJGPP=2 -DMSDOS \
-Asystem(unix) -Asystem(msdos)"
+/* Include <sys/version.h> so __DJGPP__ and __DJGPP_MINOR__ are defined. */
+#undef CPP_SPEC
+#define CPP_SPEC "-remap %(cpp_cpu) %{posix:-D_POSIX_SOURCE} \
+ -imacros %s../include/sys/version.h"
++
/* We need to override link_command_spec in gcc.c so support -Tdjgpp.djl.
This cannot be done in LINK_SPECS as that LINK_SPECS is processed
before library search directories are known by the linker.
{ \
if (in_section != in_ctor) \
{ \
- fprintf (asm_out_file, "\t.section .ctor\n"); \
+ fprintf (asm_out_file, "%s\n", CTORS_SECTION_ASM_OP); \
in_section = in_ctor; \
} \
}
{ \
if (in_section != in_dtor) \
{ \
- fprintf (asm_out_file, "\t.section .dtor\n"); \
+ fprintf (asm_out_file, "%s\n", DTORS_SECTION_ASM_OP); \
in_section = in_dtor; \
} \
}
/* djgpp automatically calls its own version of __main, so don't define one
in libgcc, nor call one in main(). */
#define HAS_INIT_SECTION
+
+/* Definitions to set wchar_t type to 'unsigned short int' to help out
+ add-on Windows compilers for DJGPP. */
+#define WCHAR_UNSIGNED 1
+#define WCHAR_TYPE_SIZE 16
+#define WCHAR_TYPE "short unsigned int"
+
+/* Used to be defined in xm-djgpp.h, but moved here for cross-compilers. */
+#define LIBSTDCXX "-lstdcxx"
/* Configuration for GNU C-compiler for Intel 80386 running DJGPP.
- Copyright (C) 1988, 1996, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1988, 1996, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of GNU CC.
/* Allow test for DOS drive names. */
#define HAVE_DOS_BASED_FILE_SYSTEM
-#define LIBSTDCXX "-lstdcxx"
-
/* System dependant initialization for collect2
to tell system() to act like Unix. */
#define COLLECT2_HOST_INITIALIZATION \
do { __system_flags |= (__system_allow_multiple_cmds \
| __system_emulate_chdir); } while (0)
+/* Define a version appropriate for DOS. */
+#undef XREF_FILE_NAME
+#define XREF_FILE_NAME(xref_file, file) \
+ do { \
+ const char xref_ext[] = ".gxref"; \
+ strcpy (xref_file, file); \
+ s = basename (xref_file); \
+ t = strchr (s, '.'); \
+ if (t) \
+ strcpy (t, xref_ext); \
+ else \
+ strcat (xref_file, xref_ext); \
+ while (0)
+