X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Fconfig%2Fi386%2Fdjgpp.h;h=34a15facbf71328bc672164a0987e2ce0cbdb8aa;hb=0f7f01cfb1510f422a8b27e58bfed9e345116b32;hp=f5e79c2ba0fd68f62c0dabbe5a1309a42d132763;hpb=2cb4ac60aa91b7ddb31c57536cdcb167978c4a7f;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/config/i386/djgpp.h b/gcc/config/i386/djgpp.h index f5e79c2ba0f..34a15facbf7 100644 --- a/gcc/config/i386/djgpp.h +++ b/gcc/config/i386/djgpp.h @@ -1,40 +1,29 @@ /* Configuration for an i386 running MS-DOS with DJGPP. - Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2007, + 2010 Free Software Foundation, Inc. -This file is part of GNU CC. +This file is part of GCC. -GNU CC is free software; you can redistribute it and/or modify +GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) +the Free Software Foundation; either version 3, or (at your option) any later version. -GNU CC is distributed in the hope that it will be useful, +GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with GNU CC; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - -#include "dbxcoff.h" +along with GCC; see the file COPYING3. If not see +. */ /* Support generation of DWARF2 debugging info. */ -#define DWARF2_DEBUGGING_INFO +#define DWARF2_DEBUGGING_INFO 1 -/* Don't assume anything about the header files. */ +/* Don't assume anything about the header files. */ #define NO_IMPLICIT_EXTERN_C -#define HANDLE_SYSV_PRAGMA - -/* Enable parsing of #pragma pack(push,) and #pragma pack(pop). */ -#define HANDLE_PRAGMA_PACK_PUSH_POP 1 - -#define YES_UNDERSCORES - -#include "i386/gas.h" - /* If defined, a C expression whose value is a string containing the assembler operation to identify the following data as uninitialized global data. If not defined, and neither @@ -45,26 +34,14 @@ 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 .ident op. */ #undef IDENT_ASM_OP #define IDENT_ASM_OP "\t.ident\t" -/* Define the name of the .int op. */ -#undef INT_ASM_OP -#define INT_ASM_OP "\t.long\t" - /* Enable alias attribute support. */ #ifndef SET_ASM_OP #define SET_ASM_OP "\t.set\t" @@ -74,27 +51,15 @@ Boston, MA 02111-1307, USA. */ #undef TEXT_SECTION_ASM_OP #define TEXT_SECTION_ASM_OP "\t.section .text" -/* How to output an unaligned integer. */ -#undef UNALIGNED_INT_ASM_OP -#define UNALIGNED_INT_ASM_OP "\t.long\t" - -/* How to output an unaligned double length integer. */ -#undef UNALIGNED_DOUBLE_INT_ASM_OP -#define UNALIGNED_DOUBLE_INT_ASM_OP "\t.quad\t" - -/* How to output an unaligned half length intenger. */ -#undef UNALIGNED_SHORT_ASM_OP -#define UNALIGNED_SHORT_ASM_OP "\t.short\t" - -/* Define standard DJGPP installation paths. */ +/* Define standard DJGPP installation paths. */ /* We override default /usr or /usr/local part with /dev/env/DJDIR which */ -/* points to actual DJGPP instalation directory. */ +/* points to actual DJGPP installation directory. */ /* Standard include directory */ #undef STANDARD_INCLUDE_DIR #define STANDARD_INCLUDE_DIR "/dev/env/DJDIR/include/" -/* Search for as.exe and ld.exe in DJGPP's binary directory. */ +/* Search for as.exe and ld.exe in DJGPP's binary directory. */ #undef MD_EXEC_PREFIX #define MD_EXEC_PREFIX "/dev/env/DJDIR/bin/" @@ -107,13 +72,18 @@ Boston, MA 02111-1307, USA. */ (((NAME)[0] == '/') || ((NAME)[0] == '\\') || \ (((NAME)[0] >= 'A') && ((NAME)[0] <= 'z') && ((NAME)[1] == ':'))) -#undef CPP_PREDEFINES -#define CPP_PREDEFINES "-D__MSDOS__ -D__GO32__ -Asystem=msdos" +#define TARGET_OS_CPP_BUILTINS() \ + do \ + { \ + builtin_define_std ("MSDOS"); \ + builtin_define_std ("GO32"); \ + builtin_assert ("system=msdos"); \ + } \ + while (0) /* Include so __DJGPP__ and __DJGPP_MINOR__ are defined. */ #undef CPP_SPEC -#define CPP_SPEC "-remap %(cpp_cpu) %{posix:-D_POSIX_SOURCE} \ - %{!ansi:%{!std=c*:%{!std=i*:-DMSDOS}}} %{!ansi:%{!std=c*:%{!std=i*:-DGO32}}} \ +#define CPP_SPEC "-remap %{posix:-D_POSIX_SOURCE} \ -imacros %s../include/sys/version.h" /* We need to override link_command_spec in gcc.c so support -Tdjgpp.djl. @@ -126,12 +96,12 @@ Boston, MA 02111-1307, USA. */ #undef LINK_COMMAND_SPEC #define LINK_COMMAND_SPEC \ "%{!fsyntax-only: \ -%{!c:%{!M:%{!MM:%{!E:%{!S:%(linker) %l %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} \ -\t%{r} %{s} %{t} %{u*} %{x} %{z} %{Z}\ -\t%{!A:%{!nostdlib:%{!nostartfiles:%S}}}\ +%{!c:%{!M:%{!MM:%{!E:%{!S:%(linker) %l %X %{o*} %{e*} %{N} %{n} \ +\t%{r} %{s} %{t} %{u*} %{z} %{Z}\ +\t%{!nostdlib:%{!nostartfiles:%S}}\ \t%{static:} %{L*} %D %o\ \t%{!nostdlib:%{!nodefaultlibs:%G %L %G}}\ -\t%{!A:%{!nostdlib:%{!nostartfiles:%E}}}\ +\t%{!nostdlib:%{!nostartfiles:%E}}\ \t-Tdjgpp.djl %{T*}}}}}}}\n\ %{!c:%{!M:%{!MM:%{!E:%{!S:stubify %{v} %{o*:%*} %{!o*:a.out} }}}}}" @@ -147,64 +117,9 @@ Boston, MA 02111-1307, USA. */ unless user explicitly requests it. */ #undef LOCAL_INCLUDE_DIR -#undef EXTRA_SECTIONS -#define EXTRA_SECTIONS in_ctor, in_dtor - -#undef EXTRA_SECTION_FUNCTIONS -#define EXTRA_SECTION_FUNCTIONS \ - CTOR_SECTION_FUNCTION \ - DTOR_SECTION_FUNCTION - -#define CTOR_SECTION_FUNCTION \ -void \ -ctor_section () \ -{ \ - if (in_section != in_ctor) \ - { \ - fprintf (asm_out_file, "%s\n", CTORS_SECTION_ASM_OP); \ - in_section = in_ctor; \ - } \ -} - -#define DTOR_SECTION_FUNCTION \ -void \ -dtor_section () \ -{ \ - if (in_section != in_dtor) \ - { \ - fprintf (asm_out_file, "%s\n", DTORS_SECTION_ASM_OP); \ - in_section = in_dtor; \ - } \ -} - -#define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \ - do { \ - ctor_section (); \ - fputs (ASM_LONG, FILE); \ - assemble_name (FILE, NAME); \ - fprintf (FILE, "\n"); \ - } while (0) - /* Switch into a generic section. */ #define TARGET_ASM_NAMED_SECTION default_coff_asm_named_section -#define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \ - do { \ - dtor_section (); \ - fputs (ASM_LONG, FILE); \ - assemble_name (FILE, NAME); \ - fprintf (FILE, "\n"); \ - } while (0) - -/* Output at beginning of assembler file. */ -/* The .file command should always begin the output. */ - -#undef ASM_FILE_START -#define ASM_FILE_START(FILE) \ - do { \ - output_file_directive (FILE, main_input_filename); \ - } while (0) - /* This is how to output an assembler line that says to advance the location counter to a multiple of 2**LOG bytes. */ @@ -230,9 +145,6 @@ dtor_section () \ /* Definitions for types and sizes. Wide characters are 16-bits long so Win32 compiler add-ons will be wide character compatible. */ -#undef WCHAR_UNSIGNED -#define WCHAR_UNSIGNED 1 - #undef WCHAR_TYPE_SIZE #define WCHAR_TYPE_SIZE 16 @@ -249,26 +161,18 @@ dtor_section () \ #define PTRDIFF_TYPE "int" /* Used to be defined in xm-djgpp.h, but moved here for cross-compilers. */ -#define LIBSTDCXX "-lstdcxx" +#define LIBSTDCXX "stdcxx" -/* -mbnu210 is now ignored and obsolete. It was used to enable support for - weak symbols, and .gnu.linkonce support. */ -#undef MASK_BNU210 -#define MASK_BNU210 (0x40000000) - -#undef SUBTARGET_SWITCHES -#define SUBTARGET_SWITCHES \ - { "no-bnu210", -MASK_BNU210, "Ignored (obsolete)." }, \ - { "bnu210", MASK_BNU210, "Ignored (obsolete)." }, +#define TARGET_VERSION fprintf (stderr, " (80386, MS-DOS DJGPP)"); /* Warn that -mbnu210 is now obsolete. */ #undef SUBTARGET_OVERRIDE_OPTIONS #define SUBTARGET_OVERRIDE_OPTIONS \ do \ { \ - if (target_flags & MASK_BNU210) \ + if (TARGET_BNU210) \ { \ - warning ("-mbnu210 is ignored (option is obsolete)."); \ + warning (0, "-mbnu210 is ignored (option is obsolete)"); \ } \ } \ while (0) @@ -276,35 +180,3 @@ while (0) /* Support for C++ templates. */ #undef MAKE_DECL_ONE_ONLY #define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1) - -#undef UNIQUE_SECTION -#define UNIQUE_SECTION(DECL,RELOC) \ -do { \ - int len; \ - const char *name, *prefix; \ - char *string; \ - \ - 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)