gps/GPSResources/tcpmp 0.73/cross-compile/gcc-3.4.3.palmos.diff

174 lines
6.9 KiB
Diff
Executable File

diff -urN orig-gcc-3.4.3/configure.in gcc-3.4.3/configure.in
--- orig-gcc-3.4.3/configure.in 2004-11-04 18:05:20.000000000 +0100
+++ gcc-3.4.3/configure.in 2005-04-05 13:29:31.000000000 +0200
@@ -446,6 +446,9 @@
arm-*-riscix*)
noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}"
;;
+ arm-*-palmos*)
+ noconfigdirs="$noconfigdirs ${target_libs} ${target_tools}"
+ ;;
avr-*-*)
noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
;;
diff -urN orig-gcc-3.4.3/gcc/config/arm/arm.h gcc-3.4.3/gcc/config/arm/arm.h
--- orig-gcc-3.4.3/gcc/config/arm/arm.h 2004-08-25 17:55:55.000000000 +0200
+++ gcc-3.4.3/gcc/config/arm/arm.h 2005-04-05 15:35:01.103855100 +0200
@@ -799,7 +799,7 @@
(TYPE_NEEDS_IWMMXT_ALIGNMENT (TYPE) ? IWMMXT_ALIGNMENT : ALIGN)
/* Make strings word-aligned so strcpy from constants will be faster. */
-#define CONSTANT_ALIGNMENT_FACTOR (TARGET_THUMB || ! arm_tune_xscale ? 1 : 2)
+#define CONSTANT_ALIGNMENT_FACTOR (1)
#define CONSTANT_ALIGNMENT(EXP, ALIGN) \
((TARGET_REALLY_IWMMXT && TREE_CODE (EXP) == VECTOR_TYPE) ? IWMMXT_ALIGNMENT : \
diff -urN orig-gcc-3.4.3/gcc/config/arm/palmos.h gcc-3.4.3/gcc/config/arm/palmos.h
--- orig-gcc-3.4.3/gcc/config/arm/palmos.h 1970-01-01 01:00:00.000000000 +0100
+++ gcc-3.4.3/gcc/config/arm/palmos.h 2005-04-05 13:48:19.359375000 +0200
@@ -0,0 +1,45 @@
+/* Definitions for Palm OS on ARM.
+ Copyright 2002, 2003 John Marshall. (Until it is contributed.)
+
+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. */
+
+/* Palm OS code must be PIC code, and the OS expects %r9 to be fixed.
+ We could do the latter with SUBTARGET_CONDITIONAL_REGISTER_USAGE instead,
+ but this is more visible for our paranoid users. */
+#undef CC1_SPEC
+#define CC1_SPEC ""
+
+#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm7tdmi
+
+#undef TARGET_VERSION
+#define TARGET_VERSION fputs (" (ARM/ELF Palm OS armlet)", stderr);
+
+/* We don't want a PLT at all. */
+#undef NEED_PLT_RELOC
+#define NEED_PLT_RELOC 0
+
+/* Put constant data in .text instead of a separate .rodata. */
+#undef EXTRA_SECTIONS
+#undef EXTRA_SECTION_FUNCTIONS
+#undef READONLY_DATA_SECTION
+#undef TARGET_ASM_SELECT_SECTION
+#undef TARGET_ASM_SELECT_RTX_SECTION
+
+#undef USE_CONST_SECTION
+/*#undef CONST_SECTION_ASM_OP*/
+#undef CONST_SECTION_FUNCTION
diff -urN orig-gcc-3.4.3/gcc/config/palmos.h gcc-3.4.3/gcc/config/palmos.h
--- orig-gcc-3.4.3/gcc/config/palmos.h 1970-01-01 01:00:00.000000000 +0100
+++ gcc-3.4.3/gcc/config/palmos.h 2005-04-05 14:01:30.588230100 +0200
@@ -0,0 +1,44 @@
+/* Definitions for Palm OS.
+ Copyright 2002 John Marshall. (Until it is contributed.)
+
+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. */
+
+/* Some Palm OS headers in TOOL_INCLUDE_DIR need to #include_next their
+ corresponding header in CROSS_INCLUDE_DIR, so we need to reorder them
+ from the default. */
+#define INCLUDE_DEFAULTS \
+ { \
+ { GCC_INCLUDE_DIR, "GCC", 0, 0 }, \
+ { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1 }, \
+ { CROSS_INCLUDE_DIR, 0, 0, 0 }, \
+ { 0, 0, 0, 0 } \
+ }
+
+/* Palm OS headers are C++-aware. */
+#define NO_IMPLICIT_EXTERN_C
+
+/* Palm OS programmers enjoy (ab)using all kinds of packing pragmas. */
+#define HANDLE_SYSV_PRAGMA 1
+#define HANDLE_PRAGMA_PACK_PUSH_POP 1
+
+/* Add Palm OS-related predefines to any generic ones. */
+#define TARGET_OS_CPP_BUILTINS() \
+ do { \
+ builtin_define ("__palmos__"); \
+ builtin_assert ("system=palmos"); \
+ } while (0)
diff -urN orig-gcc-3.4.3/gcc/config/t-palmos gcc-3.4.3/gcc/config/t-palmos
--- orig-gcc-3.4.3/gcc/config/t-palmos 1970-01-01 01:00:00.000000000 +0100
+++ gcc-3.4.3/gcc/config/t-palmos 2005-04-05 12:56:57.890625000 +0200
@@ -0,0 +1,7 @@
+# Some Palm OS-related headers can be found here, and the remainder are in
+# directories that will be found via custom specs.
+CROSS_SYSTEM_HEADER_DIR = $(datadir)/prc-tools/include
+
+# But these headers are generally not yet installed while building GCC,
+# so there's no point trying to fix them.
+STMP_FIXPROTO =
diff -urN orig-gcc-3.4.3/gcc/config.gcc gcc-3.4.3/gcc/config.gcc
--- orig-gcc-3.4.3/gcc/config.gcc 2004-09-08 17:16:10.000000000 +0200
+++ gcc-3.4.3/gcc/config.gcc 2005-04-05 13:31:58.078125000 +0200
@@ -686,6 +686,10 @@
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*-*-palmos*)
+ tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h palmos.h arm/palmos.h"
+ tmake_file="arm/t-arm-elf t-palmos"
+ ;;
arm*-wince-pe*)
tm_file="arm/semi.h arm/aout.h arm/arm.h arm/coff.h dbxcoff.h arm/pe.h arm/wince-pe.h"
tmake_file=arm/t-wince-pe
diff -urN orig-gcc-3.4.3/gcc/defaults.h gcc-3.4.3/gcc/defaults.h
--- orig-gcc-3.4.3/gcc/defaults.h 2004-01-24 00:35:56.000000000 +0100
+++ gcc-3.4.3/gcc/defaults.h 2005-04-05 13:32:57.218750000 +0200
@@ -389,9 +389,7 @@
/* By default, the preprocessor should be invoked the same way in C++
as in C. */
#ifndef CPLUSPLUS_CPP_SPEC
-#ifdef CPP_SPEC
-#define CPLUSPLUS_CPP_SPEC CPP_SPEC
-#endif
+#define CPLUSPLUS_CPP_SPEC 0
#endif
#ifndef ACCUMULATE_OUTGOING_ARGS
diff -urN orig-gcc-3.4.3/gcc/version.c gcc-3.4.3/gcc/version.c
--- orig-gcc-3.4.3/gcc/version.c 2004-11-05 04:35:02.000000000 +0100
+++ gcc-3.4.3/gcc/version.c 2005-04-05 13:30:51.765625000 +0200
@@ -5,7 +5,7 @@
please modify this string to indicate that, e.g. by putting your
organization's name in parentheses at the end of the string. */
-const char version_string[] = "3.4.3";
+const char version_string[] = "3.4.3 (modified prc-tools)";
/* This is the location of the online document giving instructions for
reporting bugs. If you distribute a modified version of GCC,