Skip to content

Instantly share code, notes, and snippets.

@eblot
Created February 19, 2011 00:06
Show Gist options
  • Save eblot/834642 to your computer and use it in GitHub Desktop.
Save eblot/834642 to your computer and use it in GitHub Desktop.
Patch for GCC-core 4.6.0 ARM eCos EABI with Objective-C support
diff --git a/gcc/config.gcc b/gcc/config.gcc
index d79e734..63a5bd3 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -852,6 +852,11 @@ arm*-*-eabi* | arm*-*-symbianelf* )
tm_file="$tm_file ../../libgcc/config/arm/bpabi-lib.h"
tmake_file="arm/t-arm arm/t-arm-elf"
case ${target} in
+ arm*-ecos-eabi*)
+ tm_file="$tm_file newlib-stdint.h arm/ecos-eabi.h"
+ tmake_file="${tmake_file} arm/t-bpabi"
+ use_gcc_stdint=wrap
+ ;;
arm*-*-eabi*)
tm_file="$tm_file newlib-stdint.h"
tmake_file="${tmake_file} arm/t-bpabi"
diff --git a/gcc/config/arm/ecos-eabi.h b/gcc/config/arm/ecos-eabi.h
new file mode 100644
index 0000000..79334b3
--- /dev/null
+++ b/gcc/config/arm/ecos-eabi.h
@@ -0,0 +1,34 @@
+/* Definitions for ecos based ARM systems using ELF
+ Copyright (C) 1998, 2001, 2007 Free Software Foundation, Inc.
+
+ 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 3, 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 COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+
+/* Run-time Target Specification. */
+#undef TARGET_VERSION
+#define TARGET_VERSION fputs (" (ARM/EABI Ecos)", stderr);
+
+#undef TARGET_OS_CPP_BUILTINS
+#undef TARGET_BPABI_CPP_BUILTINS
+#define TARGET_BPABI_CPP_BUILTINS() \
+ do { \
+ builtin_define ("__ecos__"); \
+ builtin_define ("__GXX_TYPEINFO_EQUALITY_INLINE=0"); \
+ builtin_assert ("system=ecos"); \
+ } while (0)
+
+#define TARGET_OS_CPP_BUILTINS() \
+ TARGET_BPABI_CPP_BUILTINS()
--- a/gcc/config/arm/t-arm-elf 2008-06-12 19:29:47.000000000 +0200
+++ b/gcc/config/arm/t-arm-elf 2010-01-14 00:44:48.000000000 +0100
@@ -65,8 +65,8 @@
# MULTILIB_DIRNAMES += fpu soft
# MULTILIB_EXCEPTIONS += *mthumb/*mhard-float*
#
-# MULTILIB_OPTIONS += mno-thumb-interwork/mthumb-interwork
-# MULTILIB_DIRNAMES += normal interwork
+MULTILIB_OPTIONS += mno-thumb-interwork/mthumb-interwork
+MULTILIB_DIRNAMES += normal interwork
#
# MULTILIB_OPTIONS += fno-leading-underscore/fleading-underscore
# MULTILIB_DIRNAMES += elf under
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment