aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMark Elbrecht <snowball3@bigfoot.com>2000-02-17 04:39:11 +0000
committerJeff Law <law@gcc.gnu.org>2000-02-16 21:39:11 -0700
commit762f069d63c737ccda7d256ac16084793754003c (patch)
tree8b2bbbb949a13ec1f0c8e7688de6bb6d13280fac /gcc
parent3a6cc97884e151d67adaab2004505db3729a972c (diff)
downloadgcc-762f069d63c737ccda7d256ac16084793754003c.zip
gcc-762f069d63c737ccda7d256ac16084793754003c.tar.gz
gcc-762f069d63c737ccda7d256ac16084793754003c.tar.bz2
xm-djgpp.h (LIBSTDCXX): Delete.
* 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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog14
-rw-r--r--gcc/config/i386/djgpp.h44
-rw-r--r--gcc/config/i386/xm-djgpp.h18
3 files changed, 70 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3c559e1..3f9a34a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/config/i386/djgpp.h b/gcc/config/i386/djgpp.h
index 4801c5d..0969c26 100644
--- a/gcc/config/i386/djgpp.h
+++ b/gcc/config/i386/djgpp.h
@@ -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"
diff --git a/gcc/config/i386/xm-djgpp.h b/gcc/config/i386/xm-djgpp.h
index 9597ad5..c7f3f82 100644
--- a/gcc/config/i386/xm-djgpp.h
+++ b/gcc/config/i386/xm-djgpp.h
@@ -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)
+