Skip to content

Instantly share code, notes, and snippets.

@eblot
Created April 4, 2011 21:51
Show Gist options
  • Save eblot/902529 to your computer and use it in GitHub Desktop.
Save eblot/902529 to your computer and use it in GitHub Desktop.
Patch for GCC-core 4.6.0 ARM eCos EABI with Objective-C support
diff -urN a/gcc/config/arm/ecos-eabi.h b/gcc/config/arm/ecos-eabi.h
--- a/gcc/config/arm/ecos-eabi.h 1970-01-01 01:00:00.000000000 +0100
+++ b/gcc/config/arm/ecos-eabi.h 2011-04-04 23:46:26.000000000 +0200
@@ -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()
diff -urN a/gcc/config/arm/t-arm-elf b/gcc/config/arm/t-arm-elf
--- a/gcc/config/arm/t-arm-elf 2011-01-03 21:52:22.000000000 +0100
+++ b/gcc/config/arm/t-arm-elf 2011-04-04 23:46:26.000000000 +0200
@@ -71,8 +71,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
diff -urN a/gcc/config.gcc b/gcc/config.gcc
--- a/gcc/config.gcc 2011-03-14 07:05:29.000000000 +0100
+++ b/gcc/config.gcc 2011-04-04 23:46:26.000000000 +0200
@@ -879,6 +879,11 @@
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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment