Improve support for arm-wince-pe target:
authorNick Clifton <nickc@redhat.com>
Tue, 10 Jun 2003 14:45:44 +0000 (14:45 +0000)
committerNick Clifton <nickc@gcc.gnu.org>
Tue, 10 Jun 2003 14:45:44 +0000 (14:45 +0000)
* config.gcc: Add arm-wince-pe target.
* config/arm/pe.h (MULTILIB_DEFAULTS): Define.
        Add comment about default apcs26 support.
* config/arm/t-pe (MULTILIB_OPTIONS): Add an -mapcs-32
multilib.
        (MULTILIB_DIRNAMES): Add 'apcs32'.
* config/arm/t-wince-pe: New makefile fragment.
* config/arm/wince-pe.h: New file.  Overrides a few definitions
in arm/pe.h

From-SVN: r67705

gcc/ChangeLog
gcc/config.gcc
gcc/config/arm/pe.h
gcc/config/arm/t-pe
gcc/config/arm/t-wince-pe [new file with mode: 0644]
gcc/config/arm/wince-pe.h [new file with mode: 0644]

index 1565c4871c2d97a0e04b1bdb42e4cae04ae31899..971ca02a9e5070b6b3dc73592dfc4743594f8a6f 100644 (file)
@@ -1,3 +1,15 @@
+2003-06-10  Nick Clifton  <nickc@redhat.com>
+
+       * config.gcc: Add arm-wince-pe target.
+       * config/arm/pe.h (MULTILIB_DEFAULTS): Define.
+        Add comment about default apcs26 support.
+       * config/arm/t-pe (MULTILIB_OPTIONS): Add an -mapcs-32
+       multilib.
+        (MULTILIB_DIRNAMES): Add 'apcs32'.
+       * config/arm/t-wince-pe: New makefile fragment.
+       * config/arm/wince-pe.h: New file.  Overrides a few definitions
+       in arm/pe.h
+
 2003-06-10  Roger Sayle  <roger@eyesopen.com>
 
        * builtins.c (fold_builtin): Optimize cos(-x) as cos(x).
index 43e6f46f55551f3db99d06ef48b402a0672550b3..d2abc8b6bd4a9a85379077fe383d5a86302a61a5 100644 (file)
@@ -695,6 +695,11 @@ arm*-*-elf | ep9312-*-elf)
        tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h"
        tmake_file=arm/t-arm-elf
        ;;
+arm*-wince-pe*)
+       tm_file="arm/semi.h arm/aout.h arm/arm.h arm/coff.h arm/pe.h arm/wince-pe.h"
+       tmake_file=arm/t-wince-pe
+       extra_objs="pe.o"
+       ;;
 arm-*-pe*)
        tm_file="arm/semi.h arm/aout.h arm/arm.h arm/coff.h arm/pe.h"
        tmake_file=arm/t-pe
index 471676ee03543e130317ba32942de2cbaf648c14..a8ca0d475436732c47689d94084676d0c392b040 100644 (file)
   N_("Ignore dllimport attribute for functions") },            \
 { "no-nop-fun-dllimport",      - TARGET_FLAG_NOP_FUN, "" },
 
+/* Defaulting to APCS-26 support is a legacy issue.   It has been done
+   that way for a long time, so changing it will probably break some
+   people's worlds.  Support for APCS-32 is now enabled as a multilib,
+   and at some point in the future APCS-32 may become the default.
+   Possibly when chips that support APCS-26 are no longer made.  */
+
 #undef  TARGET_DEFAULT
 #define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | TARGET_FLAG_NOP_FUN)
 
+#undef  MULTILIB_DEFAULTS
+#define MULTILIB_DEFAULTS \
+  { "marm", "mlittle-endian", "msoft-float", "mapcs-26", "mno-thumb-interwork" }  
 \f
 #undef  WCHAR_TYPE
 #define WCHAR_TYPE     "short unsigned int"
 #define SUPPORTS_ONE_ONLY 1
 
 /* Switch into a generic section.  */
-#undef TARGET_ASM_NAMED_SECTION
+#undef  TARGET_ASM_NAMED_SECTION
 #define TARGET_ASM_NAMED_SECTION  default_pe_asm_named_section
 \f
 /* This outputs a lot of .req's to define alias for various registers.
index ba4ea10e402d9bfa421c8969e0f413367f886af8..4c20b31797350e342ead88dff80a38116f9478d5 100644 (file)
@@ -24,8 +24,8 @@ pe.o: $(srcdir)/config/arm/pe.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
   $(RTL_H) output.h flags.h $(TREE_H) expr.h toplev.h $(TM_P_H)
        $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/config/arm/pe.c
 
-MULTILIB_OPTIONS = mhard-float mthumb
-MULTILIB_DIRNAMES = fpu thumb
+MULTILIB_OPTIONS = mhard-float mthumb mapcs-32
+MULTILIB_DIRNAMES = fpu thumb apcs32
 
 LIBGCC = stmp-multilib
 INSTALL_LIBGCC = install-multilib
diff --git a/gcc/config/arm/t-wince-pe b/gcc/config/arm/t-wince-pe
new file mode 100644 (file)
index 0000000..9537a7f
--- /dev/null
@@ -0,0 +1,37 @@
+LIB1ASMSRC = arm/lib1funcs.asm
+LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_tls _call_via_rX _interwork_call_via_rX
+
+# 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
+
+fp-bit.c: $(srcdir)/config/fp-bit.c
+       echo '#define FLOAT' > fp-bit.c
+       echo '#ifndef __ARMEB__' >> 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
+
+dp-bit.c: $(srcdir)/config/fp-bit.c
+       echo '#ifndef __ARMEB__' > dp-bit.c
+       echo '#define FLOAT_BIT_ORDER_MISMATCH' >> dp-bit.c
+       echo '#define FLOAT_WORD_ORDER_MISMATCH' >> dp-bit.c
+       echo '#endif' >> dp-bit.c
+       cat $(srcdir)/config/fp-bit.c >> dp-bit.c
+
+pe.o: $(srcdir)/config/arm/pe.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+  $(RTL_H) output.h flags.h $(TREE_H) expr.h toplev.h $(TM_P_H)
+       $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/config/arm/pe.c
+
+MULTILIB_OPTIONS = mhard-float mapcs-26
+MULTILIB_DIRNAMES = fpu apcs26
+# Note - Thumb multilib omitted because Thumb apcs32 support for
+# arm-wince-pe target does not appear to be working in binutils
+# yet... 
+# MULTILIB_OPTIONS += thumb
+# MULTILIB_DIRNAMES += thumb
+
+LIBGCC = stmp-multilib
+INSTALL_LIBGCC = install-multilib
+TARGET_LIBGCC2_CFLAGS = -Dinhibit_libc
diff --git a/gcc/config/arm/wince-pe.h b/gcc/config/arm/wince-pe.h
new file mode 100644 (file)
index 0000000..feed133
--- /dev/null
@@ -0,0 +1,29 @@
+/* Definitions of target machine for GNU compiler, for ARM with WINCE-PE obj format.
+   Copyright (C) 2003 Free Software Foundation, Inc.
+   Contributed by Nick Clifton <nickc@redhat.com>
+   
+   This file is part of GCC.
+
+   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) any later version.
+
+   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 GCC; see the file COPYING.  If not, write to
+   the Free Software Foundation, 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+/* Override arm/pe.h's default apcs26 support.  */
+
+#undef  TARGET_DEFAULT
+#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_SOFT_FLOAT | TARGET_FLAG_NOP_FUN)
+
+#undef  MULTILIB_DEFAULTS
+#define MULTILIB_DEFAULTS \
+  { "marm", "mlittle-endian", "msoft-float", "mapcs-32", "mno-thumb-interwork" }