Skip to content

Instantly share code, notes, and snippets.

View eblot's full-sized avatar

Emmanuel Blot eblot

  • France, Provence
View GitHub Profile
require 'formula'
class GccArmEcosNewlib <Formula
@url='ftp://sources.redhat.com/pub/newlib/newlib-1.18.0.tar.gz'
@homepage='http://sourceware.org/newlib/'
@sha1='a47d3b8a508304143334b36bdb5b33786a61ce94'
end
class GccArmEcosCplusplus <Formula
@url='http://ftp.gnu.org/gnu/gcc/gcc-4.4.2/gcc-g++-4.4.2.tar.bz2'
@eblot
eblot / gcc.patch
Created February 19, 2011 00:06
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"
@eblot
eblot / objc.patch
Created February 19, 2011 00:07
Patch for GCC-objc 4.6.0 ARM eCos EABI with Objective-C support
diff --git a/libobjc/error.c b/libobjc/error.c
index 1dae365..f94cc26 100644
--- a/libobjc/error.c
+++ b/libobjc/error.c
@@ -30,12 +30,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
malloc, free, etc. on some platforms. It is unclear if we still
need it, but it can't hurt. */
#define __USE_FIXED_PROTOTYPES__
+#include <sys/reent.h>
#include <stdlib.h>
@eblot
eblot / newlib.patch
Created February 19, 2011 00:08
Patch for GCC-newlib 4.6.0 ARM eCos EABI with Objective-C support
diff --git a/newlib/libc/include/sys/config.h b/newlib/libc/include/sys/config.h
index 49c81f9..e9297f8 100644
--- a/newlib/libc/include/sys/config.h
+++ b/newlib/libc/include/sys/config.h
@@ -130,6 +130,11 @@
#define __ATTRIBUTE_IMPURE_PTR__ __attribute__((__section__(".sdata")))
#endif
+#ifdef __ecos__
+#define __DYNAMIC_REENT__ 1
@eblot
eblot / pyusb-1.0.0a1-usbbus.patch
Created March 20, 2011 12:11
Adding bus usb information to PyUSB 1.0.0 (for libusb-1.0.x only)
diff -ur a/usb/backend/__init__.py b/usb/backend/__init__.py
--- a/usb/backend/__init__.py 2010-12-15 10:40:52.000000000 +0100
+++ b/usb/backend/__init__.py 2011-03-15 17:01:35.000000000 +0100
@@ -176,6 +176,14 @@
"""
_not_implemented(self.close_device)
+ def get_bus_number(self, dev):
+ r"""Get the number of the bus that a device is connected to."""
+ _not_implemented(self.get_bus_number)
@eblot
eblot / gcc.patch
Created April 4, 2011 21:51
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
@eblot
eblot / gist:988314
Created May 24, 2011 08:14
Subversion dynamic bindings are wrong
eblot@taquille:/usr/local$ brew update
From http://github.com/mxcl/homebrew
* branch master -> FETCH_HEAD
Already up-to-date.
eblot@taquille:/usr/local$ brew doctor
Some brews install binaries to sbin instead of bin, but Homebrew's
sbin was not found in your path.
Consider editing your .bashrc to add:
/usr/local/sbin
@eblot
eblot / gist:988321
Created May 24, 2011 08:16
brew --config
eblot@taquille:/usr/local$ brew --config
HOMEBREW_VERSION: 0.8
HEAD: 838b677927b5437718a9e92d05361af9c7218bd4
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_LIBRARY_PATH: /usr/local/Library/Homebrew
Hardware: quad-core 64-bit arrandale
OS X: 10.6.7
Kernel Architecture: x86_64
@eblot
eblot / subversion_sqlite.patch
Created May 24, 2011 10:17
Dirty hack to work around SQLite dynamic linkage issue in Homebrew's subversion formula
diff --git a/Library/Formula/subversion.rb b/Library/Formula/subversion.rb
index 187a026..4decaae 100644
--- a/Library/Formula/subversion.rb
+++ b/Library/Formula/subversion.rb
@@ -88,6 +88,8 @@ class Subversion < Formula
check_neon_arch if build_universal?
end
+ sqlite = Formula.factory('sqlite')
+
@eblot
eblot / gettext.patch
Created June 12, 2011 11:32
Gettext workaround for building under OS X 10.7 (Lion)
diff -ur a/gettext-tools/gnulib-lib/stpcpy.c b/gettext-tools/gnulib-lib/stpcpy.c
--- a/gettext-tools/gnulib-lib/stpcpy.c 2010-05-24 11:42:47.000000000 +0200
+++ b/gettext-tools/gnulib-lib/stpcpy.c 2011-06-12 13:17:56.000000000 +0200
@@ -28,7 +28,7 @@
#endif
#ifndef weak_alias
-# define __stpcpy stpcpy
+//# define __stpcpy stpcpy
#endif