xm-djgpp.h (LIBSTDCXX): Delete.
authorMark Elbrecht <snowball3@bigfoot.com>
Thu, 17 Feb 2000 04:39:11 +0000 (04:39 +0000)
committerJeff Law <law@gcc.gnu.org>
Thu, 17 Feb 2000 04:39:11 +0000 (21:39 -0700)
        * 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.

From-SVN: r32028

gcc/ChangeLog
gcc/config/i386/djgpp.h
gcc/config/i386/xm-djgpp.h

index 3c559e1d84325eb06b165b266ed19a1bdd7e46d6..3f9a34a84e1af03f910a0e76144d2c654feb0f0c 100644 (file)
@@ -1,3 +1,17 @@
+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
index 4801c5d8819be3d36ce7e3bc118413d7d5087e6c..0969c26f789d0c60b3eb346f542bbdc6c8e9a596 100644 (file)
@@ -1,5 +1,5 @@
 /* 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.
 
@@ -43,11 +43,35 @@ Boston, MA 02111-1307, USA.  */
 #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/"
 
@@ -60,6 +84,11 @@ Boston, MA 02111-1307, USA.  */
 #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.
@@ -105,7 +134,7 @@ ctor_section ()                                                     \
 {                                                              \
   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;                                    \
     }                                                          \
 }
@@ -116,7 +145,7 @@ dtor_section ()                                                     \
 {                                                              \
   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;                                    \
     }                                                          \
 }
@@ -168,3 +197,12 @@ dtor_section ()                                                    \
 /* 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"
index 9597ad5597351bc61d5c4f26bc6e07514e518c3e..c7f3f82dc9b4b1fb515c500db0eb208d7e8ebc8d 100644 (file)
@@ -1,5 +1,5 @@
 /* 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.
 
@@ -34,11 +34,23 @@ Boston, MA 02111-1307, USA.  */
 /* 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)
+