This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: SH3 G++ Problems/sh-wince-pe


"Keuchel, Rainer" wrote:
> 
> > But I assume you having looked at the patches from the
> > Cygnus/RedHat people, published in the 'gcc-patches' maillist, in early
> > 2000 ?  Or did you really start from scratch again ?
> 
> I did not look at these early patches. I assumed that most of this is
> integrated in 3.0. I tried the latest 2.9 and it did not even configure...

 The patches I have from February-2000, are not complete, but the funny thing
is that I didn't notice that when building the 'SH' and 'MIPS' target GCCs...
The '*-wince-pe' target names didn't fit to the 'sh-*-wince*' etc. templates
in my 'gcc/configure' and probably the 'sh-*-*' and the 'mips-*-*' were selected.
So after the early-2000 build I have had quite plain-COFF target GCCs for the
SH and MIPS WinCE's...

 The 'gcc/config/pe.c' and 'gcc/config/pe.h' files were missing and I couldn't
find them anywhere when trying the 'sh-wince-pe' target again... I checked the
FSF and all the GNUPro-sources I have (99r1, EDK, XScale-010413) and nothing...
  
> Is there any place where I can get the old wince toolchains as binaries,
> say for cygwin or x86-linux? I did not find anything with Google.

 Don't know, but one place where to start could be the 'PocketLinux'-sites, ie.
those handling 'Linux for iPAQ' (the Compaq ARM-based PDA) etc. Starting with
'www.linux.org' and browsing the 'Projects'...
 
> Which gcc-2.9 should I try to configure for wince-pe targets?

 The XScale-2.9 distribution sources at:

   http://developer.intel.com/design/intelxscale/dev_tools/010827/

could be recommended... Perhaps the other WinCE's have now some support there,
the '010413' GNUPro-sources didn't have...

> Does it support C++ (with exceptions and libstdc++)? The main reason I
> want g++ is that the ms compiler does not support exceptions and
> other c++ standards. I would like to port some progs that need this.

 It seems that the building of 'libstdc++' has been disabled in the Cygnus
patches... The patches have been attached here for all interested...

Cheers, Kai
Add support for WinCE targeted toolchains

   * To: gcc-patches at gcc dot gnu dot org
   * Subject: Add support for WinCE targeted toolchains
   * From: Nick Clifton <nickc at cygnus dot com>
   * Date: Tue, 22 Feb 2000 18:01:36 -0800

----------------------------------------------------------------------------

Hi Guys,

  I would like permission to apply the following patch.  It adds
  support for targets which work in Microsoft's WinCE execution
  envrionment.  Specificially it adds support for the targets:

                sh-pe
                mips-pe
                arm-wince-pe

  (The reason that the ARM port specifies wince is that there is
  already an arm-pe target, and this produces PE code that is
  incompatible with the PE code used in WinCE).

Cheers
        Nick

2000-02-22  Nick Clifton  <nickc@cygnus.com> DJ Delorie  <dj@cygnus.com>

        * configure.in: Add arm-wince-pe, mips-pe and sh-pe targets.
        * configure: Regenerate.

        * config/sh/sh.h: Add support for sh-pe target.
        * config/sh/sh.c: Add support for sh-pe target.
        (sh_valid_machine_type_attribute): New function.
        (sh_merge_machine_decl_attribute): New function.

        * config/sh/sh-protos.h: Add prototypes for new functions in
        sh.c.
        * config/sh/sh-pe.h: New file.
        * config/sh/t-shpe: New file.

        * config/mips/mips.h: Add support for mips-pe target.
        * config/mips/mips.c: Add support for mips-pe target.
        (mips_valid_decl_attribute_p): New function.
        (mips_valid_type_attribute_p): New function.
        (mips_merge_decl_attributes): New function.

        * config/mips/mips-protos.h: Add prototypes for new functions
        defined in mips.c.
        * config/mips/mips-pe.h: New file.
        * config/mips/t-mipspe: New file.

        * config/arm/arm-wince-pe.h: New file.

Index: configure.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/configure.in,v
retrieving revision 1.338
diff -p -r1.338 configure.in
*** configure.in        2000/02/22 08:40:13     1.338
--- configure.in        2000/02/23 01:44:25
*************** changequote([,])dnl
*** 832,837 ****
--- 832,842 ----
                tm_file=arm/unknown-elf-oabi.h
                tmake_file=arm/t-arm-elf
                ;;
+       *arm-wince-pe)
+               tm_file="arm/arm-wince-pe.h"
+               tmake_file="arm/t-pe"
+               extra_objs=pe.o
+               ;;
        arm-*-pe*)
                tm_file=arm/pe.h
                tmake_file=arm/t-pe
*************** changequote([,])dnl
*** 2844,2849 ****
--- 2849,2860 ----
                tm_file="mips/r3900.h mips/elf.h mips/abi64.h"
                tmake_file=mips/t-r3900
                ;;
+       mips*-*-pe)
+               tm_file="mips/mips-pe.h"
+               tmake_file="mips/t-mipspe"
+               extra_objs=pe.o
+               with_newlib=yes # hack - no other way to avoid <stdio.h>
+               ;;
        mips-*-*)                               # Default MIPS RISC-OS 4.0.
                if test x$stabs = xyes; then
                        tm_file="${tm_file} dbx.h"
*************** changequote([,])dnl
*** 3218,3223 ****
--- 3229,3240 ----
        sh-*-rtems*)
                tmake_file="sh/t-sh t-rtems"
                tm_file=sh/rtems.h
+               float_format=sh
+               ;;
+       sh-*-pe*)
+               tm_file=sh/sh-pe.h
+               tmake_file=sh/t-shpe
+               extra_objs=pe.o
                float_format=sh
                ;;
        sh-*-*)

Index: configure
===================================================================
RCS file: /cvs/gcc/egcs/gcc/configure,v
retrieving revision 1.334
diff -p -r1.334 configure
*** configure   2000/02/22 08:40:13     1.334
--- configure   2000/02/23 01:44:25
*************** for machine in $build $host $target; do
*** 3568,3573 ****
--- 3568,3578 ----
                tm_file=arm/unknown-elf-oabi.h
                tmake_file=arm/t-arm-elf
                ;;
+       *arm-wince-pe)
+               tm_file="arm/arm-wince-pe.h"
+               tmake_file="arm/t-pe"
+               extra_objs=pe.o
+               ;;
        arm-*-pe*)
                tm_file=arm/pe.h
                tmake_file=arm/t-pe
*************** for machine in $build $host $target; do
*** 5460,5465 ****
--- 5465,5476 ----
                tm_file="mips/r3900.h mips/elf.h mips/abi64.h"
                tmake_file=mips/t-r3900
                ;;
+       mips*-*-pe)
+               tm_file="mips/mips-pe.h"
+               tmake_file="mips/t-mipspe"
+               extra_objs=pe.o
+               with_newlib=yes # hack - no other way to avoid <stdio.h>
+               ;;
        mips-*-*)                               # Default MIPS RISC-OS 4.0.
                if test x$stabs = xyes; then
                        tm_file="${tm_file} dbx.h"
*************** for machine in $build $host $target; do
*** 5824,5829 ****
--- 5835,5846 ----
        sh-*-rtems*)
                tmake_file="sh/t-sh t-rtems"
                tm_file=sh/rtems.h
+               float_format=sh
+               ;;
+       sh-*-pe*)
+               tm_file=sh/sh-pe.h
+               tmake_file=sh/t-shpe
+               extra_objs=pe.o
                float_format=sh
                ;;
        sh-*-*)

Index: config/sh/sh.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/sh/sh.h,v
retrieving revision 1.50
diff -p -r1.50 sh.h
*** sh.h        2000/02/16 03:23:40     1.50
--- sh.h        2000/02/23 01:44:25
*************** extern int code_for_indirect_jump_scratc
*** 38,43 ****
--- 37,52 ----

  #define SDB_DELIM ";"

+ /* DLL_ATTR Stubs for non-PE platforms */
+
+ #ifndef DLL_ATTR_P
+ #define DLL_ATTR_ENCODE(DECL)
+ #define DLL_ATTR_DECLARE_OBJECT_NAME(STREAM, NAME, DECL)
+ #define DLL_ATTR_DECLARE_FUNCTION_NAME(STREAM, NAME, DECL)
+ #define DLL_ATTR_EXTRA_SECTIONS
+ #define DLL_ATTR_EXTRA_SECTION_FUNCTIONS
+ #endif
+
  #define CPP_SPEC "%{ml:-D__LITTLE_ENDIAN__} \
  %{m1:-D__sh1__} \
  %{m2:-D__sh2__} \
*************** extern int code_for_indirect_jump_scratc
*** 46,54 ****
  %{m4-single-only:-D__SH4_SINGLE_ONLY__} \
  %{m4-single:-D__SH4_SINGLE__} \
  %{m4:-D__SH4__} \
  %{!m1:%{!m2:%{!m3:%{!m3e:%{!m4:%{!m4-single:%{!m4-single-only:-D__sh1__}}}}}}} \
! %{mhitachi:-D__HITACHI__}"

  #define CPP_PREDEFINES "-D__sh__ -Acpu(sh) -Amachine(sh)"

  #define ASM_SPEC  "%{ml:-little} %{mrelax:-relax}"
--- 55,89 ----
  %{m4-single-only:-D__SH4_SINGLE_ONLY__} \
  %{m4-single:-D__SH4_SINGLE__} \
  %{m4:-D__SH4__} \
+ %{mhitachi:-D__HITACHI__} \
+ %(subtarget_cpp_spec) "
+
+ /* SUBTARGET_CPP_SPEC is passed to the preprocessor.  It may be
+    overridden by subtargets.  */
+ #ifndef SUBTARGET_CPP_SPEC
+ #define SUBTARGET_CPP_SPEC "\
  %{!m1:%{!m2:%{!m3:%{!m3e:%{!m4:%{!m4-single:%{!m4-single-only:-D__sh1__}}}}}}} \
! "
! #endif

+ /* This macro defines names of additional specifications to put in the specs
+    that can be used in various specifications like CC1_SPEC.  Its definition
+    is an initializer with a subgrouping for each command option.
+
+    Each subgrouping contains a string constant, that defines the
+    specification name, and a string constant that used by the GNU CC driver
+    program.
+
+    Do not define this macro if it does not need to do anything.  */
+
+ #define EXTRA_SPECS                                                   \
+   { "subtarget_cpp_spec", SUBTARGET_CPP_SPEC },                               \
+   SUBTARGET_EXTRA_SPECS
+
+ #ifndef SUBTARGET_EXTRA_SPECS
+ #define SUBTARGET_EXTRA_SPECS
+ #endif
+
  #define CPP_PREDEFINES "-D__sh__ -Acpu(sh) -Amachine(sh)"

  #define ASM_SPEC  "%{ml:-little} %{mrelax:-relax}"
*************** extern int current_function_anonymous_ar
*** 1742,1754 ****
  #define SET_ASM_OP            ".set"

  /* How to change between sections.  */

  #define TEXT_SECTION_ASM_OP           "\t.text"
  #define DATA_SECTION_ASM_OP           "\t.data"
  #define CTORS_SECTION_ASM_OP          "\t.section\t.ctors\n"
  #define DTORS_SECTION_ASM_OP          "\t.section\t.dtors\n"
! #define EXTRA_SECTIONS                        in_ctors, in_dtors
  #define EXTRA_SECTION_FUNCTIONS                                       \
  void                                                          \
  ctors_section()                                                       \
  {                                                             \
--- 1777,1792 ----
  #define SET_ASM_OP            ".set"

  /* How to change between sections.  */
+ extern void ctors_section ();
+ extern void dtors_section ();

  #define TEXT_SECTION_ASM_OP           "\t.text"
  #define DATA_SECTION_ASM_OP           "\t.data"
  #define CTORS_SECTION_ASM_OP          "\t.section\t.ctors\n"
  #define DTORS_SECTION_ASM_OP          "\t.section\t.dtors\n"
! #define EXTRA_SECTIONS in_ctors, in_dtors DLL_ATTR_EXTRA_SECTIONS
  #define EXTRA_SECTION_FUNCTIONS                                       \
+ DLL_ATTR_EXTRA_SECTION_FUNCTIONS                              \
  void                                                          \
  ctors_section()                                                       \
  {                                                             \
*************** extern char fp_reg_names[][5];
*** 1894,1901 ****
      fprintf ((FILE), "\t.align %d\n", (LOG))

  /* Output a function label definition.  */
! #define ASM_DECLARE_FUNCTION_NAME(STREAM,NAME,DECL) \
!     ASM_OUTPUT_LABEL((STREAM), (NAME))

  /* Output a globalising directive for a label.  */
  #define ASM_GLOBALIZE_LABEL(STREAM,NAME)      \
--- 1932,1944 ----
      fprintf ((FILE), "\t.align %d\n", (LOG))

  /* Output a function label definition.  */
! #define ASM_DECLARE_FUNCTION_NAME(STREAM, NAME, DECL)         \
!   do                                                          \
!     {                                                         \
!       ASM_OUTPUT_LABEL((STREAM), (NAME));                     \
!       DLL_ATTR_DECLARE_FUNCTION_NAME (STREAM, NAME, DECL);    \
!     }                                                         \
!   while (0)

  /* Output a globalising directive for a label.  */
  #define ASM_GLOBALIZE_LABEL(STREAM,NAME)      \

Index: config/sh/sh.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/sh/sh.c,v
retrieving revision 1.42
diff -p -r1.42 sh.c
*** sh.c        2000/02/16 03:23:40     1.42
--- sh.c        2000/02/23 01:44:26
*************** static void pop PARAMS ((int));
*** 149,154 ****
--- 149,156 ----
  static void push_regs PARAMS ((int, int));
  static int calc_live_regs PARAMS ((int *, int *));
  static void mark_use PARAMS ((rtx, rtx *));
+ static void gen_far_branch PARAMS ((struct far_branch *));
+ static rtx get_free_reg PARAMS ((HARD_REG_SET));

  /* Print the operand address in x to the stream.  */

*************** struct far_branch
*** 2625,2632 ****
    int address;
  };

- static void gen_far_branch PARAMS ((struct far_branch *));
  enum mdep_reorg_phase_e mdep_reorg_phase;
  void
  gen_far_branch (bp)
       struct far_branch *bp;
--- 2627,2634 ----
    int address;
  };

  enum mdep_reorg_phase_e mdep_reorg_phase;
+
  void
  gen_far_branch (bp)
       struct far_branch *bp;
*************** sh_valid_machine_decl_attribute (decl, a
*** 4348,4353 ****
--- 4350,4366 ----
       tree attr;
       tree args;
  {
+ #ifdef DLL_ATTR_P
+   if (args == NULL_TREE)
+     {
+       if (is_attribute_p ("dllexport", attr))
+       return 1;
+
+       if (is_attribute_p ("dllimport", attr))
+       return 1;
+     }
+ #endif
+
    if (TREE_CODE (decl) != FUNCTION_DECL)
      return 0;

*************** sh_valid_machine_decl_attribute (decl, a
*** 4396,4401 ****
--- 4409,4488 ----
    return 0;
  }

+ #ifdef DLL_ATTR_P
+ /* Return nonzero if IDENTIFIER with arguments ARGS is a valid machine specific
+    attribute for TYPE.  The attributes in ATTRIBUTES have previously been
+    assigned to TYPE.  */
+ int
+ sh_valid_machine_type_attribute (type, attributes, attr, args)
+      tree type;
+      tree attributes;
+      tree attr;
+      tree args;
+ {
+   if (args == NULL_TREE
+       && (TREE_CODE (type) == RECORD_TYPE || TREE_CODE (type) == UNION_TYPE))
+     {
+       if (is_attribute_p ("dllexport", attr))
+       return 1;
+       if (is_attribute_p ("dllimport", attr))
+       return 1;
+     }
+   return 0;
+ }
+
+ /* Merge attributes in decls OLD and NEW.
+
+    This handles the following situation:
+
+    __declspec (dllimport) int foo;
+    int foo;
+
+    The second instance of `foo' nullifies the dllimport.  */
+ tree
+ sh_merge_machine_decl_attributes (old, new)
+      tree old, new;
+ {
+   tree a;
+   int delete_dllimport_p;
+
+   old = DECL_MACHINE_ATTRIBUTES (old);
+   new = DECL_MACHINE_ATTRIBUTES (new);
+
+   /* What we need to do here is remove from `old' dllimport if it doesn't
+      appear in `new'.  dllimport behaves like extern: if a declaration is
+      marked dllimport and a definition appears later, then the object
+      is not dllimport'd.  */
+
+   if (lookup_attribute ("dllimport", old) != NULL_TREE
+       && lookup_attribute ("dllimport", new) == NULL_TREE)
+     delete_dllimport_p = 1;
+   else
+     delete_dllimport_p = 0;
+
+   a = merge_attributes (old, new);
+
+   if (delete_dllimport_p)
+     {
+       tree prev,t;
+
+       /* Scan the list for dllimport and delete it.  */
+       for (prev = NULL_TREE, t = a; t; prev = t, t = TREE_CHAIN (t))
+       {
+         if (is_attribute_p ("dllimport", TREE_PURPOSE (t)))
+           {
+             if (prev == NULL_TREE)
+               a = TREE_CHAIN (a);
+             else
+               TREE_CHAIN (prev) = TREE_CHAIN (t);
+             break;
+           }
+       }
+     }
+
+   return a;
+ }
+ #endif /* DLL_ATTR_P */

  /* Predicates used by the templates.  */

*************** mark_use (x, reg_set_block)
*** 4993,5000 ****
      }
  }

- static rtx get_free_reg PARAMS ((HARD_REG_SET));
-
  /* This function returns a register to use to load the address to load
     the fpscr from.  Currently it always returns r1 or r7, but when we are
     able to use pseudo registers after combine, or have a better mechanism
--- 5080,5085 ----

Index: config/sh/sh-protos.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/sh/sh-protos.h,v
retrieving revision 1.2
diff -p -r1.2 sh-protos.h
*** sh-protos.h 2000/02/15 22:34:33     1.2
--- sh-protos.h 2000/02/23 01:47:58
*************** extern rtx sh_va_arg PARAMS ((tree, tree
*** 97,103 ****
--- 97,105 ----
  #ifdef TREE_CODE
  extern void sh_pragma_insert_attributes PARAMS ((tree, tree *, tree *));
  extern int sh_valid_machine_decl_attribute PARAMS ((tree, tree, tree, tree));
+ extern int sh_valid_machine_type_attribute PARAMS ((tree, tree, tree, tree));
  extern tree sh_build_va_list PARAMS ((void));
+ extern tree sh_merge_machine_decl_attributes PARAMS ((tree, tree));
  #endif /* TREE_CODE */

  extern const char *output_jump_label_table PARAMS ((void));

Index: config/sh/sh-pe.h
===================================================================
RCS file: sh-pe.h
diff -N sh-pe.h
*** /dev/null   Tue May  5 13:32:27 1998
--- sh-pe.h     Tue Feb 22 17:44:26 2000
***************
*** 0 ****
--- 1,140 ----
+ /* SH PE object file format target machined macro definitions.
+    Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+    See ChangeLog for contributers.
+
+ This file is part of GNU CC.
+
+ GNU CC 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)
+ any later version.
+
+ GNU CC 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.  */
+
+ /* Switch to SECTION (an `enum in_section').
+
+    This has to be customized for each section in the targets
+    enum in_section.
+
+    ???
+    The problem is that we want to temporarily switch sections in
+    ASM_DECLARE_OBJECT_NAME and then switch back to the original section
+    afterwards.
+    Elf supports assembler directives for pushing and popping sections.
+    Standard elf supports popping one section, via the .previous directive.
+    We could add something similar to the coff/pe assembler support.  This
+    would avoid the need for the switch_to_section function.  The fact that
+    this is an assembler feature for ELF is one reason why the compiler
+    doesn't have it.
+ */
+ extern void           switch_to_section ();
+ #define SWITCH_TO_SECTION_FUNCTION                            \
+ void                                                          \
+ switch_to_section (section, decl)                             \
+      enum in_section section;                                         \
+      tree decl;                                               \
+ {                                                             \
+   switch (section)                                            \
+     {                                                                 \
+       case in_text: text_section (); break;                   \
+       case in_data: data_section (); break;                   \
+       case in_named: named_section (decl, NULL, 0); break;    \
+       case in_ctors: ctors_section (); break;                         \
+       case in_dtors: dtors_section (); break;                         \
+       case in_drectve: drectve_section (); break;             \
+       default: abort (); break;                               \
+     }                                                                 \
+ }
+
+ /* If defined, a C expression whose value is nonzero if IDENTIFIER with
+    arguments ARGS is a valid machine specific attribute for TYPE.
+    The attributes in ATTRIBUTES have previously been assigned to TYPE. */
+ #define VALID_MACHINE_TYPE_ATTRIBUTE(TYPE, ATTRIBUTES, IDENTIFIER, ARGS) \
+ sh_valid_machine_type_attribute (TYPE, ATTRIBUTES, IDENTIFIER, ARGS)
+
+ /* Define this macro if the merging of decl attributes needs special handling.
+    If defined, the result is a list of the combined DECL_MACHINE_ATTRIBUTES of
+    OLDDECL and NEWDECL.  NEWDECL is a duplicate declaration
+    of OLDDECL.  Examples of when this is needed are when one attribute
+    overrides another, or when an attribute is nullified by a subsequent
+    definition. */
+ #define MERGE_MACHINE_DECL_ATTRIBUTES(OLDDECL, NEWDECL) \
+ sh_merge_machine_decl_attributes (OLDDECL, NEWDECL)
+
+ /* Define this macro if references to a symbol must be treated
+    differently depending on something about the variable or
+    function named by the symbol (such as what section it is in). */
+ #define ENCODE_SECTION_INFO(DECL) DLL_ATTR_ENCODE (DECL)
+
+ /* A C statement (sans semicolon) to output to the stdio stream
+    STREAM any text necessary for declaring the name NAME of an
+    initialized variable which is being defined.  This macro must
+    output the label definition (perhaps using `ASM_OUTPUT_LABEL').
+    The argument DECL is the `VAR_DECL' tree node representing the
+    variable.
+
+    If this macro is not defined, then the variable name is defined
+    in the usual manner as a label (by means of `ASM_OUTPUT_LABEL').  */
+ #define ASM_DECLARE_OBJECT_NAME(STREAM, NAME, DECL)                   \
+ do                                                                    \
+  {                                                                    \
+    DLL_ATTR_DECLARE_OBJECT_NAME (STREAM, NAME, DECL);                 \
+    ASM_OUTPUT_LABEL (STREAM, NAME);                                   \
+  }                                                                    \
+ while (0)
+
+ /* MS docs say that stack space must be allocated by the caller for
+    the callee to use to save R4..R7 in */
+ #define REG_PARM_STACK_SPACE(FNDECL) 16
+ #define OUTGOING_REG_PARM_STACK_SPACE
+
+ #define PE_SUBTARGET_CPP_SPEC " \
+ %{!m1:%{!m2:%{!m3e:%{!m4:%{!m4-single:%{!m4-single-only:%{!m3:-D__sh3__} -D_SH3_%{!-ansi: -DSH3}}}}}}} \
+ %{!-ansi:-DSHx} -Acpu(sh) -Amachine(sh) \
+ "
+
+
+ #include "pe.h"
+ #include "sh/sh.h"
+
+ #undef  TARGET_DEFAULT
+ #define TARGET_DEFAULT        (LITTLE_ENDIAN_BIT | SH3_BIT | SH2_BIT)
+
+ /* Don't assume anything about the header files. */
+ #define NO_IMPLICIT_EXTERN_C
+
+
+ #undef CPP_PREDEFINES
+ #define CPP_PREDEFINES ""
+
+ #undef STARTFILE_SPEC
+ #define STARTFILE_SPEC ""
+
+ #undef LINK_SPEC
+ #define LINK_SPEC "%{mshared:-shared -e _DllMainCRTStartup} \
+                  %{mdll:--dll -e _DllMainCRTStartup}"
+
+ /* A C statement (sans semicolon) to output to the stdio stream
+    STREAM the assembler definition of a common-label named
+    NAME whose size is SIZE bytes.  The variable ROUNDED
+    is the size rounded up to whatever alignment the caller wants. */
+ #undef ASM_OUTPUT_COMMON
+ #define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED)                  \
+   DLL_ATTR_OUTPUT_COMMON (FILE, NAME, SIZE, ROUNDED)
+
+ /* DLL_ATTR_OUTPUT_COMMON uses this to output the name if necessary.
+    In general it should be the same as ASM_OUTPUT_COMMON.  */
+ #define TARGET_DLL_ATTR_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED)      \
+ ( fputs ("\t.comm ", (FILE)),                 \
+   assemble_name ((FILE), (NAME)),             \
+   fprintf ((FILE), ",%d\n", (SIZE)))
+
+

Index: config/sh/t-shpe
===================================================================
RCS file: t-shpe
diff -N t-shpe
*** /dev/null   Tue May  5 13:32:27 1998
--- t-shpe      Tue Feb 22 17:44:26 2000
***************
*** 0 ****
--- 1,40 ----
+ # Include the PE specific stuff
+ pe.o: $(srcdir)/config/pe.c $(CONFIG_H) $(TREE_H) $(RTL_H) system.h
+       $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
+
+ CROSS_LIBGCC1 = libgcc1-asm.a
+ LIB1ASMSRC = sh/lib1funcs.asm
+ LIB1ASMFUNCS = _ashiftrt _ashiftrt_n _ashiftlt _lshiftrt _movstr \
+   _movstr_i4 _mulsi3 _sdivsi3 _sdivsi3_i4 _udivsi3 _udivsi3_i4 _set_fpscr
+
+ # We want fine grained libraries, so use the new code to build the
+ # floating point emulation libraries.
+ FPBIT = fp-bit.c
+ DPBIT = dp-bit.c
+
+ dp-bit.c: $(srcdir)/config/fp-bit.c
+       echo '#ifdef __LITTLE_ENDIAN__' > dp-bit.c
+       echo '#define FLOAT_BIT_ORDER_MISMATCH' >>dp-bit.c
+       echo '#endif'           >> dp-bit.c
+       cat $(srcdir)/config/fp-bit.c >> dp-bit.c
+
+ fp-bit.c: $(srcdir)/config/fp-bit.c
+       echo '#define FLOAT' > fp-bit.c
+       echo '#ifdef __LITTLE_ENDIAN__' >> fp-bit.c
+       echo '#define FLOAT_BIT_ORDER_MISMATCH' >>fp-bit.c
+       echo '#endif'           >> fp-bit.c
+       cat $(srcdir)/config/fp-bit.c >> fp-bit.c
+
+ MULTILIB_OPTIONS=
+ MULTILIB_DIRNAMES=
+ MULTILIB_MATCHES=
+
+ # Use MS Windows' header files
+ USER_H = $(srcdir)/ginclude/stddef.h $(EXTRA_HEADERS) $(LANG_EXTRA_HEADERS)
+ INSTALL_HEADERS_DIR =
+ INSTALL_ASSERT_H =
+
+ TARGET_LIBGCC2_CFLAGS = -Dinhibit_libc
+
+ # LIBGCC = stmp-multilib
+ # INSTALL_LIBGCC = install-multilib

Index: config/mips/mips.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/mips/mips.h,v
retrieving revision 1.88
diff -p -r1.88 mips.h
*** mips.h      2000/02/21 20:48:23     1.88
--- mips.h      2000/02/23 01:44:26
*************** extern void             sbss_section PARAMS ((void)
*** 178,183 ****
--- 178,192 ----
  #define HALF_PIC_FINISH(STREAM)
  #endif

+ /* DLL_ATTR Stubs for non-PE platforms */
+
+ #ifndef DLL_ATTR_P
+ #define DLL_ATTR_ENCODE(DECL)
+ #define DLL_ATTR_DECLARE_OBJECT_NAME(STREAM, NAME, DECL)
+ #define DLL_ATTR_DECLARE_FUNCTION_NAME(STREAM, NAME, DECL)
+ #define DLL_ATTR_EXTRA_SECTIONS
+ #define DLL_ATTR_EXTRA_SECTION_FUNCTIONS
+ #endif

  /* Run-time compilation parameters selecting different hardware subsets.  */

*************** typedef struct mips_args {
*** 2535,2540 ****
--- 2544,2555 ----

  #define FUNCTION_EPILOGUE(FILE, SIZE) function_epilogue(FILE, SIZE)

+ /* If defined, a C expression whose value is nonzero if IDENTIFIER
+    with arguments ARGS is a valid machine specific attribute for TYPE.
+    The attributes in ATTRIBUTES have previously been assigned to TYPE.  */
+ #define VALID_MACHINE_DECL_ATTRIBUTE(DECL, ATTRIBUTES, IDENTIFIER, ARGS) \
+    mips_valid_decl_attribute_p (DECL, ATTRIBUTES, IDENTIFIER, ARGS)
+
  /* Tell prologue and epilogue if register REGNO should be saved / restored.  */

  #define MUST_SAVE_REGISTER(regno) \
*************** do                                                                      \
*** 3222,3227 ****
--- 3237,3244 ----
        {                                                                       \
          HALF_PIC_ENCODE (DECL);                                               \
        }                                                                       \
+                                                                       \
+     DLL_ATTR_ENCODE (DECL);                                           \
    }                                                                   \
  while (0)

*************** do {                                                                    \
*** 4216,4221 ****
--- 4233,4239 ----
  #define ASM_DECLARE_OBJECT_NAME(STREAM, NAME, DECL)                   \
  do                                                                    \
   {                                                                    \
+    DLL_ATTR_DECLARE_OBJECT_NAME (STREAM, NAME, DECL);                 \
     mips_declare_object (STREAM, NAME, "", ":\n", 0);                  \
     HALF_PIC_DECLARE (NAME);                                           \
   }                                                                    \
*************** while (0)
*** 4299,4304 ****
--- 4317,4324 ----
        fprintf (STREAM, "%s\n", TEXT_SECTION_ASM_OP);                  \
      }                                                                 \
                                                                        \
+   DLL_ATTR_DECLARE_FUNCTION_NAME (STREAM, NAME, DECL);                        \
+                                                                       \
    HALF_PIC_DECLARE (NAME);                                            \
  }

*************** do {                                                                    \
*** 4547,4553 ****

  /* What other sections we support other than the normal .data/.text.  */

! #define EXTRA_SECTIONS in_sdata, in_rdata

  /* Define the additional functions to select our additional sections.  */

--- 4567,4573 ----

  /* What other sections we support other than the normal .data/.text.  */

! #define EXTRA_SECTIONS in_sdata, in_rdata DLL_ATTR_EXTRA_SECTIONS

  /* Define the additional functions to select our additional sections.  */

*************** do {                                                                    \
*** 4560,4565 ****
--- 4580,4586 ----
     will go into the .rdata section. */

  #define EXTRA_SECTION_FUNCTIONS                                               \
+ DLL_ATTR_EXTRA_SECTION_FUNCTIONS                                      \
  void                                                                  \
  sdata_section ()                                                      \
  {                                                                     \

Index: config/mips/mips.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/mips/mips.c,v
retrieving revision 1.83
diff -p -r1.83 mips.c
*** mips.c      2000/01/18 23:44:36     1.83
--- mips.c      2000/02/23 01:44:26
*************** highpart_shift_operator (x, mode)
*** 8920,8928 ****
          || code == ROTATE);
  }

  /* Return the length of INSN.  LENGTH is the initial length computed by
     attributes in the machine-description file.  */
-
  int
  mips_adjust_insn_length (insn, length)
       rtx insn;
--- 8920,9027 ----
          || code == ROTATE);
  }

+ /* Return nonzero if IDENTIFIER with arguments ARGS is a valid machine specific
+    attribute for DECL.  The attributes in ATTRIBUTES have previously been
+    assigned to DECL.  */
+ int
+ mips_valid_decl_attribute_p (decl, attributes, identifier, args)
+      tree decl;
+      tree attributes ATTRIBUTE_UNUSED;
+      tree identifier;
+      tree args;
+ {
+ #ifdef DLL_ATTR_P
+   if (args == NULL_TREE)
+     {
+       if (is_attribute_p ("dllexport", identifier))
+       return 1;
+
+       if (is_attribute_p ("dllimport", identifier))
+       return 1;
+     }
+ #endif
+   return 0;
+ }
+
+ #ifdef DLL_ATTR_P
+ /* Return nonzero if IDENTIFIER with arguments ARGS is a valid machine specific
+    attribute for TYPE.  The attributes in ATTRIBUTES have previously been
+    assigned to TYPE.  */
+ int
+ mips_valid_type_attribute_p (type, attributes, identifier, args)
+      tree type;
+      tree attributes ATTRIBUTE_UNUSED;
+      tree identifier;
+      tree args;
+ {
+   if (args == NULL_TREE
+       && (TREE_CODE (type) == RECORD_TYPE || TREE_CODE (type) == UNION_TYPE))
+     {
+       if (is_attribute_p ("dllexport", identifier))
+       return 1;
+
+       if (is_attribute_p ("dllimport", identifier))
+       return 1;
+     }
+
+   return 0;
+ }
+
+ /* Merge attributes in decls OLD and NEW.
+
+    This handles the following situation:
+
+    __declspec (dllimport) int foo;
+    int foo;
+
+    The second instance of `foo' nullifies the dllimport.  */
+ tree
+ mips_merge_decl_attributes (old, new)
+      tree old, new;
+ {
+   tree a;
+   int delete_dllimport_p;
+
+   old = DECL_MACHINE_ATTRIBUTES (old);
+   new = DECL_MACHINE_ATTRIBUTES (new);
+
+   /* What we need to do here is remove from `old' dllimport if it doesn't
+      appear in `new'.  dllimport behaves like extern: if a declaration is
+      marked dllimport and a definition appears later, then the object
+      is not dllimport'd.  */
+
+   if (lookup_attribute ("dllimport", old) != NULL_TREE
+       && lookup_attribute ("dllimport", new) == NULL_TREE)
+     delete_dllimport_p = 1;
+   else
+     delete_dllimport_p = 0;
+
+   a = merge_attributes (old, new);
+
+   if (delete_dllimport_p)
+     {
+       tree prev,t;
+
+       /* Scan the list for dllimport and delete it.  */
+       for (prev = NULL_TREE, t = a; t; prev = t, t = TREE_CHAIN (t))
+       {
+         if (is_attribute_p ("dllimport", TREE_PURPOSE (t)))
+           {
+             if (prev == NULL_TREE)
+               a = TREE_CHAIN (a);
+             else
+               TREE_CHAIN (prev) = TREE_CHAIN (t);
+             break;
+           }
+       }
+     }
+
+   return a;
+ }
+ #endif /* DLL_ATTR_P */
+
  /* Return the length of INSN.  LENGTH is the initial length computed by
     attributes in the machine-description file.  */
  int
  mips_adjust_insn_length (insn, length)
       rtx insn;

Index: config/mips/mips-protos.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/mips/mips-protos.h,v
retrieving revision 1.1
diff -p -r1.1 mips-protos.h
*** mips-protos.h       1999/09/23 17:46:23     1.1
--- mips-protos.h       2000/02/23 01:44:26
*************** extern int              function_arg_pass_by_referen
*** 55,60 ****
--- 55,63 ----
  extern int            mips16_constant_after_function_p PARAMS ((tree));
  extern int            mips_output_external PARAMS ((FILE *, tree, const char *));
  extern tree           mips_build_va_list PARAMS ((void));
+ extern int              mips_valid_decl_attribute_p PARAMS ((tree, tree, tree, tree));
+ extern int              mips_valid_type_attribute_p PARAMS ((tree, tree, tree, tree));
+ extern tree           mips_merge_decl_attributes PARAMS ((tree, tree));
  #ifdef RTX_CODE
  extern void           mips_va_start PARAMS ((int, tree, rtx));
  #endif /* RTX_CODE */

Index: config/mips/mips-pe.h
===================================================================
RCS file: mips-pe.h
diff -N mips-pe.h
*** /dev/null   Tue May  5 13:32:27 1998
--- mips-pe.h   Tue Feb 22 17:44:26 2000
***************
*** 0 ****
--- 1,114 ----
+ /* MIPS PE object file format target machined macro definitions.
+    Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+    See ChangeLog for contributers.
+
+ This file is part of GNU CC.
+
+ GNU CC 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)
+ any later version.
+
+ GNU CC 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.  */
+
+ #define TARGET_DEFAULT MASK_GAS
+
+ /* Switch to SECTION (an `enum in_section').
+
+    This has to be customized for each section in the targets
+    enum in_section.
+
+    ??? This isn't the best way to do this.
+    The problem is that we want to temporarily switch sections in
+    ASM_DECLARE_OBJECT_NAME and then switch back to the original section
+    afterwards.
+    Elf supports assembler directives for pushing and popping sections.
+    Standard elf supports popping one section, via the .previous directive.
+    We could add something similar to the coff/pe assembler support.  This
+    would avoid the need for the switch_to_section function.  The fact that
+    this is an assembler feature for ELF is one reason why the compiler
+    doesn't have it.
+ */
+ extern void switch_to_section ();
+ #define SWITCH_TO_SECTION_FUNCTION                            \
+ void                                                          \
+ switch_to_section (section, decl)                             \
+      enum in_section section;                                         \
+      tree decl;                                               \
+ {                                                             \
+   switch (section)                                            \
+     {                                                                 \
+       case in_text: text_section (); break;                   \
+       case in_data: data_section (); break;                   \
+       case in_named: named_section (decl, NULL, 0); break;    \
+       case in_sdata: sdata_section (); break;                         \
+       case in_rdata: rdata_section (); break;                         \
+       case in_drectve: drectve_section (); break;             \
+       default: abort (); break;                               \
+     }                                                                 \
+ }
+
+ /* If defined, a C expression whose value is nonzero if IDENTIFIER with
+    arguments ARGS is a valid machine specific attribute for TYPE.
+    The attributes in ATTRIBUTES have previously been assigned to TYPE. */
+ #define VALID_MACHINE_TYPE_ATTRIBUTE(TYPE, ATTRIBUTES, IDENTIFIER, ARGS) \
+      mips_valid_type_attribute_p (TYPE, ATTRIBUTES, IDENTIFIER, ARGS)
+
+ /* Define this macro if the merging of decl attributes needs special handling.
+    If defined, the result is a list of the combined DECL_MACHINE_ATTRIBUTES of
+    OLDDECL and NEWDECL.  NEWDECL is a duplicate declaration
+    of OLDDECL.  Examples of when this is needed are when one attribute
+    overrides another, or when an attribute is nullified by a subsequent
+    definition. */
+ #define MERGE_MACHINE_DECL_ATTRIBUTES(OLDDECL, NEWDECL) \
+      mips_merge_decl_attributes (OLDDECL, NEWDECL)
+
+ #define DEFAULT_GDB_EXTENSIONS 1
+
+ #define PE_SUBTARGET_CPP_SPEC " \
+ %{!ansi:-DMIPS} \
+ -D__builtin_alignof=__alignof__ \
+ "
+
+ #include "pe.h"
+ #include "ecoffl.h"
+
+ /* Specify wchar_t types.  */
+ #undef        WCHAR_TYPE
+ #undef        WCHAR_TYPE_SIZE
+ #undef        MAX_WCHAR_TYPE_SIZE
+
+ #define WCHAR_TYPE    "short unsigned int"
+ #define WCHAR_TYPE_SIZE       SHORT_TYPE_SIZE
+ #define MAX_WCHAR_TYPE_SIZE   SHORT_TYPE_SIZE
+
+ /* We do not want to run mips-tfile!  */
+ #undef ASM_FINAL_SPEC
+
+ #define MIPS_DISABLE_GPOPT 1
+ #undef MIPS_DEFAULT_GVALUE
+ #define MIPS_DEFAULT_GVALUE 0
+
+ #include "dbxcoff.h"
+
+ /* A C statement (sans semicolon) to output to the stdio stream
+    STREAM the assembler definition of a common-label named
+    NAME whose size is SIZE bytes.  The variable ROUNDED
+    is the size rounded up to whatever alignment the caller wants. */
+ #undef  ASM_OUTPUT_COMMON
+ #define ASM_OUTPUT_COMMON(STREAM, NAME, SIZE, ROUNDED)                        \
+   DLL_ATTR_OUTPUT_COMMON (STREAM, NAME, SIZE, ROUNDED)
+
+ /* DLL_ATTR_OUTPUT_COMMON uses this to output the name if necessary.
+    In general it should be the same as ASM_OUTPUT_COMMON.  */
+ #define TARGET_DLL_ATTR_OUTPUT_COMMON(STREAM, NAME, SIZE, ROUNDED)    \
+   mips_declare_object (STREAM, NAME, "\n\t.comm\t", ",%u\n", (SIZE))
+

Index: config/mips/t-mipspe
===================================================================
RCS file: t-mipspe
diff -N t-mipspe
*** /dev/null   Tue May  5 13:32:27 1998
--- t-mipspe    Tue Feb 22 17:44:26 2000
***************
*** 0 ****
--- 1,103 ----
+ CONFIG2_H     = $(srcdir)/config/mips/ecoff.h
+
+ # We have a premade insn-attrtab.c to save the hour it takes to run genattrtab.
+ # PREMADE_ATTRTAB = $(srcdir)/config/mips/mips-at.c
+ # PREMADE_ATTRTAB_MD = $(srcdir)/config/mips/mips-at.md
+
+ # Include the PE specific stuff
+ pe.o: $(srcdir)/config/pe.c $(CONFIG_H) $(TREE_H) $(RTL_H) system.h
+       $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
+
+ # Suppress building libgcc1.a, since the MIPS compiler port is complete
+ # and does not need anything from libgcc1.a.
+ LIBGCC1 =
+ CROSS_LIBGCC1 =
+
+ # When building a cross compiler, put the mips16 support functions in
+ # libgcc1.a.
+ CROSS_LIBGCC1 = libgcc1-asm.a
+ LIB1ASMSRC = mips/mips16.S
+ LIB1ASMFUNCS = _m16addsf3 _m16subsf3 _m16mulsf3 _m16divsf3 \
+       _m16eqsf2 _m16nesf2 _m16gtsf2 _m16gesf2 _m16lesf2 _m16ltsf2 \
+       _m16fltsisf _m16fixsfsi \
+       _m16adddf3 _m16subdf3 _m16muldf3 _m16divdf3 \
+       _m16extsfdf2 _m16trdfsf2 \
+       _m16eqdf2 _m16nedf2 _m16gtdf2 _m16gedf2 _m16ledf2 _m16ltdf2 \
+       _m16fltsidf _m16fixdfsi \
+       _m16retsf _m16retdf \
+       _m16stub1 _m16stub2 _m16stub5 _m16stub6 _m16stub9 _m16stub10 \
+       _m16stubsf0 _m16stubsf1 _m16stubsf2 _m16stubsf5 _m16stubsf6 \
+       _m16stubsf9 _m16stubsf10 \
+       _m16stubdf0 _m16stubdf1 _m16stubdf2 _m16stubdf5 _m16stubdf6 \
+       _m16stubdf9 _m16stubdf10
+
+ # We must build libgcc2.a with -G 0, in case the user wants to link
+ # without the $gp register.
+ TARGET_LIBGCC2_CFLAGS = -G 0
+
+ # We want fine grained libraries, so use the new code to build the
+ # floating point emulation libraries.
+ FPBIT = fp-bit.c
+ DPBIT = dp-bit.c
+
+ dp-bit.c: $(srcdir)/config/fp-bit.c
+       echo '#ifdef __MIPSEL__' > dp-bit.c
+       echo '#define FLOAT_BIT_ORDER_MISMATCH' >> dp-bit.c
+       echo '#endif' >> dp-bit.c
+       echo '#define US_SOFTWARE_GOFAST' >> dp-bit.c
+       cat $(srcdir)/config/fp-bit.c >> dp-bit.c
+
+ fp-bit.c: $(srcdir)/config/fp-bit.c
+       echo '#define FLOAT' > fp-bit.c
+       echo '#ifdef __MIPSEL__' >> fp-bit.c
+       echo '#define FLOAT_BIT_ORDER_MISMATCH' >> fp-bit.c
+       echo '#endif' >> fp-bit.c
+       echo '#define US_SOFTWARE_GOFAST' >> fp-bit.c
+       cat $(srcdir)/config/fp-bit.c >> fp-bit.c
+
+ # Build the libraries for both hard and soft floating point
+
+ MULTILIB_OPTIONS =
+ MULTILIB_DIRNAMES =
+ MULTILIB_MATCHES =
+
+ # Use MS Windows' header files
+ USER_H = $(srcdir)/ginclude/stddef.h $(EXTRA_HEADERS) $(LANG_EXTRA_HEADERS)
+ INSTALL_HEADERS_DIR =
+ INSTALL_ASSERT_H =
+
+ LIBGCC = stmp-multilib
+ INSTALL_LIBGCC = install-multilib
+
+ # Add additional dependencies to recompile selected modules whenever the
+ # tm.h file changes.  The files compiled are:
+ #
+ #     gcc.c           (*_SPEC changes)
+ #     toplev.c        (new switches + assembly output changes)
+ #     sdbout.c        (debug format changes)
+ #     dbxout.c        (debug format changes)
+ #     dwarfout.c      (debug format changes)
+ #     final.c         (assembly output changes)
+ #     varasm.c        (assembly output changes)
+ #     cse.c           (cost functions)
+ #     insn-output.c   (possible ifdef changes in tm.h)
+ #     regclass.c      (fixed/call used register changes)
+ #     cccp.c          (new preprocessor macros, -v version #)
+ #     explow.c        (GO_IF_LEGITIMATE_ADDRESS)
+ #     recog.c         (GO_IF_LEGITIMATE_ADDRESS)
+ #     reload.c        (GO_IF_LEGITIMATE_ADDRESS)
+
+ gcc.o: $(CONFIG2_H)
+ toplev.o: $(CONFIG2_H)
+ sdbout.o: $(CONFIG2_H)
+ dbxout.o: $(CONFIG2_H)
+ dwarfout.o: $(CONFIG2_H)
+ final.o: $(CONFIG2_H)
+ varasm.o: $(CONFIG2_H)
+ cse.o: $(CONFIG2_H)
+ insn-output.o: $(CONFIG2_H)
+ regclass.o: $(CONFIG2_H)
+ cccp.o: $(CONFIG2_H)
+ explow.o: $(CONFIG2_H)
+ recog.o: $(CONFIG2_H)
+ reload.o: $(CONFIG2_H)

Index: config/arm/arm-wince-pe.h
===================================================================
RCS file: arm-wince-pe.h
diff -N arm-wince-pe.h
*** /dev/null   Tue May  5 13:32:27 1998
--- arm-wince-pe.h      Tue Feb 22 17:53:29 2000
***************
*** 0 ****
--- 1,63 ----
+ /* Definitions of target machine for GNU compiler,
+    for ARM with PE obj format running under the WinCE operating system.
+    Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+
+ This file is part of GNU CC.
+
+ GNU CC 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)
+ any later version.
+
+ GNU CC 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.  */
+
+ #define ARM_WINCE                     1
+
+ #include "arm-pe.h"
+
+ #undef  USER_LABEL_PREFIX
+ #define USER_LABEL_PREFIX ""
+
+ #undef  TARGET_VERSION
+ #define TARGET_VERSION        fputs (" (ARM/WinCE/PE)", stderr);
+
+ /* The next three definitions are defined in pe.h,
+    undefined in arm/arm-pe.h and then redefined back here!  */
+ #undef  LIB_SPEC
+ #define LIB_SPEC "-lcoredll -lcorelibc"
+
+ #define MATH_LIBRARY ""
+
+ #define LIBSTDCXX "-lc"
+
+ #undef  STARTFILE_SPEC
+ #define STARTFILE_SPEC ""
+ #define ENDFILE_SPEC ""
+
+ #undef  CPP_APCS_PC_DEFAULT_SPEC
+ #define CPP_APCS_PC_DEFAULT_SPEC      "-D__APCS_32__"
+
+ #undef  CC1_SPEC
+ #define CC1_SPEC  "%{!mapcs-32:%{!mapcs-26:-mapcs-32}}"
+
+ #undef  ASM_SPEC
+ #define ASM_SPEC "                    \
+ %{mbig-endian:-EB}                    \
+ %{mcpu=*:-m%*}                                \
+ %{march=*:-m%*}                               \
+ %{mapcs-*:-mapcs-%*}                  \
+ %{mthumb-interwork:-mthumb-interwork} \
+ %{!mapcs-32:%{!mapcs-26:-mapcs-32}}   \
+ "
+
+ /* WinCE headers require -DARM */
+ #undef  PE_SUBTARGET_CPP_SPEC
+ #define PE_SUBTARGET_CPP_SPEC "-D__pe__ -DARM -D__unaligned=__attribute__((aligned(1))) "


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]