[04/20] Forked crosstool-ng (darwin & clang support)

Submitted by Yann Diorcet on Aug. 6, 2014, 7:16 p.m.

Details

Message ID 1407352611-7652-4-git-send-email-diorcet.yann@gmail.com
State New
Delegated to: Esben Haabendal
Headers show

Commit Message

Yann Diorcet Aug. 6, 2014, 7:16 p.m.
This version is a temporary fork of ct-ng until the modifications are
merged to the official repository

This support clang compiler using LLVM (from 3.0 to 3.4)
This support cross-compilation for darwin targets.
For compiling for darwin you should have the non redistribuable SDK
from XCode dmg linked in sdks/ at the oe-lite root
for example:
    ./sdks/MacOSX10.6.sdk
    ./sdks/MacOSX10.7.sdk
Please use tools/prepare_darwin_sdk.sh from forked ct-ng in order
to prepare the SDK from XCode.dmg
---
 .../canadian-skip-cc-core.patch                    |  96 ------
 .../dir-extract-with-copy.patch                    |  11 -
 .../dmalloc-5.5.2-fix-recursion.patch              |  18 -
 .../dmalloc-5.5.2-powerpc.patch                    |  15 -
 .../eglibc-2_16-typedef-caddr.patch                |  32 --
 .../crosstool-ng-1.17.0/elf2flt-for-build.patch    |  11 -
 .../crosstool-ng-1.17.0/libitm-mmx.patch           |  16 -
 .../crosstool-ng/crosstool-ng-1.17.0/prefix.patch  |  15 -
 .../uclibc-target-cflags-fixup.patch               |  34 --
 .../uclibceabi-instead-of-uclibcgnueabi.patch      |  45 ---
 .../crosstool-ng/crosstool-ng-github/darwin.patch  |  22 ++
 .../crosstool-ng/crosstool-ng-github/make.patch    | 377 +++++++++++++++++++++
 .../crosstool-ng/crosstool-ng-github/paths.patch   |  42 +++
 recipes/crosstool-ng/crosstool-ng.inc              |  17 +-
 recipes/crosstool-ng/crosstool-ng_1.17.0.oe        |  38 ---
 recipes/crosstool-ng/crosstool-ng_1.17.0.oe.sig    |   4 -
 recipes/crosstool-ng/crosstool-ng_github.oe        |  11 +
 recipes/crosstool-ng/gcc-1.17/300-mingw32.config   | 152 ---------
 recipes/crosstool-ng/gcc-compile.inc               |   7 +
 recipes/crosstool-ng/gcc-configure.inc             |  84 +++--
 recipes/crosstool-ng/gcc-fetch.inc                 | 215 ++++++++----
 .../{gcc-1.17 => gcc-github}/000-misc.config       |   5 +-
 .../{gcc-1.17 => gcc-github}/100-arm.config        |   0
 .../{gcc-1.17 => gcc-github}/100-m68k.config       |   0
 .../{gcc-1.17 => gcc-github}/100-powerpc.config    |   2 +-
 .../{gcc-1.17 => gcc-github}/100-x86.config        |   2 +-
 .../{gcc-1.17 => gcc-github}/100-x86_64.config     |   2 +-
 .../{gcc-1.17 => gcc-github}/200-toolchain.config  |   8 +-
 recipes/crosstool-ng/gcc-github/300-darwin.config  | 215 ++++++++++++
 .../300-linux-glibc.config                         |  93 ++++-
 .../300-linux-uclibc.config                        |   0
 recipes/crosstool-ng/gcc-github/300-mingw32.config | 211 ++++++++++++
 .../uClibc-0.9.33.2.config                         |   0
 recipes/crosstool-ng/gcc-install.inc               |  10 +-
 recipes/crosstool-ng/gcc-package.inc               |  33 +-
 recipes/crosstool-ng/gcc-versions.inc              |  41 ++-
 recipes/crosstool-ng/gcc.inc                       |   5 +-
 recipes/crosstool-ng/gcc_1.17.0.oe                 | 108 ------
 recipes/crosstool-ng/gcc_1.17.0.oe.sig             |  50 ---
 recipes/crosstool-ng/gcc_github.oe                 |  46 +++
 recipes/crosstool-ng/gcc_github.oe.sig             |  51 +++
 41 files changed, 1376 insertions(+), 768 deletions(-)
 delete mode 100644 recipes/crosstool-ng/crosstool-ng-1.17.0/canadian-skip-cc-core.patch
 delete mode 100644 recipes/crosstool-ng/crosstool-ng-1.17.0/dir-extract-with-copy.patch
 delete mode 100644 recipes/crosstool-ng/crosstool-ng-1.17.0/dmalloc-5.5.2-fix-recursion.patch
 delete mode 100644 recipes/crosstool-ng/crosstool-ng-1.17.0/dmalloc-5.5.2-powerpc.patch
 delete mode 100644 recipes/crosstool-ng/crosstool-ng-1.17.0/eglibc-2_16-typedef-caddr.patch
 delete mode 100644 recipes/crosstool-ng/crosstool-ng-1.17.0/elf2flt-for-build.patch
 delete mode 100644 recipes/crosstool-ng/crosstool-ng-1.17.0/libitm-mmx.patch
 delete mode 100644 recipes/crosstool-ng/crosstool-ng-1.17.0/prefix.patch
 delete mode 100644 recipes/crosstool-ng/crosstool-ng-1.17.0/uclibc-target-cflags-fixup.patch
 delete mode 100644 recipes/crosstool-ng/crosstool-ng-1.17.0/uclibceabi-instead-of-uclibcgnueabi.patch
 create mode 100644 recipes/crosstool-ng/crosstool-ng-github/darwin.patch
 create mode 100644 recipes/crosstool-ng/crosstool-ng-github/make.patch
 create mode 100644 recipes/crosstool-ng/crosstool-ng-github/paths.patch
 delete mode 100644 recipes/crosstool-ng/crosstool-ng_1.17.0.oe
 delete mode 100644 recipes/crosstool-ng/crosstool-ng_1.17.0.oe.sig
 create mode 100644 recipes/crosstool-ng/crosstool-ng_github.oe
 delete mode 100644 recipes/crosstool-ng/gcc-1.17/300-mingw32.config
 rename recipes/crosstool-ng/{gcc-1.17 => gcc-github}/000-misc.config (94%)
 rename recipes/crosstool-ng/{gcc-1.17 => gcc-github}/100-arm.config (100%)
 rename recipes/crosstool-ng/{gcc-1.17 => gcc-github}/100-m68k.config (100%)
 rename recipes/crosstool-ng/{gcc-1.17 => gcc-github}/100-powerpc.config (97%)
 rename recipes/crosstool-ng/{gcc-1.17 => gcc-github}/100-x86.config (97%)
 rename recipes/crosstool-ng/{gcc-1.17 => gcc-github}/100-x86_64.config (97%)
 rename recipes/crosstool-ng/{gcc-1.17 => gcc-github}/200-toolchain.config (85%)
 create mode 100644 recipes/crosstool-ng/gcc-github/300-darwin.config
 rename recipes/crosstool-ng/{gcc-1.17 => gcc-github}/300-linux-glibc.config (60%)
 rename recipes/crosstool-ng/{gcc-1.17 => gcc-github}/300-linux-uclibc.config (100%)
 create mode 100644 recipes/crosstool-ng/gcc-github/300-mingw32.config
 rename recipes/crosstool-ng/{gcc-1.17 => gcc-github}/uClibc-0.9.33.2.config (100%)
 delete mode 100644 recipes/crosstool-ng/gcc_1.17.0.oe
 delete mode 100644 recipes/crosstool-ng/gcc_1.17.0.oe.sig
 create mode 100644 recipes/crosstool-ng/gcc_github.oe
 create mode 100644 recipes/crosstool-ng/gcc_github.oe.sig

Patch hide | download patch | download mbox

diff --git a/recipes/crosstool-ng/crosstool-ng-1.17.0/canadian-skip-cc-core.patch b/recipes/crosstool-ng/crosstool-ng-1.17.0/canadian-skip-cc-core.patch
deleted file mode 100644
index 89141cf..0000000
--- a/recipes/crosstool-ng/crosstool-ng-1.17.0/canadian-skip-cc-core.patch
+++ /dev/null
@@ -1,96 +0,0 @@ 
-diff -r f36a98f63749 config/toolchain.in
---- a/config/toolchain.in	Sun Nov 11 21:43:54 2012 +0100
-+++ b/config/toolchain.in	Sun Dec 09 13:39:33 2012 +0100
-@@ -303,6 +303,55 @@
- 
- endif # CANADIAN
- 
-+if CROSS_NATIVE || CANADIAN
-+
-+comment "Target system"
-+
-+config TARGET_PREFIX
-+    string
-+    prompt "|  Tools prefix (READ HELP!)"
-+    default ""
-+    help
-+      If you have your *target system* tools in a weird location, and/or
-+      they have an unusual prefix, enter it here.
-+      
-+      Usually, you should leave that empty!
-+      
-+      Eg.:
-+        If your *target* gcc is /opt/target-tools/bin/weird-gcc then you
-+        should enter:
-+            /opt/target-tools/bin/weird-
-+        
-+        If your *target* gcc is /opt/target-tools/bin/weird-gcc and
-+        /opt/target-tools/bin is in your PATH, you should enter:
-+            weird-
-+        
-+        If your *target* gcc is /opt/target-tools/bin/gcc then you
-+        should enter (do not forget to add the trailing '/'):
-+            /opt/target-tools/bin/
-+
-+config TARGET_SUFFIX
-+    string
-+    prompt "|  Tools suffix (READ HELP!)"
-+    default ""
-+    help
-+      If your *target system* tools have an unusual suffix, enter it
-+      here.
-+      
-+      Usually, you should leave that empty!
-+      
-+      Eg.:
-+        If your 'default' gcc is gcc 4.3.1, but you also have gcc-3.4.2
-+        installed as gcc-3.4, then you should enter:
-+            -3.4
-+      
-+      It can happen that some of the tools have a suffix, when others
-+      don't, eg. you can have 'gcc-3.4' and 'ar'. crosstool-NG accounts
-+      for that by checking the tools without the suffix in case it can
-+      not find some of the tool.
-+
-+endif # CROSS_NATIVE || CANADIAN
-+
- comment "Misc options"
- 
- config TOOLCHAIN_ENABLE_NLS
-diff -r f36a98f63749 scripts/build/cc/gcc.sh
---- a/scripts/build/cc/gcc.sh	Sun Nov 11 21:43:54 2012 +0100
-+++ b/scripts/build/cc/gcc.sh	Sun Dec 09 13:39:33 2012 +0100
-@@ -83,6 +83,10 @@
- do_cc_core_pass_1() {
-     local -a core_opts
- 
-+    case "${CT_TOOLCHAIN_TYPE}" in
-+        canadian|cross-native)   return 0;;
-+    esac
-+
-     core_opts+=( "mode=static" )
-     core_opts+=( "host=${CT_BUILD}" )
-     core_opts+=( "complibs=${CT_BUILDTOOLS_PREFIX_DIR}" )
-@@ -103,6 +107,10 @@
- do_cc_core_pass_2() {
-     local -a core_opts
- 
-+    case "${CT_TOOLCHAIN_TYPE}" in
-+        canadian|cross-native)   return 0;;
-+    esac
-+
-     # Common options:
-     core_opts+=( "host=${CT_BUILD}" )
-     core_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" )
-diff -r f36a98f63749 scripts/crosstool-NG.sh.in
---- a/scripts/crosstool-NG.sh.in	Sun Nov 11 21:43:54 2012 +0100
-+++ b/scripts/crosstool-NG.sh.in	Sun Dec 09 13:39:33 2012 +0100
-@@ -365,7 +365,7 @@
-             build_mangle="build_"
-             host_mangle="host_"
-             target_mangle=""
--            install_build_tools_for="BUILD HOST"
-+            install_build_tools_for="BUILD HOST TARGET"
-             ;;
-         *)  CT_Abort "No code for '${CT_TOOLCHAIN_TYPE}' toolchain type!"
-             ;;
diff --git a/recipes/crosstool-ng/crosstool-ng-1.17.0/dir-extract-with-copy.patch b/recipes/crosstool-ng/crosstool-ng-1.17.0/dir-extract-with-copy.patch
deleted file mode 100644
index 14fd5a8..0000000
--- a/recipes/crosstool-ng/crosstool-ng-1.17.0/dir-extract-with-copy.patch
+++ /dev/null
@@ -1,11 +0,0 @@ 
-diff -urN crosstool-ng-1.17.0~orig/scripts/functions crosstool-ng-1.17.0/scripts/functions
---- crosstool-ng-1.17.0~orig/scripts/functions	2013-01-07 13:44:29.370933224 +0100
-+++ crosstool-ng-1.17.0/scripts/functions	2013-01-07 21:54:30.044459907 +0100
-@@ -927,6 +927,7 @@
-         .tar.gz|.tgz) gzip -dc "${full_file}" | CT_DoExecLog FILE tar "${tar_opts[@]}" -f -;;
-         .tar)         CT_DoExecLog FILE tar "${tar_opts[@]}" -f "${full_file}";;
-         /.git)        CT_ExtractGit "${basename}" "${@}";;
-+        "")           CT_DoExecLog FILE cp -a ${full_file}/. ${basename}/ ;;
-         *)            CT_DoLog WARN "Don't know how to handle '${basename}${ext}': unknown extension"
-                       return 1
-                       ;;
diff --git a/recipes/crosstool-ng/crosstool-ng-1.17.0/dmalloc-5.5.2-fix-recursion.patch b/recipes/crosstool-ng/crosstool-ng-1.17.0/dmalloc-5.5.2-fix-recursion.patch
deleted file mode 100644
index e67ffd1..0000000
--- a/recipes/crosstool-ng/crosstool-ng-1.17.0/dmalloc-5.5.2-fix-recursion.patch
+++ /dev/null
@@ -1,18 +0,0 @@ 
---- crosstool-ng-1.17.0~orig/patches/dmalloc/5.5.2/130-fix-recursion.patch 	2013-01-07 14:20:25.277907402 +0000
-+++ crosstool-ng-1.17.0/patches/dmalloc/5.5.2/130-fix-recursion.patch	2013-01-25 13:35:02.292399503 +0000
-@@ -0,0 +1,15 @@
-+diff --git a/malloc.c b/malloc.c
-+index 9a9477e..07db134 100644
-+--- a/malloc.c
-++++ b/malloc.c
-+@@ -1030,7 +1030,9 @@ int	dmalloc_free(const char *file, const int line, DMALLOC_PNT pnt,
-+ 		     const int func_id)
-+ {
-+   int		ret;
-+-  
-++  if(NULL==pnt)
-++    return FREE_NOERROR;
-++
-+   if (! dmalloc_in(file, line, 1)) {
-+     if (tracking_func != NULL) {
-+       tracking_func(file, line, func_id, 0, 0, pnt, NULL);
diff --git a/recipes/crosstool-ng/crosstool-ng-1.17.0/dmalloc-5.5.2-powerpc.patch b/recipes/crosstool-ng/crosstool-ng-1.17.0/dmalloc-5.5.2-powerpc.patch
deleted file mode 100644
index 86d7d40..0000000
--- a/recipes/crosstool-ng/crosstool-ng-1.17.0/dmalloc-5.5.2-powerpc.patch
+++ /dev/null
@@ -1,15 +0,0 @@ 
-diff -urN crosstool-ng-1.17.0~orig/patches/dmalloc/5.5.2/131-powerpc.patch crosstool-ng-1.17.0/patches/dmalloc/5.5.2/131-powerpc.patch
---- crosstool-ng-1.17.0~orig/patches/dmalloc/5.5.2/131-powerpc.patch	1970-01-01 01:00:00.000000000 +0100
-+++ crosstool-ng-1.17.0/patches/dmalloc/5.5.2/131-powerpc.patch	2012-12-17 20:55:29.864946447 +0100
-@@ -0,0 +1,11 @@
-+--- dmalloc-5.5.2/return.h~orig	2012-12-17 20:49:44.776955097 +0100
-++++ dmalloc-5.5.2/return.h	2012-12-17 20:49:58.720954747 +0100
-+@@ -251,8 +251,7 @@
-+ #define GET_RET_ADDR(file) \
-+ do { \
-+-  asm("mflr 0"); \
-+-  asm("stw 0,%0" : "=g" (file)); \
-++  asm("mflr %0" : "=g" (file)); \
-+ } while(0)
-+ 
-+ #endif /* __powerpc__ && __GNUC__ && !__OPTIMIZE__ */
diff --git a/recipes/crosstool-ng/crosstool-ng-1.17.0/eglibc-2_16-typedef-caddr.patch b/recipes/crosstool-ng/crosstool-ng-1.17.0/eglibc-2_16-typedef-caddr.patch
deleted file mode 100644
index a46ff03..0000000
--- a/recipes/crosstool-ng/crosstool-ng-1.17.0/eglibc-2_16-typedef-caddr.patch
+++ /dev/null
@@ -1,32 +0,0 @@ 
-diff -urN crosstool-ng-1.17.0.orig//patches/eglibc/2_16/910-typedef-caddr.patch crosstool-ng-1.17.0//patches/eglibc/2_16/910-typedef-caddr.patch
---- crosstool-ng-1.17.0.orig//patches/eglibc/2_16/910-typedef-caddr.patch	1970-01-01 01:00:00.000000000 +0100
-+++ crosstool-ng-1.17.0//patches/eglibc/2_16/910-typedef-caddr.patch	2011-11-08 09:37:02.717584509 +0100
-@@ -0,0 +1,28 @@
-+diff -urN eglibc-2_16-orig/posix/sys/types.h eglibc-2_16/posix/sys/types.h
-+--- eglibc-2_16-orig/posix/sys/types.h	2010-12-13 11:47:26.000000000 +0100
-++++ eglibc-2_16/posix/sys/types.h	2011-03-29 14:16:00.374064708 +0200
-+@@ -114,7 +114,10 @@
-+ #ifdef	__USE_BSD
-+ # ifndef __daddr_t_defined
-+ typedef __daddr_t daddr_t;
-++#  if ! defined(caddr_t) && ! defined(__caddr_t_defined)
-+ typedef __caddr_t caddr_t;
-++#   define __caddr_t_defined
-++#  endif
-+ #  define __daddr_t_defined
-+ # endif
-+ #endif
-+diff -urN eglibc-2_16-orig/sunrpc/rpc/types.h eglibc-2_16/sunrpc/rpc/types.h
-+--- eglibc-2_16-orig/sunrpc/rpc/types.h	2010-12-13 11:47:26.000000000 +0100
-++++ eglibc-2_16/sunrpc/rpc/types.h	2011-03-29 14:16:32.988910439 +0200
-+@@ -80,7 +80,10 @@
-+ #endif
-+ #ifndef __daddr_t_defined
-+ typedef __daddr_t daddr_t;
-++# if ! defined(caddr_t) && ! defined(__caddr_t_defined)
-+ typedef __caddr_t caddr_t;
-++#  define __caddr_t_defined
-++# endif
-+ # define __daddr_t_defined
-+ #endif
-+ 
diff --git a/recipes/crosstool-ng/crosstool-ng-1.17.0/elf2flt-for-build.patch b/recipes/crosstool-ng/crosstool-ng-1.17.0/elf2flt-for-build.patch
deleted file mode 100644
index cbb24b7..0000000
--- a/recipes/crosstool-ng/crosstool-ng-1.17.0/elf2flt-for-build.patch
+++ /dev/null
@@ -1,11 +0,0 @@ 
---- crosstool-ng-1.17.0/scripts/build/binutils/elf2flt.sh~orig	2012-12-08 14:19:00.016217802 +0100
-+++ crosstool-ng-1.17.0/scripts/build/binutils/elf2flt.sh	2012-12-08 14:19:13.792217455 +0100
-@@ -49,7 +49,7 @@
- 
-     elf2flt_opts+=( "host=${CT_BUILD}" )
-     elf2flt_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" )
--    elf2flt_opts+=( "binutils_bld=${CT_BUILD_DIR}/build-binutils-build-${CT_HOST}" )
-+    elf2flt_opts+=( "binutils_bld=${CT_BUILD_DIR}/build-binutils-build-${CT_BUILD}" )
- 
-     do_elf2flt_backend "${elf2flt_opts[@]}"
- 
diff --git a/recipes/crosstool-ng/crosstool-ng-1.17.0/libitm-mmx.patch b/recipes/crosstool-ng/crosstool-ng-1.17.0/libitm-mmx.patch
deleted file mode 100644
index ef9493d..0000000
--- a/recipes/crosstool-ng/crosstool-ng-1.17.0/libitm-mmx.patch
+++ /dev/null
@@ -1,16 +0,0 @@ 
-author Jacob Barsøe Kjærgaard
-to fix gcc 4.7.2 compile for mmx(only) supported x86 architectures
---- crosstool-ng-1.17.0~orig/patches/gcc/4.7.2/131-mmx.patch~	2012-04-04 17:51:15.000000000 +0200
-+++ crosstool-ng-1.17.0~orig/patches/gcc/4.7.2/131-mmx.patch	2013-06-26 13:17:01.814742630 +0+200
-@@ -0,0 +1,11 @@
-+--- gcc-4.7.2/libitm/config/x86/target.h~	2012-04-04 17:51:15.000000000 +0200
-++++ gcc-4.7.2/libitm/config/x86/target.h	2013-06-26 13:17:01.814742630 +0+200
-+@@ -77,6 +77,8 @@
-+ #  include <emmintrin.h>
-+ # elif defined(__SSE__)
-+ #  include <xmmintrin.h>
-++# elif defined(__MMX__)
-++#  include <mmintrin.h>
-+ # endif
-+ # ifdef __AVX__
-+ #  include <immintrin.h>
diff --git a/recipes/crosstool-ng/crosstool-ng-1.17.0/prefix.patch b/recipes/crosstool-ng/crosstool-ng-1.17.0/prefix.patch
deleted file mode 100644
index fdb0595..0000000
--- a/recipes/crosstool-ng/crosstool-ng-1.17.0/prefix.patch
+++ /dev/null
@@ -1,15 +0,0 @@ 
-diff -r 9303953d3983 ct-ng.in
---- a/ct-ng.in	Wed Sep 26 16:41:02 2012 +0200
-+++ b/ct-ng.in	Thu Sep 27 13:40:27 2012 +0200
-@@ -16,8 +16,9 @@
- 
- # Paths and values set by ./configure
- # Don't bother to change it other than with a new ./configure!
--export CT_LIB_DIR:=@@CT_LIBDIR@@
--export CT_DOC_DIR:=@@CT_DOCDIR@@
-+ct_prefix=$(shell dirname $(MAKEFILE_LIST))/..
-+export CT_LIB_DIR:=$(ct_prefix)@@CT_LIBDIR@@
-+export CT_DOC_DIR:=$(ct_prefix)@@CT_DOCDIR@@
- 
- # This is crosstool-NG version string
- export CT_VERSION:=@@CT_VERSION@@
diff --git a/recipes/crosstool-ng/crosstool-ng-1.17.0/uclibc-target-cflags-fixup.patch b/recipes/crosstool-ng/crosstool-ng-1.17.0/uclibc-target-cflags-fixup.patch
deleted file mode 100644
index bf23bff..0000000
--- a/recipes/crosstool-ng/crosstool-ng-1.17.0/uclibc-target-cflags-fixup.patch
+++ /dev/null
@@ -1,34 +0,0 @@ 
---- crosstool-ng-1.17.0/scripts/build/libc/uClibc.sh~orig	2013-04-12 12:48:08.218978664 +0200
-+++ crosstool-ng-1.17.0/scripts/build/libc/uClibc.sh	2013-04-12 13:03:06.394956155 +0200
-@@ -373,6 +373,31 @@
-             ;;
-     esac
- 
-+    # As we are building libc with cc-core-pass-2, which does not seem to
-+    # enforce proper arch selection, at least not on m68k (ColdFire), we pass
-+    # in any additional compiler flags needed.  We assume that float and abi
-+    # flags are handled properly without needing to fix them up here.
-+    if [ -n "${CT_ARCH_ARCH_CFLAG}" ] ; then
-+        cat <<-ENDSED
-+		s/^(UCLIBC_EXTRA_CFLAGS=".*)"$/\\1 ${CT_ARCH_ARCH_CFLAG}"/
-+		ENDSED
-+    fi
-+    if [ -n "${CT_ARCH_CPU_CFLAG}" ] ; then
-+        cat <<-ENDSED
-+		s/^(UCLIBC_EXTRA_CFLAGS=".*)"$/\\1 ${CT_ARCH_CPU_CFLAG}"/
-+		ENDSED
-+    fi
-+    if [ -n "${CT_ARCH_TUNE_CFLAG}" ] ; then
-+        cat <<-ENDSED
-+		s/^(UCLIBC_EXTRA_CFLAGS=".*)"$/\\1 ${CT_ARCH_TUNE_CFLAG}"/
-+		ENDSED
-+    fi
-+    if [ -n "${CT_ARCH_FPU_CFLAG}" ] ; then
-+        cat <<-ENDSED
-+		s/^(UCLIBC_EXTRA_CFLAGS=".*)"$/\\1 ${CT_ARCH_FPU_CFLAG}"/
-+		ENDSED
-+    fi
-+
-     # We always want ctor/dtor
-     cat <<-ENDSED
- 		s/^# (UCLIBC_CTOR_DTOR) is not set/\\1=y/
diff --git a/recipes/crosstool-ng/crosstool-ng-1.17.0/uclibceabi-instead-of-uclibcgnueabi.patch b/recipes/crosstool-ng/crosstool-ng-1.17.0/uclibceabi-instead-of-uclibcgnueabi.patch
deleted file mode 100644
index 2c3a1d8..0000000
--- a/recipes/crosstool-ng/crosstool-ng-1.17.0/uclibceabi-instead-of-uclibcgnueabi.patch
+++ /dev/null
@@ -1,45 +0,0 @@ 
-diff -urN crosstool-ng-1.17.0~orig/patches/binutils/2.17a/110-arm-eabi-conf.patch crosstool-ng-1.17.0/patches/binutils/2.17a/110-arm-eabi-conf.patch
---- crosstool-ng-1.17.0~orig/patches/binutils/2.17a/110-arm-eabi-conf.patch	2012-11-11 21:43:58.000000000 +0100
-+++ crosstool-ng-1.17.0/patches/binutils/2.17a/110-arm-eabi-conf.patch	2013-03-19 11:33:21.850001032 +0100
-@@ -6,7 +6,7 @@
-      noconfigdirs="$noconfigdirs target-libffi target-qthreads"
-      ;;
- -  arm*-*-linux-gnueabi)
--+  arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
-++  arm*-*-linux-*eabi)
-      noconfigdirs="$noconfigdirs target-libffi target-qthreads"
-      noconfigdirs="$noconfigdirs target-libjava target-libobjc"
-      ;;
-@@ -18,7 +18,7 @@
-      noconfigdirs="$noconfigdirs target-libffi target-qthreads"
-      ;;
- -  arm*-*-linux-gnueabi)
--+  arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
-++  arm*-*-linux-*eabi)
-      noconfigdirs="$noconfigdirs target-libffi target-qthreads"
-      noconfigdirs="$noconfigdirs target-libjava target-libobjc"
-      ;;
-diff -urN crosstool-ng-1.17.0~orig/patches/gcc/4.1.2/110-arm-eabi.patch crosstool-ng-1.17.0/patches/gcc/4.1.2/110-arm-eabi.patch
---- crosstool-ng-1.17.0~orig/patches/gcc/4.1.2/110-arm-eabi.patch	2012-11-11 21:43:58.000000000 +0100
-+++ crosstool-ng-1.17.0/patches/gcc/4.1.2/110-arm-eabi.patch	2013-03-19 11:32:36.394002172 +0100
-@@ -5,7 +5,7 @@
-  	tmake_file="${tmake_file} t-linux arm/t-arm"
-  	case ${target} in
- -	arm*-*-linux-gnueabi)
--+	arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
-++	arm*-*-linux-*eabi)
-  	    tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
-  	    tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi"
-    	    # The BPABI long long divmod functions return a 128-bit value in 
-diff -urN crosstool-ng-1.17.0~orig/scripts/build/arch/arm.sh crosstool-ng-1.17.0/scripts/build/arch/arm.sh
---- crosstool-ng-1.17.0~orig/scripts/build/arch/arm.sh	2012-11-11 21:43:58.000000000 +0100
-+++ crosstool-ng-1.17.0/scripts/build/arch/arm.sh	2013-03-19 11:31:45.018003460 +0100
-@@ -7,7 +7,7 @@
-     # The system part of the tuple:
-     case "${CT_LIBC},${CT_ARCH_ARM_EABI}" in
-         *glibc,y)   CT_TARGET_SYS=gnueabi;;
--        uClibc,y)   CT_TARGET_SYS=uclibcgnueabi;;
-+        uClibc,y)   CT_TARGET_SYS=uclibceabi;;
-         *,y)        CT_TARGET_SYS=eabi;;
-     esac
- 
diff --git a/recipes/crosstool-ng/crosstool-ng-github/darwin.patch b/recipes/crosstool-ng/crosstool-ng-github/darwin.patch
new file mode 100644
index 0000000..6be6749
--- /dev/null
+++ b/recipes/crosstool-ng/crosstool-ng-github/darwin.patch
@@ -0,0 +1,22 @@ 
+diff --git a/scripts/build/kernel/darwin.sh b/scripts/build/kernel/darwin.sh
+index 1dd332b..2742ebc 100644
+--- a/scripts/build/kernel/darwin.sh
++++ b/scripts/build/kernel/darwin.sh
+@@ -144,6 +144,8 @@ do_kernel_extract_minimal() {
+     cp -f -u $_SRC/usr/lib/libc.dylib $_TARGET/lib/system/
+     cp -f -u $_SRC/usr/lib/dylib1.o   $_TARGET/lib/system/
+ 
++    chmod u+rw -R .
++
+     CT_Popd
+ 
+     CT_EndStep
+@@ -172,6 +174,8 @@ do_kernel_extract_copy_sdk() {
+     [ -d System ] && rm -rf System
+     cp -a $_SRC/System System
+ 
++    chmod u+rw -R .
++
+     CT_Popd
+ 
+     CT_EndStep
diff --git a/recipes/crosstool-ng/crosstool-ng-github/make.patch b/recipes/crosstool-ng/crosstool-ng-github/make.patch
new file mode 100644
index 0000000..0c3a6d2
--- /dev/null
+++ b/recipes/crosstool-ng/crosstool-ng-github/make.patch
@@ -0,0 +1,377 @@ 
+diff --git a/scripts/build/companion_tools/050-make.sh b/scripts/build/companion_tools/050-make.sh
+index 6524e35..a5d072e 100644
+--- a/scripts/build/companion_tools/050-make.sh
++++ b/scripts/build/companion_tools/050-make.sh
+@@ -1,6 +1,6 @@
+ # Build script for make
+ 
+-CT_MAKE_VERSION=3.81
++CT_MAKE_VERSION=3.82
+ 
+ do_companion_tools_make_get() {
+     CT_GetFile "make-${CT_MAKE_VERSION}" \
+diff --git a/patches/make/3.82/0001-upstream_fixes-3.patch b/patches/make/3.82/0001-upstream_fixes-3.patch
+new file mode 100644
+index 0000000..4015aeb
+--- /dev/null
++++ b/patches/make/3.82/0001-upstream_fixes-3.patch
+@@ -0,0 +1,359 @@
++Submitted By:            Armin K. <krejzi at email dot com>
++Date:                    2012-09-19
++Initial Package Version: 3.82
++Upstream Status:         Fixed Upstream
++Origin:                  Upstream
++Description:             Several bug fixes from upstream cvs.
++
++--- make.orig/expand.c	2010-07-13 03:20:39.000000000 +0200
+++++ make/expand.c	2012-09-19 17:25:52.496989738 +0200
++@@ -197,7 +197,7 @@
++ {
++   struct variable *v;
++   const char *p, *p1;
++-  char *abuf = NULL;
+++  char *save;
++   char *o;
++   unsigned int line_offset;
++ 
++@@ -212,16 +212,11 @@
++       return (variable_buffer);
++     }
++ 
++-  /* If we want a subset of the string, allocate a temporary buffer for it.
++-     Most of the functions we use here don't work with length limits.  */
++-  if (length > 0 && string[length] != '\0')
++-    {
++-      abuf = xmalloc(length+1);
++-      memcpy(abuf, string, length);
++-      abuf[length] = '\0';
++-      string = abuf;
++-    }
++-  p = string;
+++  /* We need a copy of STRING: due to eval, it's possible that it will get
+++     freed as we process it (it might be the value of a variable that's reset
+++     for example).  Also having a nil-terminated string is handy.  */
+++  save = length < 0 ? xstrdup (string) : xstrndup (string, length);
+++  p = save;
++ 
++   while (1)
++     {
++@@ -411,8 +406,7 @@
++       ++p;
++     }
++ 
++-  if (abuf)
++-    free (abuf);
+++  free (save);
++ 
++   variable_buffer_output (o, "", 1);
++   return (variable_buffer + line_offset);
++--- make.orig/function.c	2010-07-13 03:20:39.000000000 +0200
+++++ make/function.c	2012-09-19 17:25:52.509989959 +0200
++@@ -706,7 +706,7 @@
++   const char *word_iterator = argv[0];
++   char buf[20];
++ 
++-  while (find_next_token (&word_iterator, (unsigned int *) 0) != 0)
+++  while (find_next_token (&word_iterator, NULL) != 0)
++     ++i;
++ 
++   sprintf (buf, "%d", i);
++@@ -1133,21 +1133,14 @@
++ 
++   /* Find the maximum number of words we'll have.  */
++   t = argv[0];
++-  wordi = 1;
++-  while (*t != '\0')
+++  wordi = 0;
+++  while ((p = find_next_token (&t, NULL)) != 0)
++     {
++-      char c = *(t++);
++-
++-      if (! isspace ((unsigned char)c))
++-        continue;
++-
+++      ++t;
++       ++wordi;
++-
++-      while (isspace ((unsigned char)*t))
++-        ++t;
++     }
++ 
++-  words = xmalloc (wordi * sizeof (char *));
+++  words = xmalloc ((wordi == 0 ? 1 : wordi) * sizeof (char *));
++ 
++   /* Now assign pointers to each string in the array.  */
++   t = argv[0];
++--- make.orig/job.c	2010-07-24 10:27:50.000000000 +0200
+++++ make/job.c	2012-09-19 17:25:52.509989959 +0200
++@@ -29,6 +29,15 @@
++ 
++ #include <string.h>
++ 
+++#if defined(__linux__) /* defined (HAVE_LINUX_BINFMTS_H) && defined (HAVE_SYS_USER_H) */
+++#include <sys/user.h>
+++#include <unistd.h>
+++#ifndef PAGE_SIZE
+++#define PAGE_SIZE sysconf(_SC_PAGE_SIZE)
+++#endif
+++#include <linux/binfmts.h>
+++#endif
+++
++ /* Default shell to use.  */
++ #ifdef WINDOWS32
++ #include <windows.h>
++@@ -2791,6 +2800,15 @@
++        argument list.  */
++ 
++     unsigned int shell_len = strlen (shell);
+++#ifdef MAX_ARG_STRLEN
+++    static char eval_line[] = "eval\\ \\\"set\\ x\\;\\ shift\\;\\ ";
+++#define ARG_NUMBER_DIGITS 5
+++#define EVAL_LEN (sizeof(eval_line)-1 + shell_len + 4 \
+++                 + (7 + ARG_NUMBER_DIGITS) * 2 * line_len / (MAX_ARG_STRLEN - 2))
+++#else
+++#define EVAL_LEN 0
+++#endif
+++    char *args_ptr;
++     unsigned int line_len = strlen (line);
++     unsigned int sflags_len = strlen (shellflags);
++     char *command_ptr = NULL; /* used for batch_mode_shell mode */
++@@ -2866,7 +2884,7 @@
++       }
++ 
++     new_line = alloca (shell_len + 1 + sflags_len + 1
++-                             + (line_len*2) + 1);
+++                             + (line_len*2) + 1 + EVAL_LEN);
++     ap = new_line;
++     memcpy (ap, shell, shell_len);
++     ap += shell_len;
++@@ -2875,6 +2893,30 @@
++     ap += sflags_len;
++     *(ap++) = ' ';
++     command_ptr = ap;
+++
+++#if !defined (WINDOWS32) && defined (MAX_ARG_STRLEN)
+++    if (unixy_shell && line_len > MAX_ARG_STRLEN)
+++      {
+++	unsigned j;
+++	memcpy (ap, eval_line, sizeof (eval_line) - 1);
+++	ap += sizeof (eval_line) - 1;
+++	for (j = 1; j <= 2 * line_len / (MAX_ARG_STRLEN - 2); j++)
+++	  ap += sprintf (ap, "\\$\\{%u\\}", j);
+++	*ap++ = '\\';
+++	*ap++ = '"';
+++	*ap++ = ' ';
+++	/* Copy only the first word of SHELL to $0.  */
+++	for (p = shell; *p != '\0'; ++p)
+++	  {
+++	    if (isspace ((unsigned char)*p))
+++	      break;
+++	    *ap++ = *p;
+++	  }
+++	*ap++ = ' ';
+++      }
+++#endif
+++    args_ptr = ap;
+++
++     for (p = line; *p != '\0'; ++p)
++       {
++ 	if (restp != NULL && *p == '\n')
++@@ -2922,6 +2964,14 @@
++           }
++ #endif
++ 	*ap++ = *p;
+++
+++#if !defined (WINDOWS32) && defined (MAX_ARG_STRLEN)
+++	if (unixy_shell && line_len > MAX_ARG_STRLEN && (ap - args_ptr > MAX_ARG_STRLEN - 2))
+++	  {
+++	    *ap++ = ' ';
+++	    args_ptr = ap;
+++	  }
+++#endif
++       }
++     if (ap == new_line + shell_len + sflags_len + 2)
++       /* Line was empty.  */
++--- make.orig/main.c	2010-07-19 09:10:53.000000000 +0200
+++++ make/main.c	2012-09-19 17:25:52.510989976 +0200
++@@ -1138,7 +1138,7 @@
++      a macro and some compilers (MSVC) don't like conditionals in macros.  */
++   {
++     const char *features = "target-specific order-only second-expansion"
++-                           " else-if shortest-stem undefine"
+++                           " else-if shortest-stem undefine oneshell"
++ #ifndef NO_ARCHIVES
++                            " archives"
++ #endif
++@@ -2088,12 +2088,17 @@
++ 
++           ++restarts;
++ 
+++          /* If we're re-exec'ing the first make, put back the number of
+++             job slots so define_makefiles() will get it right.  */
+++          if (master_job_slots)
+++            job_slots = master_job_slots;
+++
++           /* Reset makeflags in case they were changed.  */
++           {
++             const char *pv = define_makeflags (1, 1);
++             char *p = alloca (sizeof ("MAKEFLAGS=") + strlen (pv) + 1);
++             sprintf (p, "MAKEFLAGS=%s", pv);
++-            putenv (p);
+++            putenv (allocated_variable_expand (p));
++           }
++ 
++ 	  if (ISDB (DB_BASIC))
++@@ -2824,9 +2829,6 @@
++ 		       && (*(unsigned int *) cs->value_ptr ==
++ 			   *(unsigned int *) cs->noarg_value))
++ 		ADD_FLAG ("", 0); /* Optional value omitted; see below.  */
++-	      else if (cs->c == 'j')
++-		/* Special case for `-j'.  */
++-		ADD_FLAG ("1", 1);
++ 	      else
++ 		{
++ 		  char *buf = alloca (30);
++--- make.orig/read.c	2010-07-13 03:20:42.000000000 +0200
+++++ make/read.c	2012-09-19 17:25:52.511989993 +0200
++@@ -2904,6 +2904,7 @@
++       const char *name;
++       const char **nlist = 0;
++       char *tildep = 0;
+++      int globme = 1;
++ #ifndef NO_ARCHIVES
++       char *arname = 0;
++       char *memname = 0;
++@@ -3028,7 +3029,7 @@
++             {
++               /* This looks like the first element in an open archive group.
++                  A valid group MUST have ')' as the last character.  */
++-              const char *e = p + nlen;
+++              const char *e = p;
++               do
++                 {
++                   e = next_token (e);
++@@ -3084,19 +3085,19 @@
++          Go to the next item in the string.  */
++       if (flags & PARSEFS_NOGLOB)
++         {
++-          NEWELT (concat (2, prefix, tp));
+++          NEWELT (concat (2, prefix, tmpbuf));
++           continue;
++         }
++ 
++       /* If we get here we know we're doing glob expansion.
++          TP is a string in tmpbuf.  NLEN is no longer used.
++          We may need to do more work: after this NAME will be set.  */
++-      name = tp;
+++      name = tmpbuf;
++ 
++       /* Expand tilde if applicable.  */
++-      if (tp[0] == '~')
+++      if (tmpbuf[0] == '~')
++ 	{
++-	  tildep = tilde_expand (tp);
+++	  tildep = tilde_expand (tmpbuf);
++ 	  if (tildep != 0)
++             name = tildep;
++ 	}
++@@ -3112,32 +3113,40 @@
++ 	}
++ #endif /* !NO_ARCHIVES */
++ 
++-      switch (glob (name, GLOB_NOSORT|GLOB_ALTDIRFUNC, NULL, &gl))
++-	{
++-	case GLOB_NOSPACE:
++-	  fatal (NILF, _("virtual memory exhausted"));
++-
++-	case 0:
++-          /* Success.  */
++-          i = gl.gl_pathc;
++-          nlist = (const char **)gl.gl_pathv;
++-          break;
++-
++-        case GLOB_NOMATCH:
++-          /* If we want only existing items, skip this one.  */
++-          if (flags & PARSEFS_EXISTS)
++-            {
++-              i = 0;
++-              break;
++-            }
++-          /* FALLTHROUGH */
++-
++-	default:
++-          /* By default keep this name.  */
+++      /* glob() is expensive: don't call it unless we need to.  */
+++      if (!(flags & PARSEFS_EXISTS) && strpbrk (name, "?*[") == NULL)
+++        {
+++          globme = 0;
++           i = 1;
++           nlist = &name;
++-          break;
++-	}
+++        }
+++      else
+++        switch (glob (name, GLOB_NOSORT|GLOB_ALTDIRFUNC, NULL, &gl))
+++          {
+++          case GLOB_NOSPACE:
+++            fatal (NILF, _("virtual memory exhausted"));
+++
+++          case 0:
+++            /* Success.  */
+++            i = gl.gl_pathc;
+++            nlist = (const char **)gl.gl_pathv;
+++            break;
+++
+++          case GLOB_NOMATCH:
+++            /* If we want only existing items, skip this one.  */
+++            if (flags & PARSEFS_EXISTS)
+++              {
+++                i = 0;
+++                break;
+++              }
+++            /* FALLTHROUGH */
+++
+++          default:
+++            /* By default keep this name.  */
+++            i = 1;
+++            nlist = &name;
+++            break;
+++          }
++ 
++       /* For each matched element, add it to the list.  */
++       while (i-- > 0)
++@@ -3152,7 +3161,10 @@
++             else
++               {
++                 /* We got a chain of items.  Attach them.  */
++-                (*newp)->next = found;
+++                if (*newp)
+++                  (*newp)->next = found;
+++                else
+++                  *newp = found;
++ 
++                 /* Find and set the new end.  Massage names if necessary.  */
++                 while (1)
++@@ -3174,7 +3186,8 @@
++ #endif /* !NO_ARCHIVES */
++           NEWELT (concat (2, prefix, nlist[i]));
++ 
++-      globfree (&gl);
+++      if (globme)
+++        globfree (&gl);
++ 
++ #ifndef NO_ARCHIVES
++       if (arname)
++--- make.orig/remake.c	2010-07-13 03:20:42.000000000 +0200
+++++ make/remake.c	2012-09-19 17:26:09.116270849 +0200
++@@ -614,6 +614,10 @@
++                 d->file->dontcare = file->dontcare;
++               }
++ 
+++            /* We may have already considered this file, when we didn't know
+++               we'd need to update it.  Force update_file() to consider it and
+++               not prune it.  */
+++            d->file->considered = !considered;
++ 
++ 	    dep_status |= update_file (d->file, depth);
++ 
diff --git a/recipes/crosstool-ng/crosstool-ng-github/paths.patch b/recipes/crosstool-ng/crosstool-ng-github/paths.patch
new file mode 100644
index 0000000..7e796f6
--- /dev/null
+++ b/recipes/crosstool-ng/crosstool-ng-github/paths.patch
@@ -0,0 +1,42 @@ 
+diff -urN a/configure.ac b/configure.ac
+--- a/configure.ac	2013-10-02 20:06:22.000000000 +0200
++++ b/configure.ac	2013-10-07 23:48:40.255544293 +0200
+@@ -154,16 +154,16 @@
+ ACX_PATH_TOOL_REQ([READELF], [readelf])
+ ACX_PATH_TOOL_REQ([GPERF], [gperf])
+ 
+-ACX_CHECK_PROGS_REQ([bison], [bison])
+-ACX_CHECK_PROGS_REQ([flex], [flex])
+-ACX_CHECK_PROGS_REQ([makeinfo], [makeinfo])
+-ACX_CHECK_PROGS_REQ([cut], [cut])
+-ACX_CHECK_PROGS_REQ([stat], [stat])
+-ACX_CHECK_PROGS_REQ([readlink], [readlink])
+-ACX_CHECK_PROGS_REQ([wget], [wget])
+-ACX_CHECK_PROGS_REQ([tar], [tar])
+-ACX_CHECK_PROGS_REQ([gzip], [gzip])
+-ACX_CHECK_PROGS_REQ([bzip2], [bzip2])
++ACX_PATH_TOOL_REQ([bison], [bison])
++ACX_PATH_TOOL_REQ([flex], [flex])
++ACX_PATH_TOOL_REQ([makeinfo], [makeinfo])
++ACX_PATH_TOOL_REQ([cut], [cut])
++ACX_PATH_TOOL_REQ([stat], [stat])
++ACX_PATH_TOOL_REQ([readlink], [readlink])
++ACX_PATH_TOOL_REQ([wget], [wget])
++ACX_PATH_TOOL_REQ([tar], [tar])
++ACX_PATH_TOOL_REQ([gzip], [gzip])
++ACX_PATH_TOOL_REQ([bzip2], [bzip2])
+ 
+ #--------------------------------------------------------------------
+ # Still boring, but remember the path, now...
+diff -urN a/scripts/build/internals.sh b/scripts/build/internals.sh
+--- a/scripts/build/internals.sh	2013-10-02 20:06:23.000000000 +0200
++++ b/scripts/build/internals.sh	2013-10-08 00:10:06.664945772 +0200
+@@ -26,7 +26,7 @@
+         # Strip gdbserver
+         if [ "${CT_GDB_GDBSERVER}" = "y" ]; then
+             CT_DoExecLog ALL "${CT_TARGET}-strip" ${strip_args}         \
+-                             "${CT_TARGET}/debug-root/usr/bin/gdbserver"
++                             "${CT_TARGET}/debug-root/usr/bin/gdbserver"*
+         fi
+         # We can not use the version in CT_CC_GCC_VERSION because
+         # of the Linaro stuff. So, harvest the version string
diff --git a/recipes/crosstool-ng/crosstool-ng.inc b/recipes/crosstool-ng/crosstool-ng.inc
index c98e875..2e274ae 100644
--- a/recipes/crosstool-ng/crosstool-ng.inc
+++ b/recipes/crosstool-ng/crosstool-ng.inc
@@ -2,7 +2,7 @@ 
 
 RECIPE_TYPES = "native"
 
-inherit c autotools
+inherit c autotools-autoreconf
 
 SRC_URI = "http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-${PV}.tar.bz2"
 
@@ -10,3 +10,18 @@  SRC_URI = "http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-${PV}.tar.
 SRC_URI_FIXES_BASE = "http://crosstool-ng.org/download/crosstool-ng/01-fixes/${PV}/"
 
 FILES_${PN} += "${libdir}/ct-ng*"
+
+do_autoreconf () {
+    ./bootstrap
+}
+
+do_configure () {
+    if [ -x "${S}/configure" ] ; then
+        LIBTOOLIZE="" MAKE="" ${S}/configure --prefix="${D}/${prefix}"
+    else
+        oefatal "no configure script found"
+    fi
+}
+
+PARALLEL_MAKE = ""
+MAKE_DESTDIR = ""
diff --git a/recipes/crosstool-ng/crosstool-ng_1.17.0.oe b/recipes/crosstool-ng/crosstool-ng_1.17.0.oe
deleted file mode 100644
index e7605ff..0000000
--- a/recipes/crosstool-ng/crosstool-ng_1.17.0.oe
+++ /dev/null
@@ -1,38 +0,0 @@ 
-## Recipe for building crosstool-ng
-##
-## For details on how crosstool-ng works, and what is is, see
-## http://crosstool-ng.org/.
-
-require ${PN}.inc
-
-# Official fixes
-SRC_URI += "${SRC_URI_FIXES_BASE}/000-scripts_unquoted_variable_reference_in_glibc_eglibc_sh_common.patch"
-SRC_URI += "${SRC_URI_FIXES_BASE}/001-scripts_fail_on_in_paths.patch"
-SRC_URI += "${SRC_URI_FIXES_BASE}/002-scripts_functions_fix_debug_shell.patch"
-
-# Unofficial fixes
-SRC_URI += "file://prefix.patch"
-SRC_URI += "file://elf2flt-for-build.patch"
-SRC_URI += "file://canadian-skip-cc-core.patch"
-SRC_URI += "file://dir-extract-with-copy.patch"
-SRC_URI += "file://dmalloc-5.5.2-powerpc.patch"
-SRC_URI += "file://dmalloc-5.5.2-fix-recursion.patch"
-SRC_URI += "file://eglibc-2_16-typedef-caddr.patch"
-SRC_URI += "file://uclibceabi-instead-of-uclibcgnueabi.patch"
-SRC_URI += "file://uclibc-target-cflags-fixup.patch"
-SRC_URI += "file://libitm-mmx.patch"
-
-#We have to use make_3.81 for now, since 3.82 makes at least
-#glibc install fail, trying to install headers to /
-DEPENDS += "native:make_3.81"
-
-# For some odd reason, ct-NG configure scripts end up setting make path
-# to just "make" and not the full path.  And even more odd, this breaks
-# build by (oddest of all) GMP configure hang in conftest.make execution.
-do_configure () {
-	autotools_configure --with-make=`which make`
-}
-
-# Local Variables:
-# mode: python
-# End:
diff --git a/recipes/crosstool-ng/crosstool-ng_1.17.0.oe.sig b/recipes/crosstool-ng/crosstool-ng_1.17.0.oe.sig
deleted file mode 100644
index 356bd9f..0000000
--- a/recipes/crosstool-ng/crosstool-ng_1.17.0.oe.sig
+++ /dev/null
@@ -1,4 +0,0 @@ 
-64c9fc2559705b446d38c201086dfb8264f4e223  000-scripts_unquoted_variable_reference_in_glibc_eglibc_sh_common.patch
-88451bf5594af696025e9482c037bef1b153b104  001-scripts_fail_on_in_paths.patch
-e45177804a58ffff95f0ae986bd69a48a9b0af4e  002-scripts_functions_fix_debug_shell.patch
-39a8d075bb8106fbc25e537a147228253dbf8cb7  crosstool-ng-1.17.0.tar.bz2
diff --git a/recipes/crosstool-ng/crosstool-ng_github.oe b/recipes/crosstool-ng/crosstool-ng_github.oe
new file mode 100644
index 0000000..c9bcd62
--- /dev/null
+++ b/recipes/crosstool-ng/crosstool-ng_github.oe
@@ -0,0 +1,11 @@ 
+# -*- mode:python; -*-
+
+require ${PN}.inc
+
+SRC_URI = "git://github.com/diorcety/crosstool-ng;protocol=http;commit=90d460ac91638d494029333c912484e5cf7546c6"
+
+S = "${SRCDIR}/${PN}"
+
+SRC_URI += "file://paths.patch"
+SRC_URI += "file://make.patch"
+SRC_URI += "file://darwin.patch"
diff --git a/recipes/crosstool-ng/gcc-1.17/300-mingw32.config b/recipes/crosstool-ng/gcc-1.17/300-mingw32.config
deleted file mode 100644
index 25d59c5..0000000
--- a/recipes/crosstool-ng/gcc-1.17/300-mingw32.config
+++ /dev/null
@@ -1,152 +0,0 @@ 
-#
-# Operating System
-#
-CT_KERNEL_mingw32=y
-# CT_W32API_V_select is not set
-CT_W32API_VERSION=""
-
-#
-# Common kernel options
-#
-
-#
-# Binary utilities
-#
-CT_ARCH_BINFMT_ELF=y
-# CT_ARCH_BINFMT_FLAT is not set
-# CT_ARCH_BINFMT_FDPIC is not set
-
-#
-# GNU binutils
-#
-CT_BINUTILS_VERSION=""
-CT_BINUTILS_EXTRA_CONFIG_ARRAY=""
-# CT_BINUTILS_FOR_TARGET is not set
-
-#
-# sstrip
-#
-# CT_SSTRIP is not set
-
-#
-# C compiler
-#
-CT_CC_VERSION=""
-CT_CC_gcc=y
-CT_CC_GCC_SHOW_LINARO=y
-CT_CC_ENABLE_CXX_FLAGS=""
-CT_CC_CORE_EXTRA_CONFIG=""
-CT_CC_EXTRA_CONFIG=""
-
-#
-# Additional supported languages:
-#
-CT_CC_LANG_CXX=y
-# CT_CC_LANG_JAVA is not set
-# CT_CC_LANG_ADA is not set
-# CT_CC_LANG_OBJC is not set
-# CT_CC_LANG_OBJCXX is not set
-CT_CC_LANG_OTHERS=""
-
-#
-# gcc other options
-#
-# CT_CC_GCC_ENABLE_TARGET_OPTSPACE is not set
-# CT_CC_GCC_USE_GRAPHITE is not set
-# CT_CC_GCC_USE_LTO is not set
-# CT_CC_STATIC_LIBSTDCXX is not set
-# CT_CC_GCC_LIBMUDFLAP is not set
-# CT_CC_GCC_LIBGOMP is not set
-# CT_CC_GCC_LIBSSP is not set
-
-#
-# Misc. obscure options.
-#
-CT_CC_CXA_ATEXIT=y
-CT_CC_GCC_DISABLE_PCH=y
-CT_CC_GCC_SJLJ_EXCEPTIONS=y
-CT_CC_GCC_LDBL_128=y
-
-#
-# C-library
-#
-CT_LIBC="mingw"
-# CT_LIBC_eglibc is not set
-# CT_LIBC_glibc is not set
-CT_LIBC_mingw=y
-# CT_LIBC_newlib is not set
-# CT_LIBC_none is not set
-# CT_LIBC_uClibc is not set
-CT_LIBC_eglibc_AVAILABLE=y
-CT_LIBC_glibc_AVAILABLE=y
-CT_LIBC_mingw_AVAILABLE=y
-# CT_MINGWRT_V_select is not set
-CT_MINGWRT_VERSION=""
-CT_LIBC_newlib_AVAILABLE=y
-# CT_LIBC_NEWLIB_CVS is not set
-CT_LIBC_none_AVAILABLE=y
-CT_LIBC_uClibc_AVAILABLE=y
-CT_LIBC_SUPPORT_THREADS_ANY=y
-# CT_LIBC_SUPPORT_NPTL is not set
-# CT_LIBC_SUPPORT_LINUXTHREADS is not set
-CT_LIBC_SUPPORT_WIN32THREADS=y
-CT_THREADS="none"
-
-#
-# Common C library options
-#
-# CT_THREADS_NPTL is not set
-# CT_THREADS_LINUXTHREADS is not set
-# CT_THREADS_WIN32THREADS is not set
-CT_THREADS_NONE=y
-CT_LIBC_XLDD=y
-
-#
-# mingw other options
-#
-# CT_MINGW_DIRECTX is not set
-# CT_MINGW_OPENGL is not set
-CT_MINGW_PDCURSES=y
-CT_MINGW_PDCURSES_VERSION=""
-# CT_MINGW_GNURX is not set
-
-#
-# Debug facilities
-#
-# CT_DEBUG_dmalloc is not set
-# CT_DEBUG_duma is not set
-# CT_DEBUG_gdb is not set
-# CT_DEBUG_ltrace is not set
-# CT_DEBUG_strace is not set
-
-#
-# gdb version
-#
-CT_DEBUG_GDB_SHOW_LINARO=y
-CT_GDB_VERSION=""
-# CT_DEBUG_ltrace is not set
-CT_LTRACE_VERSION=""
-# CT_DEBUG_strace is not set
-CT_STRACE_VERSION=""
-
-#
-# Companion libraries
-#
-
-#
-# FIXME: check real dependencies!!!
-#
-CT_COMPLIBS=y
-CT_GMP_VERSION=""
-CT_MPFR_VERSION=""
-CT_PPL_VERSION=""
-CT_CLOOG_VERSION=""
-CT_MPC_VERSION=""
-CT_LIBELF_VERSION=""
-
-#
-# Companion libraries common options
-#
-# CT_COMPLIBS_BACKUP is not set
-# CT_COMPLIBS_CHECK is not set
-# CT_COMPLIBS_SHARED is not set
diff --git a/recipes/crosstool-ng/gcc-compile.inc b/recipes/crosstool-ng/gcc-compile.inc
index 7cbc870..0d25b10 100644
--- a/recipes/crosstool-ng/gcc-compile.inc
+++ b/recipes/crosstool-ng/gcc-compile.inc
@@ -35,12 +35,19 @@  CXX_DEPENDS:cross	= ""
 CXX_DEPENDS:sdk-cross	= ""
 
 BLACKLIST_VAR += "LD_LIBRARY_PATH"
+BLACKLIST_VAR += "DYLD_LIBRARY_PATH"
 
 # FIXME: add crosstool-ng and OE-lite support for x86 -mfpmath option
+# Use built in libtool
+# DEPENDS += "native:libtool"
+pkgltdldir = "${STAGE_DIR}/native${stage_datadir}/libtool"
 
 do_compile[cleandirs] = "${B}/targets"
 do_compile[dirs] = "${B}/targets ${B}"
 do_compile () {
+        if [ -d "${pkgltdldir}" ] ; then
+            export _lt_pkgdatadir="${pkgltdldir}"
+        fi
 	if [ ! -e targets/tarballs ] ; then
 		ln -s ${SRCDIR} targets/tarballs
 	fi
diff --git a/recipes/crosstool-ng/gcc-configure.inc b/recipes/crosstool-ng/gcc-configure.inc
index 1548e0b..db83582 100644
--- a/recipes/crosstool-ng/gcc-configure.inc
+++ b/recipes/crosstool-ng/gcc-configure.inc
@@ -1,9 +1,9 @@ 
 # -*- mode:python; -*-
 
 SRC_URI =+ "file://000-misc.config \
-	    file://100-${DEFCONFIG_CPU}.config \
-	    file://200-toolchain.config \
-	    file://300-${DEFCONFIG_OS}.config"
+        file://100-${DEFCONFIG_CPU}.config \
+        file://200-toolchain.config \
+        file://300-${DEFCONFIG_OS}.config"
 
 DEFCONFIG_CPU				= "${TARGET_CPU}"
 DEFCONFIG_CPU:TARGET_CPU_i386		= "x86"
@@ -13,30 +13,45 @@  DEFCONFIG_CPU:TARGET_CPU_i686		= "x86"
 DEFCONFIG_CPU:TARGET_CPU_i786		= "x86"
 
 # FIXME: find a proper solution for this gnueabi mess
-DEFCONFIG_OS = "${TARGET_OS}"
+DEFCONFIG_OS				= "${@re.sub('darwin.*', 'darwin', d.get('TARGET_OS'))}"
 DEFCONFIG_OS:TARGET_LIBC_glibc		= "linux-glibc"
 DEFCONFIG_OS:TARGET_LIBC_uclibc		= "linux-uclibc"
 
 _CT_KERNEL_V			= "CT_KERNEL_V"
-_CT_KERNEL_V:TARGET_OS_mingw32	= "CT_W32API_V"
 _CT_BINUTILS_V			= "CT_BINUTILS_V"
-_CT_CC_V			= "CT_CC_V"
+_CT_CC_GCC_V			= "CT_CC_GCC_V"
+_CT_CC_CLANG_V			= "CT_CC_CLANG_V"
+_CT_LLVM_V			= "CT_LLVM_V"
 _CT_LIBC_V			= "CT_LIBC_${@d.getVar('CT_LIBC',1).upper()}_V"
-_CT_LIBC_V:TARGET_OS_mingw32	= "CT_MINGWRT_V"
+_CT_LIBC_V:TARGET_LIBC_mingw	= "CT_WINAPI_V"
 _CT_GDB_V			= "CT_GDB_V"
 _CT_GMP_V			= "CT_GMP_V"
 _CT_MPFR_V			= "CT_MPFR_V"
 _CT_PPL_V			= "CT_PPL_V"
 _CT_CLOOG_V			= "CT_CLOOG_V"
+_CT_ISL_V			= "CT_ISL_V"
 _CT_MPC_V			= "CT_MPC_V"
 _CT_LIBELF_V			= "CT_LIBELF_V"
 _CT_LTRACE_V			= "CT_LTRACE_V"
 _CT_STRACE_V			= "CT_STRACE_V"
-_CT_MINGW_PDCURSES_V		= "CT_MINGW_PDCURSES_V"
 _CT_DMALLOC_V			= "CT_DMALLOC_V"
-
-_CT_LIBC_VERSION		= "CT_LIBC_VERSION"
-_CT_LIBC_VERSION:TARGET_OS_mingw32 = "CT_MINGWRT_VERSION"
+_CT_DARWIN_MAC_OSX_V		= "CT_DARWIN_MAC_OSX_V"
+
+_CT_LIBC_VERSION			= "CT_LIBC_VERSION"
+_CT_LIBC_VERSION:TARGET_LIBC_mingw 	= "CT_WINAPI_VERSION"
+
+# Darwin stuff
+AUTO_CT_STRING_VARS:>TARGET_KERNEL_darwin	= " CT_DARWIN_VERSION CT_DARWIN_SDK_PATH CT_DARWIN_SDK"
+CT_DARWIN_MAC_OSX_VERSION	= "${CT_KERNEL_VERSION}"
+CT_DARWIN_SDK_PATH		= "${TOPDIR}/sdks/${CT_DARWIN_SDK}"
+CT_DARWIN_VERSION		= "${@get_darwin_version(d)}"
+CT_DARWIN_VERSION[import]	= "get_darwin_version"
+def get_darwin_version(d):
+  g = re.search(r'(\d+)$', d.getVar('TARGET_OS'))
+  if g:
+    return g.group(1)
+  else:
+    return "10"
 
 AUTO_CT_BOOLEAN_VARS += "CT_CROSS"
 CT_CROSS:cross			= "y"
@@ -56,13 +71,13 @@  CT_COMP_LIBS_TARGET:sdk-cross	= "y"
 AUTO_CT_BOOLEAN_VARS += "CT_DEBUG_gdb"
 
 AUTO_CT_BOOLEAN_VARS += "CT_GDB_GDBSERVER"
-CT_GDB_GDBSERVER:cross		= "y"
+CT_GDB_GDBSERVER:cross			= "y"
 
 AUTO_CT_BOOLEAN_VARS += "CT_GDB_CROSS"
-CT_GDB_CROSS:canadian-cross	= "y"
-RECIPE_FLAGS:>cross                  += " toolchain_cross_gdb"
-CT_GDB_CROSS:USE_toolchain_cross_gdb  = "y"
-DEPENDS:>USE_toolchain_cross_gdb      = " host:libexpat"
+CT_GDB_CROSS:canadian-cross		= "y"
+RECIPE_FLAGS:>cross			+= " toolchain_cross_gdb"
+CT_GDB_CROSS:USE_toolchain_cross_gdb	= "y"
+DEPENDS:>USE_toolchain_cross_gdb	= " host:libexpat"
 
 AUTO_CT_BOOLEAN_VARS += "CT_GDB_NATIVE"
 CT_GDB_NATIVE:machine		= "y"
@@ -81,6 +96,7 @@  AUTO_CT_BOOLEAN_VARS:>USE_toolchain_ltrace = " CT_DEBUG_ltrace"
 CT_DEBUG_ltrace:cross			= "y"
 CT_DEBUG_ltrace:TARGET_LIBC_uclibc	= ""
 CT_DEBUG_ltrace:TARGET_LIBC_mingw	= ""
+CT_DEBUG_ltrace:TARGET_KERNEL_darwin	= ""
 
 RECIPE_FLAGS += "toolchain_threads"
 AUTO_CT_BOOLEAN_VARS:>TARGET_LIBC_uclibc = "CT_THREADS"
@@ -93,6 +109,7 @@  AUTO_CT_BOOLEAN_VARS:>USE_toolchain_strace = " CT_DEBUG_strace"
 CT_DEBUG_strace:cross			= "y"
 CT_DEBUG_strace:TARGET_LIBC_uclibc	= ""
 CT_DEBUG_strace:TARGET_LIBC_mingw	= ""
+CT_DEBUG_strace:TARGET_KERNEL_darwin	= ""
 
 RECIPE_FLAGS += "toolchain_dmalloc"
 AUTO_CT_BOOLEAN_VARS:>USE_toolchain_dmalloc = " CT_DEBUG_dmalloc"
@@ -143,6 +160,9 @@  CT_TARGET_CFLAGS		= "${TARGET_CFLAGS_OPT}"
 
 AUTO_CT_STRING_VARS += "CT_ARCH_ARCH"
 CT_ARCH_ARCH			= "${TARGET_MARCH}"
+CT_ARCH_ARCH:TARGET_KERNEL_darwin   = ""
+TARGET_MTUNE			= ""
+TARGET_MTUNE:TARGET_KERNEL_darwin	= "${TARGET_MARCH}"
 
 AUTO_CT_STRING_VARS += "CT_ARCH_CPU"
 CT_ARCH_CPU			= "${TARGET_MCPU}"
@@ -156,6 +176,9 @@  CT_LOCAL_PATCH_DIR		= "${S}"
 AUTO_CT_STRING_VARS += "CT_LIBC_UCLIBC_CONFIG_FILE"
 CT_LIBC_UCLIBC_CONFIG_FILE:TARGET_LIBC_uclibc = "${SRCDIR}/uClibc-${CT_LIBC_VERSION}.config"
 
+AUTO_CT_BOOLEAN_VARS += "CT_LLVM CT_LLVM_COMPILER_RT"
+AUTO_CT_BOOLEAN_VARS += "CT_CC_clang"
+
 addhook gcc_select_gdb to post_recipe_parse first after set_useflags
 def gcc_select_gdb(d):
     for var in ("CT_GDB_GDBSERVER", "CT_GDB_CROSS", "CT_GDB_NATIVE"):
@@ -167,7 +190,7 @@  do_configure[cleandirs] = "${B}"
 do_configure[dirs] = "${B}"
 do_configure () {
         cp defconfig .config
-        ${CT_NG} oldconfig
+        ct-ng oldconfig
 }
 
 do_configure[prefuncs] += "do_configure_defconfig"
@@ -225,11 +248,14 @@  def do_configure_defconfig(d):
         version = d.get("CT_%s_VERSION"%(component.upper(),))
         assert isinstance(version, str)
         version = re.sub(r"[.\-]", "_", version)
+        version = "_".join(version.split("_")[:3])
         version_prefix = d.get("_CT_%s_V"%(component.upper(),))
         assert isinstance(version_prefix, str)
         version_var = (d.get("_CT_%s_VERSION"%(component.upper())) or
                        "CT_%s_VERSION"%(component.upper()))
         assert isinstance(version_var, str)
+        if d.get("TARGET_OS") == "darwin" and component == "cc_gcc":
+            version = "apple_" + version
         print "version_rewrite %r"%((version_var, version_prefix + "_" + version, "y"),)
         return (version_var, version_prefix + "_" + version, "y")
 
@@ -244,11 +270,19 @@  def do_configure_defconfig(d):
         rewrites.append(version_rewrite("kernel"))
         rewrites.append(("CT_KERNEL_LINUX_INSTALL", "y"))
 
-    for component in ("cc", "binutils", "libc", "gdb", "gmp", "mpfr", "mpc",
-                      "ppl", "cloog", "libelf", "ltrace", "strace",
-                      "mingw_pdcurses", "dmalloc"):
+    for component in ("cc_gcc", "cc_clang", "llvm", "binutils", "libc", "gdb", "gmp", "mpfr", "mpc",
+                      "ppl", "cloog", "isl", "libelf", "ltrace", "strace", "dmalloc", "darwin_mac_osx"):
         rewrites.append(version_rewrite(component))
 
+    gcc_version = d.get("GCC_VERSION")
+    if gcc_version.startswith("linaro-"):
+        gcc_version = gcc_version[len("linaro-"):]
+    v = map(int, gcc_version.split("-")[0].split("."))
+    if v[0] == 4:
+        if v[1] >= 3:
+            rewrites.append(("CT_CC_GCC_USE_GMP_MPFR", "y"))
+	    rewrites.append(("CT_CC_GCC_USE_GRAPHITE", "y"))
+
     ct_libc = d.get("CT_LIBC")
     if ct_libc in ("glibc", "eglibc"):
         kernel_version = d.get("CT_KERNEL_VERSION")
@@ -321,7 +355,7 @@  def do_configure_qa(d):
         ok = ok and check_version(d.get("_CT_KERNEL_V") + "ERSION",
                                   kernel_version)
     ok = ok and check_version("CT_BINUTILS_VERSION")
-    ok = ok and check_version("CT_CC_VERSION")
+    ok = ok and check_version("CT_CC_GCC_VERSION")
     ok = ok and check_version(d.get("_CT_LIBC_VERSION"),
                               d.get("CT_LIBC_VERSION"))
     if d.get("CT_DEBUG_gdb"):
@@ -336,14 +370,18 @@  def do_configure_qa(d):
         ok = ok and check_version("CT_PPL_VERSION")
     if d.get("CT_USE_CLOOG"):
         ok = ok and check_version("CT_CLOOG_VERSION")
+    if d.get("CT_USE_ISL"):
+        ok = ok and check_version("CT_ISL_VERSION")
     if d.get("CT_USE_LIBELF"):
         ok = ok and check_version("CT_LIBELF_VERSION")
     if d.get("CT_DEBUG_ltrace"):
         ok = ok and check_version("CT_LTRACE_VERSION")
     if d.get("CT_DEBUG_strace"):
         ok = ok and check_version("CT_STRACE_VERSION")
-    if d.get("CT_USE_PDCURSES"):
-        ok = ok and check_version("CT_MINGW_PDCURSES_VERSION")
     if d.get("CT_DEBUG_dmalloc"):
         ok = ok and check_version("CT_DMALLOC_VERSION")
+    if d.get("CT_CC_clang"):
+        ok = ok and check_version("CT_CC_CLANG_VERSION")
+    if d.get("CT_LLVM"):
+        ok = ok and check_version("CT_LLVM_VERSION")
     return ok
diff --git a/recipes/crosstool-ng/gcc-fetch.inc b/recipes/crosstool-ng/gcc-fetch.inc
index d8cb778..241eef7 100644
--- a/recipes/crosstool-ng/gcc-fetch.inc
+++ b/recipes/crosstool-ng/gcc-fetch.inc
@@ -6,19 +6,72 @@  require conf/fetch/debian.conf
 require conf/fetch/mpfr.conf
 require conf/fetch/sourceforge.conf
 
-SRC_URI += "${SRC_URI_GCC}"
-SRC_URI_GCC ?= "${GNU_MIRROR}/gcc/gcc-${CT_CC_VERSION}/gcc-${CT_CC_VERSION}.tar.bz2;unpack=0"
-
-SRC_URI += "${SRC_URI_BINUTILS}"
+#Companion tools
+SRC_URI += "http://ftp.gnu.org/gnu/make/make-3.82.tar.gz;unpack=0"
+SRC_URI += "http://ftp.gnu.org/gnu/m4/m4-1.4.13.tar.gz;unpack=0"
+SRC_URI += "http://ftp.gnu.org/gnu/autoconf/autoconf-2.65.tar.gz;unpack=0"
+SRC_URI += "http://ftp.gnu.org/gnu/automake/automake-1.11.1.tar.gz;unpack=0"
+SRC_URI += "http://ftp.gnu.org/gnu/libtool/libtool-2.2.6b.tar.gz;unpack=0"
+
+SRC_URI += "${SRC_URI_GCC_COM}"
+SRC_URI_GCC_COM = "${SRC_URI_GCC}"
+SRC_URI_GCC_COM:TARGET_KERNEL_darwin = "${SRC_URI_GCC_APPLE}"
+SRC_URI_GCC ?= "${GNU_MIRROR}/gcc/gcc-${CT_CC_GCC_VERSION}/gcc-${CT_CC_GCC_VERSION}.tar.bz2;unpack=0"
+SRC_URI_GCC_APPLE ?= "http://opensource.apple.com/tarballs/gcc/gcc-${CT_CC_GCC_VERSION}.tar.gz;unpack=0"
+
+SRC_URI += "${SRC_URI_BINUTILS_COM}"
+SRC_URI_BINUTILS_COM = "${SRC_URI_BINUTILS}"
+SRC_URI_BINUTILS_COM:TARGET_KERNEL_darwin = "${SRC_URI_BINUTILS_APPLE}"
 SRC_URI_BINUTILS = "${GNU_MIRROR}/binutils/binutils-${CT_BINUTILS_VERSION}.tar.bz2;unpack=0"
+SRC_URI_BINUTILS_APPLE = "\
+http://opensource.apple.com/tarballs/cctools/cctools-${CT_BINUTILS_VERSION}.tar.gz;unpack=0 \
+http://opensource.apple.com/tarballs/ld64/ld64-127.2.tar.gz;unpack=0 \
+http://opensource.apple.com/tarballs/dyld/dyld-210.2.3.tar.gz;unpack=0 \
+"
+
+SRC_URI_CLANG ??= ""
+SRC_URI:>USE_toolchain_llvm = " ${SRC_URI_LLVM}"
+SRC_URI:>USE_toolchain_clang = " ${SRC_URI_LLVM} ${SRC_URI_CLANG}"
+SRC_URI:>TARGET_KERNEL_darwin = " ${SRC_URI_LLVM}"
+SRC_URI_LLVM ??= ""
+SRC_URI:>USE_toolchain_llvm_compiler_rt = " ${SRC_URI_LLVM_COMPILER_RT}"
+SRC_URI_LLVM_COMPILER_RT ??= "" 
+
+addhook set_clang_url to post_recipe_parse after libc_useflags before fetch_init
+def set_clang_url(d):
+    versionStr = d.get("CLANG_VERSION")
+    if not versionStr:
+        return
+    version = tuple(map(int, versionStr.split(".")))
+    suffix = ""
+    name = "clang"
+    if version[0] >= 3 and version[1] >= 1:
+        suffix = ".src"
+    if version[0] == 3 and version[1] == 3:
+        name = "cfe"
+    d.set("SRC_URI_CLANG", "http://llvm.org/releases/" + versionStr + "/" + name + "-" + versionStr + suffix + ".tar.gz;unpack=0")
+
+addhook set_llvm_url to post_recipe_parse after libc_useflags before fetch_init
+def set_llvm_url(d):
+    versionStr = d.get("CT_LLVM_VERSION")
+    if not versionStr:
+        return
+    version = tuple(map(int, versionStr.split(".")))
+    suffix = ""
+    if version[0] >= 3 and version[1] >= 1:
+        suffix= ".src"
+    d.set("SRC_URI_LLVM", "http://llvm.org/releases/" + versionStr + "/llvm-" + versionStr + suffix + ".tar.gz;unpack=0")
+    d.set("SRC_URI_LLVM_COMPILER_RT", "http://llvm.org/releases/" + versionStr + "/compiler-rt-" + versionStr + suffix + ".tar.gz;unpack=0")
+
 
 SRC_URI_GLIBC = "${GNU_MIRROR}/glibc/glibc-${CT_LIBC_VERSION}.tar.bz2;unpack=0 \
-	git://sourceware.org/git/glibc-ports.git;tag=glibc-${CT_LIBC_VERSION}"
-SRC_URI_GLIBC:TARGET_OS_mingw32 = ""
+       git://sourceware.org/git/glibc-ports.git;tag=glibc-${CT_LIBC_VERSION}"
+SRC_URI_GLIBC:TARGET_LIBC_mingw = ""
+SRC_URI_GLIBC:TARGET_KERNEL_darwin = ""
 
 CT_EGLIBC_REVISION ?= ""
 SRC_URI_EGLIBC = "svn://www.eglibc.org/svn/branches/eglibc-${CT_LIBC_VERSION};protocol=http;rev=${CT_EGLIBC_REVISION}"
-SRC_URI_EGLIBC:TARGET_OS_mingw32 = ""
+SRC_URI_EGLIBC:TARGET_LIBC_mingw = ""
 
 SRC_URI_UCLIBC = "http://uclibc.org/downloads/uClibc-${CT_LIBC_VERSION}.tar.bz2;unpack=0"
 SRC_URI_UCLIBC += "${SRC_URI_UCLIBC_CONFIG}"
@@ -26,9 +79,7 @@  SRC_URI_UCLIBC_CONFIG ?= "file://uClibc-${CT_LIBC_VERSION}.config"
 
 addhook set_kernel_subdir to post_recipe_parse after libc_useflags before fetch_init
 def set_kernel_subdir(d):
-    if d.get("CT_KERNEL") != "linux":
-        return
-    if d.get("CT_KERNEL_VERSION") == "custom":
+    if not d.get("CT_KERNEL_VERSION") or d.get("CT_KERNEL_VERSION") == "custom":
         return
 
     version = tuple(map(int, d.get("CT_KERNEL_VERSION").split(".")))
@@ -44,9 +95,27 @@  def set_kernel_subdir(d):
         subdir = "v%d.x"%(version[0])
     d.set("KERNEL_SUBDIR", subdir)
 
+addhook set_kernel_ext to post_recipe_parse after libc_useflags before fetch_init
+def set_kernel_ext(d):
+    if not d.get("CT_KERNEL_VERSION") or d.get("CT_KERNEL_VERSION") == "custom":
+        return
+
+    version = tuple(map(int, d.get("CT_KERNEL_VERSION").split(".")))
+    if version[0] < 3:
+        return
+    if version[0] == 3 and version[1] < 12:
+        return
+    if version[0] == 3 and version[1] == 12 and version[2] < 7:
+        return
+    d.set("KERNEL_EXT", "tar.gz")
+
+
 KERNEL_SUBDIR ??= ""
-SRC_URI_LINUX = "${KERNELORG_MIRROR}/linux/kernel/${KERNEL_SUBDIR}/linux-${CT_KERNEL_VERSION}.tar.bz2;unpack=0"
-SRC_URI_LINUX:TARGET_OS_mingw32 = ""
+KERNEL_EXT ??= "tar.bz2"
+
+SRC_URI_LINUX = "${KERNELORG_MIRROR}/linux/kernel/${KERNEL_SUBDIR}/linux-${CT_KERNEL_VERSION}.${KERNEL_EXT};unpack=0"
+SRC_URI_LINUX:TARGET_LIBC_mingw = ""
+SRC_URI_LINUX:TARGET_KERNEL_darwin = ""
 
 SRC_URI_GDB ?= "${GNU_MIRROR}/gdb/gdb-${CT_GDB_VERSION}.tar.bz2;unpack=0"
 
@@ -60,45 +129,64 @@  SRC_URI_MPFR = "${MPFR_MIRROR}/mpfr-${CT_MPFR_VERSION}/mpfr-${CT_MPFR_VERSION}.t
 
 SRC_URI_MPC = "http://www.multiprecision.org/mpc/download/mpc-${CT_MPC_VERSION}.tar.gz;unpack=0"
 
-SRC_URI_STRACE = "${SOURCEFORGE_MIRROR}/project/strace/strace/${CT_STRACE_VERSION}/strace-${CT_STRACE_VERSION}.tar.bz2;unpack=0"
+SRC_URI_PPL = "http://bugseng.com/products/ppl/download/ftp/releases/${CT_PPL_VERSION}/ppl-${CT_PPL_VERSION}.tar.gz;unpack=0"
+
+SRC_URI_CLOOG = "ftp://gcc.gnu.org/pub/gcc/infrastructure/cloog-${CT_CLOOG_VERSION}.tar.gz;unpack=0"
+
+SRC_URI_ISL = "http://mirrors.kernel.org/sources.redhat.com/gcc/infrastructure/isl-${CT_ISL_VERSION}.tar.bz2;unpack=0"
 
 SRC_URI_DMALLOC = "http://dmalloc.com/releases/dmalloc-${CT_DMALLOC_VERSION}.tgz;unpack=0"
 
+SRC_URI_STRACE = "${SOURCEFORGE_MIRROR}/project/strace/strace/${CT_STRACE_VERSION}/strace-${CT_STRACE_VERSION}.tar.bz2;unpack=0"
+
 SRC_URI_LTRACE = "${DEBIAN_MIRROR}/main/l/ltrace/ltrace_${CT_LTRACE_VERSION}.orig.tar.gz;unpack=0"
 
-SRC_URI_PDCURSES = "${SOURCEFORGE_MIRROR}/pdcurses/PDCurses-${CT_MINGW_PDCURSES_VERSION}.tar.gz;unpack=0"
+MINGW32_EXT = "tar.bz2"
+addhook set_mingw32_ext to post_recipe_parse after libc_useflags before fetch_init
+def set_mingw32_ext(d):
+    if not d.get("CT_LIBC_VERSION"):
+        return
+
+    version = tuple(map(int, d.get("CT_LIBC_VERSION").split(".")))
+    if version[0] >= 3:
+        return
+    d.set("MINGW32_EXT", "tar.gz")
 
-SRC_URI:>TARGET_OS_mingw32 += " \
-  ${SOURCEFORGE_MIRROR}/mingw/w32api-${CT_KERNEL_VERSION}-mingw32-src.tar.gz;unpack=0 \
-  ${SOURCEFORGE_MIRROR}/mingw/mingwrt-${CT_LIBC_VERSION}-mingw32-src.tar.gz;unpack=0 \
+SRC_URI:>TARGET_LIBC_mingw += " \
+  ${SOURCEFORGE_MIRROR}/mingw-w64/mingw-w64-v${CT_LIBC_VERSION}.${MINGW32_EXT};unpack=0 \
+"
+
+SRC_URI:>TARGET_KERNEL_darwin += " \
+  http://downloads.sourceforge.net/project/e2fsprogs/e2fsprogs/1.41.14/e2fsprogs-libs-1.41.14.tar.gz;unpack=0 \
+  http://www.openssl.org/source/openssl-1.0.1e.tar.gz;unpack=0 \
 "
 
 do_unpack[postfuncs] += "do_unpack_fixup"
 do_unpack_fixup () {
-	if [ -n "${SRC_URI_LTRACE}" ] ; then
-		ln -s ltrace_${CT_LTRACE_VERSION}.orig.tar.gz \
-			${SRCDIR}/ltrace-${CT_LTRACE_VERSION}.tar.gz
-	fi
-	if [ "${CT_LIBC}" = "glibc" ] ; then
-		ln -s glibc-ports \
-			${SRCDIR}/glibc-ports-${CT_LIBC_VERSION}
-	elif [ "${CT_LIBC}" = "eglibc" ] ; then
-		mv eglibc-${CT_LIBC_VERSION} eglibc-${CT_LIBC_VERSION}.tmp
-		for d in eglibc-${CT_LIBC_VERSION}.tmp/* ; do
-			addon=`basename $d`
-			case $addon in
-			libc)
-				mv $d eglibc-${CT_LIBC_VERSION}
-				;;
-			*)
-				mv $d eglibc-$addon-${CT_LIBC_VERSION}
+       if [ -n "${SRC_URI_LTRACE}" ] ; then
+               ln -s ltrace_${CT_LTRACE_VERSION}.orig.tar.gz \
+                       ${SRCDIR}/ltrace-${CT_LTRACE_VERSION}.tar.gz
+       fi
+       if [ "${CT_LIBC}" = "glibc" ] ; then
+               ln -s glibc-ports \
+                       ${SRCDIR}/glibc-ports-${CT_LIBC_VERSION}
+       elif [ "${CT_LIBC}" = "eglibc" ] ; then
+               mv eglibc-${CT_LIBC_VERSION} eglibc-${CT_LIBC_VERSION}.tmp
+               for d in eglibc-${CT_LIBC_VERSION}.tmp/* ; do
+                       addon=`basename $d`
+                       case $addon in
+                       libc)
+                               mv $d eglibc-${CT_LIBC_VERSION}
+                               ;;
+                       *)
+                               mv $d eglibc-$addon-${CT_LIBC_VERSION}
                                 #ln -s ../eglibc-$addon-${CT_LIBC_VERSION} \
-				#	eglibc-${CT_LIBC_VERSION}/$addon
-				;;
-			esac
-		done
-		rmdir eglibc-${CT_LIBC_VERSION}.tmp
-	fi
+                               #       eglibc-${CT_LIBC_VERSION}/$addon
+                               ;;
+                       esac
+               done
+               rmdir eglibc-${CT_LIBC_VERSION}.tmp
+       fi
 }
 
 addhook gcc_set_src_uri to post_recipe_parse first before fetch_init after libc_useflags gcc_select_gdb
@@ -110,8 +198,9 @@  def gcc_set_src_uri(d):
         d.append("SRC_URI", "${%s}"%(uri), " ")
         if flag is not None:
             d.set(flag, "1")
-    target_is_mingw = d.get("TARGET_OS") == "mingw32"
-    target_is_linux = not target_is_mingw
+    target_is_mingw = d.get("CT_KERNEL") == "windows"
+    target_is_linux = d.get("CT_KERNEL") == "linux"
+    target_is_darwin = d.get("CT_KERNEL") == "darwin"
     if d.get("CT_KERNEL_VERSION") != "custom" and target_is_linux:
         add_src("SRC_URI_LINUX")
     if d.get("CT_LIBC") == "glibc":
@@ -123,19 +212,28 @@  def gcc_set_src_uri(d):
     gcc_version = d.get("GCC_VERSION")
     if gcc_version.startswith("linaro-"):
         gcc_version = gcc_version[len("linaro-"):]
-    overrides = d.get("OVERRIDES").split(":")
-    v = map(int, gcc_version.split("-")[0].split("."))
-    if v[0] == 4:
-        if v[1] >= 3:
-            add_src("SRC_URI_GMP", "CT_USE_GMP")
-            add_src("SRC_URI_MPFR", "CT_USE_MPFR")
-        if v[1] >= 5:
-            add_src("SRC_URI_MPC", "CT_USE_MPC")
-            if "TARGET_BINFMT_elf" in overrides:
-                add_src("SRC_URI_LIBELF", "CT_USE_LIBELF")
-    if d.get("CT_ARCH_BINFMT_FLAT"):
-        add_src("SRC_URI_ELF2FLT", "CT_USE_ELF2FLT")
-        d.append("DEPENDS", "host:libz", " ")
+    if not target_is_darwin:
+        v = map(int, gcc_version.split("-")[0].split("."))
+        if v[0] == 4:
+            if v[1] >= 3:
+                add_src("SRC_URI_GMP", "CT_USE_GMP")
+                add_src("SRC_URI_MPFR", "CT_USE_MPFR")
+                add_src("SRC_URI_CLOOG", "CT_USE_CLOOG")
+                if v[1] < 8:
+                    add_src("SRC_URI_PPL", "CT_USE_PPL")
+            if v[1] >= 5:
+                add_src("SRC_URI_MPC", "CT_USE_MPC")
+                if target_is_linux:
+                    add_src("SRC_URI_LIBELF", "CT_USE_LIBELF")
+            if v[1] >= 8:
+                add_src("SRC_URI_ISL", "CT_USE_ISL")
+    else:
+        print "opop"
+        add_src("SRC_URI_GMP", "CT_USE_GMP")
+        add_src("SRC_URI_MPFR", "CT_USE_MPFR")
+        add_src("SRC_URI_CLOOG", "CT_USE_CLOOG")
+        add_src("SRC_URI_PPL", "CT_USE_PPL")
+    
     if d.get("CT_DEBUG_gdb"):
         add_src("SRC_URI_GDB")
     if d.get("CT_DEBUG_ltrace"):
@@ -143,10 +241,9 @@  def gcc_set_src_uri(d):
         add_src("SRC_URI_LIBELF", "CT_USE_LIBELF")
     if d.get("CT_DEBUG_strace"):
         add_src("SRC_URI_STRACE")
-    if target_is_mingw:
-        add_src("SRC_URI_PDCURSES", "CT_USE_PDCURSES")
-    if d.get("CT_DEBUG_dmalloc"):
-        add_src("SRC_URI_DMALLOC")
+    if d.get("CT_ARCH_BINFMT_FLAT"):
+        add_src("SRC_URI_ELF2FLT", "CT_USE_ELF2FLT")
+        d.append("DEPENDS", "host:libz", " ")
     # FIXME: add support for adding cloog and ppl
 
 
diff --git a/recipes/crosstool-ng/gcc-1.17/000-misc.config b/recipes/crosstool-ng/gcc-github/000-misc.config
similarity index 94%
rename from recipes/crosstool-ng/gcc-1.17/000-misc.config
rename to recipes/crosstool-ng/gcc-github/000-misc.config
index ec497d5..67ca739 100644
--- a/recipes/crosstool-ng/gcc-1.17/000-misc.config
+++ b/recipes/crosstool-ng/gcc-github/000-misc.config
@@ -1,3 +1,4 @@ 
+# CT_BACKEND is not set
 CT_MODULES=y
 
 #
@@ -7,7 +8,7 @@  CT_MODULES=y
 #
 # crosstool-NG behavior
 #
-CT_OBSOLETE=y
+CT_OBSOLETE=n
 CT_EXPERIMENTAL=y
 # CT_DEBUG_CT is not set
 
@@ -21,7 +22,7 @@  CT_INSTALL_DIR="${CT_PREFIX_DIR}"
 CT_RM_RF_PREFIX_DIR=y
 CT_REMOVE_DOCS=y
 # CT_INSTALL_DIR_RO is not set
-# CT_STRIP_ALL_TOOLCHAIN_EXECUTABLES is not set
+CT_STRIP_ALL_TOOLCHAIN_EXECUTABLES=y
 
 #
 # Downloading
diff --git a/recipes/crosstool-ng/gcc-1.17/100-arm.config b/recipes/crosstool-ng/gcc-github/100-arm.config
similarity index 100%
rename from recipes/crosstool-ng/gcc-1.17/100-arm.config
rename to recipes/crosstool-ng/gcc-github/100-arm.config
diff --git a/recipes/crosstool-ng/gcc-1.17/100-m68k.config b/recipes/crosstool-ng/gcc-github/100-m68k.config
similarity index 100%
rename from recipes/crosstool-ng/gcc-1.17/100-m68k.config
rename to recipes/crosstool-ng/gcc-github/100-m68k.config
diff --git a/recipes/crosstool-ng/gcc-1.17/100-powerpc.config b/recipes/crosstool-ng/gcc-github/100-powerpc.config
similarity index 97%
rename from recipes/crosstool-ng/gcc-1.17/100-powerpc.config
rename to recipes/crosstool-ng/gcc-github/100-powerpc.config
index 0d0fe15..3b70818 100644
--- a/recipes/crosstool-ng/gcc-1.17/100-powerpc.config
+++ b/recipes/crosstool-ng/gcc-github/100-powerpc.config
@@ -8,7 +8,7 @@  CT_ARCH_SUPPORTS_32=y
 CT_ARCH_SUPPORTS_64=y
 # CT_ARCH_SUPPORT_ARCH is not set
 CT_ARCH_SUPPORT_ABI=y
-CT_ARCH_SUPPORTS_WITH_CPU=y
+CT_ARCH_SUPPORT_CPU=y
 CT_ARCH_SUPPORT_TUNE=y
 # CT_ARCH_SUPPORT_FPU is not set
 # CT_ARCH_DEFAULT_HAS_MMU is not set
diff --git a/recipes/crosstool-ng/gcc-1.17/100-x86.config b/recipes/crosstool-ng/gcc-github/100-x86.config
similarity index 97%
rename from recipes/crosstool-ng/gcc-1.17/100-x86.config
rename to recipes/crosstool-ng/gcc-github/100-x86.config
index 4c8b4be..3a4c682 100644
--- a/recipes/crosstool-ng/gcc-1.17/100-x86.config
+++ b/recipes/crosstool-ng/gcc-github/100-x86.config
@@ -42,10 +42,10 @@  CT_ARCH_x86_AVAILABLE=y
 #
 # Generic target options
 #
-# CT_MULTILIB is not set
 CT_ARCH_USE_MMU=y
 
 #
 # Target optimisations
 #
 CT_ARCH_FLOAT=""
+
diff --git a/recipes/crosstool-ng/gcc-1.17/100-x86_64.config b/recipes/crosstool-ng/gcc-github/100-x86_64.config
similarity index 97%
rename from recipes/crosstool-ng/gcc-1.17/100-x86_64.config
rename to recipes/crosstool-ng/gcc-github/100-x86_64.config
index 03a062f..e026990 100644
--- a/recipes/crosstool-ng/gcc-1.17/100-x86_64.config
+++ b/recipes/crosstool-ng/gcc-github/100-x86_64.config
@@ -8,7 +8,7 @@  CT_ARCH_SUPPORTS_32=y
 CT_ARCH_SUPPORTS_64=y
 CT_ARCH_SUPPORT_ARCH=y
 # CT_ARCH_SUPPORT_ABI is not set
-CT_ARCH_SUPPORTS_WITH_CPU=y
+CT_ARCH_SUPPORT_CPU=y
 CT_ARCH_SUPPORT_TUNE=y
 # CT_ARCH_SUPPORT_FPU is not set
 # CT_ARCH_DEFAULT_HAS_MMU is not set
diff --git a/recipes/crosstool-ng/gcc-1.17/200-toolchain.config b/recipes/crosstool-ng/gcc-github/200-toolchain.config
similarity index 85%
rename from recipes/crosstool-ng/gcc-1.17/200-toolchain.config
rename to recipes/crosstool-ng/gcc-github/200-toolchain.config
index 14a19da..c3e11ee 100644
--- a/recipes/crosstool-ng/gcc-1.17/200-toolchain.config
+++ b/recipes/crosstool-ng/gcc-github/200-toolchain.config
@@ -5,11 +5,10 @@ 
 #
 # General toolchain options
 #
-CT_FORCE_SYSROOT=y
 CT_USE_SYSROOT=y
 CT_SYSROOT_NAME="sysroot"
 CT_SYSROOT_DIR_PREFIX=""
-CT_STATIC_TOOLCHAIN_POSSIBLE=y
+# CT_WANTS_STATIC_LINK is not set
 # CT_STATIC_TOOLCHAIN is not set
 CT_TOOLCHAIN_PKGVERSION=""
 CT_TOOLCHAIN_BUGURL=""
@@ -49,8 +48,3 @@  CT_HOST_SUFFIX=""
 #
 CT_TARGET_PREFIX=""
 CT_TARGET_SUFFIX=""
-
-#
-# Misc options
-#
-# CT_TOOLCHAIN_ENABLE_NLS is not set
diff --git a/recipes/crosstool-ng/gcc-github/300-darwin.config b/recipes/crosstool-ng/gcc-github/300-darwin.config
new file mode 100644
index 0000000..102e934
--- /dev/null
+++ b/recipes/crosstool-ng/gcc-github/300-darwin.config
@@ -0,0 +1,215 @@ 
+#
+# Operating System
+#
+CT_DARWIN=y
+CT_KERNEL="darwin"
+# CT_KERNEL_bare_metal is not set
+# CT_KERNEL_linux is not set
+CT_KERNEL_darwin=y
+CT_KERNEL_bare_metal_AVAILABLE=y
+CT_KERNEL_linux_AVAILABLE=y
+CT_KERNEL_windows_AVAILABLE=y
+CT_KERNEL_darwin_AVAILABLE=y
+CT_KERNEL_VERSION=""
+# CT_W32API_V_select is not set
+
+CT_DARWIN_VERSION=""
+CT_DARWIN_SDK_PATH=""
+CT_DARWIN_SDK=""
+# __CT_DARWIN_MAC_OSX_V_
+CT_DARWIN_MAC_OSX_VERSION=""
+CT_DARWIN_COPY_SDK_TO_SYSROOT=y
+
+#
+# Common kernel options
+#
+
+#
+# Binary utilities
+#
+CT_ARCH_BINFMT_ELF=y
+
+#
+# GNU binutils
+#
+CT_BINUTILS="cctools"
+CT_BINUTILS_cctools=y
+CT_BINUTILS_VERSION="809"
+CT_CCTOOLS_V_809=y
+CT_BINUTILS_EXTRA_CONFIG_ARRAY=""
+# CT_BINUTILS_FOR_TARGET is not set
+
+#
+# sstrip
+#
+# CT_SSTRIP is not set
+
+#
+# C compiler
+#
+CT_CC="gcc"
+CT_CC_gcc=y
+CT_CC_GCC_SHOW_LINARO=y
+CT_CC_GCC_VERSION=""
+CT_CC_GCC_USE_GMP_MPFR=n
+CT_CC_SUPPORT_CXX=y
+CT_CC_SUPPORT_FORTRAN=y
+CT_CC_SUPPORT_JAVA=y
+CT_CC_SUPPORT_ADA=y
+CT_CC_SUPPORT_OBJC=y
+CT_CC_SUPPORT_OBJCXX=y
+
+#
+# Clang && LLVM
+#
+# CT_CC_clang is not set
+CT_CC_CLANG_VERSION=""
+# CT_LLVM is not set
+CT_LLVM_VERSION=""
+# CT_LLVM_COMPILER_RT is not set
+
+#
+# Additional supported languages:
+#
+CT_CC_LANG_CXX=y
+# CT_CC_LANG_JAVA is not set
+# CT_CC_LANG_ADA is not set
+CT_CC_LANG_OBJC=y
+CT_CC_LANG_OBJCXX=y
+CT_CC_LANG_OTHERS=""
+
+#
+# gcc other options
+#
+CT_CC_GCC_ENABLE_CXX_FLAGS=""
+CT_CC_GCC_CORE_EXTRA_CONFIG_ARRAY=""
+CT_CC_GCC_EXTRA_CONFIG_ARRAY=""
+# CT_CC_GCC_STATIC_LIBSTDCXX is not set
+
+#
+# Optimisation features
+#
+CT_CC_GCC_USE_GRAPHITE=n
+# CT_CC_GCC_USE_LTO is not set
+
+#
+# Settings for libraries running on target
+#
+# CT_CC_GCC_ENABLE_TARGET_OPTSPACE is not set
+# CT_CC_GCC_LIBMUDFLAP is not set
+# CT_CC_GCC_LIBGOMP is not set
+# CT_CC_GCC_LIBSSP is not set
+
+#
+# Misc. obscure options.
+#
+CT_CC_CXA_ATEXIT=y
+CT_CC_GCC_DISABLE_PCH=y
+CT_CC_GCC_SJLJ_EXCEPTIONS=n
+CT_CC_GCC_LDBL_128=y
+# CT_CC_GCC_BUILD_ID is not set
+
+#
+# C-library
+#
+CT_LIBC="none"
+CT_LIBC_none=y
+CT_LIBC_eglibc_AVAILABLE=y
+CT_LIBC_glibc_AVAILABLE=y
+CT_LIBC_mingw_AVAILABLE=y
+CT_LIBC_newlib_AVAILABLE=y
+CT_LIBC_none_AVAILABLE=y
+CT_LIBC_uClibc_AVAILABLE=y
+CT_LIBC_SUPPORT_THREADS_ANY=y
+CT_LIBC_SUPPORT_WIN32THREADS=y
+CT_THREADS="nptl"
+
+#
+# Common C library options
+#
+CT_THREADS_WIN32THREADS=y
+
+#
+# Debug facilities
+#
+# CT_DEBUG_dmalloc is not set
+# CT_DEBUG_duma is not set
+# CT_DEBUG_gdb is not set
+# CT_GDB_CROSS is not set
+# CT_GDB_CROSS_STATIC is not set
+# CT_GDB_CROSS_PYTHON is not set
+# CT_GDB_CROSS_INSIGHT is not set
+# CT_GDB_NATIVE is not set
+# CT_GDB_NATIVE_STATIC is not set
+# CT_GDB_NATIVE_USE_GMP_MPFR is not set
+# CT_GDB_GDBSERVER is not set
+# CT_GDB_GDBSERVER_STATIC is not set
+
+#
+# gdb version
+#
+# CT_DEBUG_GDB_SHOW_LINARO is not set
+# CT_GDB_VERSION=""
+# CT_DEBUG_ltrace is not set
+CT_LTRACE_VERSION=""
+# CT_DEBUG_strace is not set
+CT_STRACE_VERSION=""
+
+#
+# Companion libraries
+#
+
+#
+# FIXME: check real dependencies!!!
+#
+CT_COMPLIBS=y
+# CT_WRAPPER_NEEDED is not set
+CT_GMP=y
+CT_MPFR=y
+CT_PPL=y
+CT_CLOOG=y
+CT_ISL=y
+CT_MPC=y
+CT_LIBELF=y
+# __CT_GMP_V_
+CT_GMP_VERSION=""
+# __CT_MPFR_V_
+CT_MPFR_VERSION=""
+# __CT_PPL_V_
+CT_PPL_VERSION=""
+# __CT_CLOOG_V_
+CT_CLOOG_VERSION=""
+# __CT_ISL_V_
+CT_ISL_VERSION=""
+# __CT_MPC_V_
+CT_MPC_VERSION=""
+# __CT_LIBELF_V_
+CT_LIBELF_VERSION=""
+
+#
+# Companion libraries common options
+#
+# CT_COMPLIBS_BACKUP is not set
+# CT_COMPLIBS_CHECK is not set
+# CT_COMPLIBS_SHARED is not set
+
+#
+# Companion tools
+#
+
+#
+# READ HELP before you say 'Y' below !!!
+#
+CT_COMP_TOOLS=y
+CT_COMP_TOOLS_make=y
+CT_COMP_TOOLS_m4=y
+CT_COMP_TOOLS_autoconf=y
+CT_COMP_TOOLS_automake=y
+CT_COMP_TOOLS_libtool=y
+
+#
+# Test suite
+#
+# CT_TEST_SUITE is not set
+# CT_TEST_SUITE_GCC is not set
+
diff --git a/recipes/crosstool-ng/gcc-1.17/300-linux-glibc.config b/recipes/crosstool-ng/gcc-github/300-linux-glibc.config
similarity index 60%
rename from recipes/crosstool-ng/gcc-1.17/300-linux-glibc.config
rename to recipes/crosstool-ng/gcc-github/300-linux-glibc.config
index 7f9fb6c..efc8fe7 100644
--- a/recipes/crosstool-ng/gcc-1.17/300-linux-glibc.config
+++ b/recipes/crosstool-ng/gcc-github/300-linux-glibc.config
@@ -1,13 +1,18 @@ 
 #
 # Operating System
 #
+CT_KERNEL_SUPPORTS_SHARED_LIBS=y
+CT_KERNEL="linux"
 CT_KERNEL_VERSION=""
 # CT_KERNEL_bare_metal is not set
 CT_KERNEL_linux=y
+CT_KERNEL_bare_metal_AVAILABLE=y
+CT_KERNEL_linux_AVAILABLE=y
+# CT_KERNEL_LINUX_INSTALL is not set
 # CT_KERNEL_LINUX_USE_CUSTOM_HEADERS is not set
+# CT_KERNEL_LINUX_CUSTOM_IS_TARBALL is not set
 CT_KERNEL_LINUX_CUSTOM_PATH=""
-# CT_KERNEL_LINUX_CUSTOM is not set
-CT_KERNEL_LINUX_CUSTOM_LOCATION=""
+CT_KERNEL_mingw32_AVAILABLE=y
 
 #
 # Common kernel options
@@ -15,6 +20,15 @@  CT_KERNEL_LINUX_CUSTOM_LOCATION=""
 CT_SHARED_LIBS=y
 
 #
+# linux other options
+#
+CT_KERNEL_LINUX_VERBOSITY_0=y
+# CT_KERNEL_LINUX_VERBOSITY_1 is not set
+# CT_KERNEL_LINUX_VERBOSITY_2 is not set
+CT_KERNEL_LINUX_VERBOSE_LEVEL=0
+CT_KERNEL_LINUX_INSTALL_CHECK=y
+
+#
 # Binary utilities
 #
 CT_ARCH_BINFMT_ELF=y
@@ -23,6 +37,7 @@  CT_ARCH_BINFMT_ELF=y
 # GNU binutils
 #
 CT_BINUTILS_VERSION=""
+CT_BINUTILS_HAS_PKGVERSION_BUGURL=y
 CT_BINUTILS_EXTRA_CONFIG_ARRAY=""
 # CT_BINUTILS_FOR_TARGET is not set
 CT_BINUTILS_FOR_TARGET_IBERTY=y
@@ -31,14 +46,32 @@  CT_BINUTILS_FOR_TARGET_BFD=y
 #
 # C compiler
 #
-CT_CC_VERSION=""
+CT_CC="gcc"
+CT_CC_GCC_VERSION=""
+CT_CC_GCC_USE_GMP_MPFR=n
 CT_CC_gcc=y
 CT_CC_GCC_SHOW_LINARO=y
+CT_CC_SUPPORT_CXX=y
+CT_CC_SUPPORT_FORTRAN=y
+CT_CC_SUPPORT_JAVA=y
+CT_CC_SUPPORT_ADA=y
+CT_CC_SUPPORT_OBJC=y
+CT_CC_SUPPORT_OBJCXX=y
+
+#
+# Clang && LLVM
+#
+# CT_CC_clang is not set
+CT_CC_CLANG_VERSION=""
+# CT_LLVM is not set
+CT_LLVM_VERSION=""
+# CT_LLVM_COMPILER_RT is not set
 
 #
 # Additional supported languages:
 #
 CT_CC_LANG_CXX=y
+# CT_CC_LANG_FORTRAN is not set
 # CT_CC_LANG_JAVA is not set
 # CT_CC_LANG_ADA is not set
 # CT_CC_LANG_OBJC is not set
@@ -48,15 +81,15 @@  CT_CC_LANG_OTHERS=""
 #
 # gcc other options
 #
-CT_CC_ENABLE_CXX_FLAGS=""
-CT_CC_CORE_EXTRA_CONFIG_ARRAY=""
-CT_CC_EXTRA_CONFIG_ARRAY=""
-CT_CC_STATIC_LIBSTDCXX=y
+CT_CC_GCC_ENABLE_CXX_FLAGS=""
+CT_CC_GCC_CORE_EXTRA_CONFIG_ARRAY=""
+CT_CC_GCC_EXTRA_CONFIG_ARRAY=""
+# CT_CC_GCC_STATIC_LIBSTDCXX is not set
 
 #
 # Optimisation features
 #
-# CT_CC_GCC_USE_GRAPHITE is not set
+CT_CC_GCC_USE_GRAPHITE=n
 # CT_CC_GCC_USE_LTO is not set
 
 #
@@ -74,6 +107,7 @@  CT_CC_CXA_ATEXIT=y
 CT_CC_GCC_DISABLE_PCH=y
 CT_CC_GCC_SJLJ_EXCEPTIONS=m
 CT_CC_GCC_LDBL_128=m
+# CT_CC_GCC_BUILD_ID is not set
 
 #
 # C-library
@@ -82,10 +116,21 @@  CT_LIBC=""
 CT_LIBC_VERSION=""
 # CT_LIBC_eglibc is not set
 # CT_LIBC_glibc is not set
+# CT_LIBC_mingw is not set
+# CT_LIBC_newlib is not set
+# CT_LIBC_none is not set
+# CT_LIBC_uClibc is not set
+CT_LIBC_eglibc_AVAILABLE=y
 CT_EGLIBC_REVISION="HEAD"
 # CT_EGLIBC_CHECKOUT is not set
 # CT_EGLIBC_OPT_SIZE is not set
 # CT_EGLIBC_CUSTOM_CONFIG is not set
+CT_LIBC_glibc_AVAILABLE=y
+CT_LIBC_GLIBC_TARBALL=y
+CT_LIBC_mingw_AVAILABLE=y
+CT_LIBC_newlib_AVAILABLE=y
+CT_LIBC_none_AVAILABLE=y
+CT_LIBC_uClibc_AVAILABLE=y
 
 #
 # Common C library options
@@ -93,6 +138,7 @@  CT_EGLIBC_REVISION="HEAD"
 CT_THREADS_NPTL=y
 CT_LIBC_XLDD=y
 CT_LIBC_GLIBC_MAY_FORCE_PORTS=y
+CT_LIBC_glibc_familly=y
 CT_LIBC_GLIBC_EXTRA_CONFIG_ARRAY=""
 CT_LIBC_GLIBC_CONFIGPARMS=""
 CT_LIBC_GLIBC_EXTRA_CFLAGS="-U_FORTIFY_SOURCE"
@@ -139,15 +185,46 @@  CT_STRACE_VERSION=""
 # Companion libraries
 #
 CT_COMPLIBS=y
+# CT_WRAPPER_NEEDED is not set
+CT_GMP=y
+CT_MPFR=y
+CT_PPL=y
+CT_CLOOG=y
+CT_ISL=y
+CT_MPC=y
+CT_LIBELF=y
 CT_GMP_VERSION=""
 CT_MPFR_VERSION=""
 CT_PPL_VERSION=""
 CT_CLOOG_VERSION=""
+CT_ISL_VERSION=""
 CT_MPC_VERSION=""
 CT_LIBELF_VERSION=""
 
 #
 # Companion libraries common options
 #
+# CT_COMPLIBS_BACKUP is not set
+# CT_COMPLIBS_CHECK is not set
 # CT_COMPLIBS_SHARED is not set
 
+#
+# Companion tools
+#
+
+#
+# READ HELP before you say 'Y' below !!!
+#
+CT_COMP_TOOLS=y
+CT_COMP_TOOLS_make=y
+CT_COMP_TOOLS_m4=y
+CT_COMP_TOOLS_autoconf=y
+CT_COMP_TOOLS_automake=y
+CT_COMP_TOOLS_libtool=y
+
+#
+# Test suite
+#
+# CT_TEST_SUITE is not set
+# CT_TEST_SUITE_GCC is not set
+
diff --git a/recipes/crosstool-ng/gcc-1.17/300-linux-uclibc.config b/recipes/crosstool-ng/gcc-github/300-linux-uclibc.config
similarity index 100%
rename from recipes/crosstool-ng/gcc-1.17/300-linux-uclibc.config
rename to recipes/crosstool-ng/gcc-github/300-linux-uclibc.config
diff --git a/recipes/crosstool-ng/gcc-github/300-mingw32.config b/recipes/crosstool-ng/gcc-github/300-mingw32.config
new file mode 100644
index 0000000..22ae1b7
--- /dev/null
+++ b/recipes/crosstool-ng/gcc-github/300-mingw32.config
@@ -0,0 +1,211 @@ 
+#
+# Operating System
+#
+CT_WINDOWS=y
+CT_KERNEL="windows"
+# CT_KERNEL_bare_metal is not set
+# CT_KERNEL_linux is not set
+CT_KERNEL_windows=y
+CT_KERNEL_bare_metal_AVAILABLE=y
+CT_KERNEL_linux_AVAILABLE=y
+CT_KERNEL_windows_AVAILABLE=y
+CT_KERNEL_VERSION=""
+# CT_W32API_V_select is not set
+
+#
+# Common kernel options
+#
+
+#
+# Binary utilities
+#
+CT_ARCH_BINFMT_ELF=y
+
+#
+# GNU binutils
+#
+CT_BINUTILS_VERSION=""
+CT_BINUTILS_EXTRA_CONFIG_ARRAY=""
+# CT_BINUTILS_FOR_TARGET is not set
+CT_BINUTILS_FOR_TARGET_IBERTY=y
+CT_BINUTILS_FOR_TARGET_BFD=y
+
+#
+# sstrip
+#
+# CT_SSTRIP is not set
+
+#
+# C compiler
+#
+CT_CC="gcc"
+CT_CC_gcc=y
+CT_CC_GCC_SHOW_LINARO=y
+CT_CC_GCC_VERSION=""
+CT_CC_GCC_USE_GMP_MPFR=n
+CT_CC_SUPPORT_CXX=y
+CT_CC_SUPPORT_FORTRAN=y
+CT_CC_SUPPORT_JAVA=y
+CT_CC_SUPPORT_ADA=y
+CT_CC_SUPPORT_OBJC=y
+CT_CC_SUPPORT_OBJCXX=y
+
+#
+# Clang && LLVM
+#
+# CT_CC_clang is not set
+CT_CC_CLANG_VERSION=""
+# CT_LLVM is not set
+CT_LLVM_VERSION=""
+# CT_LLVM_COMPILER_RT is not set
+
+#
+# Additional supported languages:
+#
+CT_CC_LANG_CXX=y
+# CT_CC_LANG_JAVA is not set
+# CT_CC_LANG_ADA is not set
+# CT_CC_LANG_OBJC is not set
+# CT_CC_LANG_OBJCXX is not set
+CT_CC_LANG_OTHERS=""
+
+#
+# gcc other options
+#
+CT_CC_GCC_ENABLE_CXX_FLAGS=""
+CT_CC_GCC_CORE_EXTRA_CONFIG_ARRAY=""
+CT_CC_GCC_EXTRA_CONFIG_ARRAY=""
+# CT_CC_GCC_STATIC_LIBSTDCXX is not set
+
+#
+# Optimisation features
+#
+CT_CC_GCC_USE_GRAPHITE=n
+# CT_CC_GCC_USE_LTO is not set
+
+#
+# Settings for libraries running on target
+#
+# CT_CC_GCC_ENABLE_TARGET_OPTSPACE is not set
+# CT_CC_GCC_LIBMUDFLAP is not set
+# CT_CC_GCC_LIBGOMP is not set
+# CT_CC_GCC_LIBSSP is not set
+
+#
+# Misc. obscure options.
+#
+CT_CC_CXA_ATEXIT=y
+CT_CC_GCC_DISABLE_PCH=y
+CT_CC_GCC_SJLJ_EXCEPTIONS=y
+CT_CC_GCC_LDBL_128=y
+# CT_CC_GCC_BUILD_ID is not set
+
+#
+# C-library
+#
+CT_LIBC="mingw"
+CT_LIBC_mingw=y
+CT_LIBC_eglibc_AVAILABLE=y
+CT_LIBC_glibc_AVAILABLE=y
+CT_LIBC_mingw_AVAILABLE=y
+CT_WINAPI_V_3_1_0=y
+# CT_WINAPI_V_select is not set
+CT_WINAPI_VERSION=""
+CT_MINGW_DIRECTX=y
+CT_MINGW_DDK=y
+CT_LIBC_newlib_AVAILABLE=y
+CT_LIBC_none_AVAILABLE=y
+CT_LIBC_uClibc_AVAILABLE=y
+CT_LIBC_SUPPORT_THREADS_ANY=y
+CT_LIBC_SUPPORT_WIN32THREADS=y
+CT_THREADS="win32"
+
+#
+# Common C library options
+#
+CT_THREADS_WIN32THREADS=y
+
+#
+# Debug facilities
+#
+# CT_DEBUG_dmalloc is not set
+# CT_DEBUG_duma is not set
+# CT_DEBUG_gdb is not set
+# CT_GDB_CROSS is not set
+# CT_GDB_CROSS_STATIC is not set
+# CT_GDB_CROSS_PYTHON is not set
+# CT_GDB_CROSS_INSIGHT is not set
+# CT_GDB_NATIVE is not set
+# CT_GDB_NATIVE_STATIC is not set
+# CT_GDB_NATIVE_USE_GMP_MPFR is not set
+# CT_GDB_GDBSERVER is not set
+# CT_GDB_GDBSERVER_STATIC is not set
+
+#
+# gdb version
+#
+# CT_DEBUG_GDB_SHOW_LINARO is not set
+# CT_GDB_VERSION=""
+# CT_DEBUG_ltrace is not set
+CT_LTRACE_VERSION=""
+# CT_DEBUG_strace is not set
+CT_STRACE_VERSION=""
+
+#
+# Companion libraries
+#
+
+#
+# FIXME: check real dependencies!!!
+#
+CT_COMPLIBS=y
+# CT_WRAPPER_NEEDED is not set
+CT_GMP=y
+CT_MPFR=y
+CT_PPL=y
+CT_CLOOG=y
+CT_ISL=y
+CT_MPC=y
+CT_LIBELF=y
+# __CT_GMP_V_
+CT_GMP_VERSION=""
+# __CT_MPFR_V_
+CT_MPFR_VERSION=""
+# __CT_PPL_V_
+CT_PPL_VERSION=""
+# __CT_CLOOG_V_
+CT_CLOOG_VERSION=""
+# __CT_ISL_V_
+CT_ISL_VERSION=""
+# __CT_MPC_V_
+CT_MPC_VERSION=""
+# __CT_LIBELF_V_
+CT_LIBELF_VERSION=""
+
+#
+# Companion libraries common options
+#
+# CT_COMPLIBS_BACKUP is not set
+# CT_COMPLIBS_CHECK is not set
+# CT_COMPLIBS_SHARED is not set
+
+#
+# Companion tools
+#
+
+#
+# READ HELP before you say 'Y' below !!!
+#
+CT_COMP_TOOLS=y
+CT_COMP_TOOLS_make=y
+CT_COMP_TOOLS_m4=y
+CT_COMP_TOOLS_autoconf=y
+CT_COMP_TOOLS_automake=y
+CT_COMP_TOOLS_libtool=y
+
+#
+# Test suite
+#
+# CT_TEST_SUITE is not set
+# CT_TEST_SUITE_GCC is not set
+
diff --git a/recipes/crosstool-ng/gcc-1.17/uClibc-0.9.33.2.config b/recipes/crosstool-ng/gcc-github/uClibc-0.9.33.2.config
similarity index 100%
rename from recipes/crosstool-ng/gcc-1.17/uClibc-0.9.33.2.config
rename to recipes/crosstool-ng/gcc-github/uClibc-0.9.33.2.config
diff --git a/recipes/crosstool-ng/gcc-install.inc b/recipes/crosstool-ng/gcc-install.inc
index 37fb38d..9352169 100644
--- a/recipes/crosstool-ng/gcc-install.inc
+++ b/recipes/crosstool-ng/gcc-install.inc
@@ -4,7 +4,7 @@ 
 do_install[cleandirs] = ""
 do_install[dirs] = "${D}"
 
-OBJCOPY:TARGET_OS_mingw32 = ""
+OBJCOPY:TARGET_LIBC_mingw = ""
 
 # Trick install_strip to use installed strip and objcopy
 TARGET_STRIP	= "${D}/bin/${TARGET_PREFIX}strip"
@@ -12,6 +12,12 @@  TARGET_OBJCOPY	= "${D}/bin/${TARGET_PREFIX}objcopy"
 
 # everything is already installed in do_compile, but let's rearrange it a bit
 do_install () {
+    # Darwin cleanup
+    rm bin/*libtool || true
+    rm lib/*.a lib/libclang* || true
+    #rm -rf lib/clang/ || true
+    rm ${TARGET_ARCH}/sysroot/usr/include/X11 || true
+
     mv ${TARGET_ARCH}/sysroot${target_base_libdir}/*.la \
        ${TARGET_ARCH}/sysroot${target_base_libdir}/*.a \
        ${TARGET_ARCH}/sysroot${target_libdir}/ || true
@@ -39,7 +45,7 @@  LIBTOOL_DEPENDS = ""
 LIBTOOL_FIXUP_SEARCH_DIRS += "\
 ${D}/${TARGET_ARCH}/sysroot${target_libdir} \
 ${D}/${TARGET_ARCH}/sysroot${target_base_libdir}"
-LIBTOOL_FIXUP_STRIP_DIRS =+ "${D}/${TARGET_ARCH}/sysroot ${D}/${TARGET_ARCH}"
+LIBTOOL_FIXUP_STRIP_DIRS =+ "${D}/${TARGET_ARCH}/sysroot ${D}/${TARGET_ARCH}/lib32 ${D}/${TARGET_ARCH}/lib64 ${D}/${TARGET_ARCH}/lib"
 
 do_install[postfuncs] += "do_install_gcc_lafile_fixup"
 do_install_gcc_lafile_fixup () {
diff --git a/recipes/crosstool-ng/gcc-package.inc b/recipes/crosstool-ng/gcc-package.inc
index 4a75477..a0c8c97 100644
--- a/recipes/crosstool-ng/gcc-package.inc
+++ b/recipes/crosstool-ng/gcc-package.inc
@@ -2,6 +2,10 @@ 
 
 inherit auto-package-libs
 AUTO_PACKAGE_LIBS = "gcc stdc++ supc++ m"
+AUTO_PACKAGE_LIBS:>TARGET_KERNEL_darwin = " \
+  dl resolv util crypt pthread thread_db bfd rt nsl \
+  anl BrokenLocale memusage pcprofile SegFault elf \
+  nss_files nss_dns nss_compat nss_nis nss_nisplus nss_hesiod inproctrace"
 AUTO_PACKAGE_LIBS:>TARGET_LIBC_glibc = " \
   dl resolv util crypt pthread thread_db bfd rt nsl \
   anl BrokenLocale memusage pcprofile SegFault elf \
@@ -17,7 +21,7 @@  ${base_prefix}/${TARGET_ARCH}/sysroot${target_base_libdir}:lib::.so,.so.*,-*.so:
 ${base_prefix}/${TARGET_ARCH}/sysroot${target_libdir}:lib::.so.*:.so,.a,_nonshared.a,.la \
 ${base_prefix}/${TARGET_ARCH}/debug-root${target_libdir}:lib::.so,.so.*,-*.so: \
 "
-AUTO_PACKAGE_LIBS_LIBDIR:TARGET_OS_mingw32 = "\
+AUTO_PACKAGE_LIBS_LIBDIR:TARGET_LIBC_mingw = "\
 ${base_prefix}/${TARGET_ARCH}/sysroot${target_base_sharedlibdir}:mingw:,10:.dll: \
 ${base_prefix}/${TARGET_ARCH}/sysroot${target_sharedlibdir}:mingw:,10:.dll: \
 ${base_prefix}/${TARGET_ARCH}/sysroot${target_base_libdir}:lib:::.dll.a,.a,.la \ \
@@ -39,7 +43,7 @@  RDEPENDS_${PN} = "target:${PN}-sysroot-dev"
 PROVIDES_${PN}-g++ = "c++"
 DEPENDS_${PN}-g++ = "target:${PN}-sysroot-c++-dev"
 RDEPENDS_${PN}-gdb = "host:libncurses host:libdl"
-RDEPENDS_${PN}-gdb:HOST_OS_mingw32 = ""
+RDEPENDS_${PN}-gdb:HOST_LIBC_mingw = ""
 
 RDEPENDS_${PN}-sysroot-ltrace:>TARGET_BINFMT_elf = " ${PN}-sysroot-libelf"
 
@@ -65,9 +69,12 @@  FILES_${PN}-config = "/${PN}-config"
 
 FILES_${PN} = "\
 ${base_bindir} \
+${base_libdir}/clang/${CLANG_VERSION}/include \
+${base_libdir}/*.so \
 ${base_libdir}/*.so.* \
 ${base_libdir}/gcc/${TARGET_ARCH} \
 ${base_libdir}/*.a \
+${base_libexecdir}/as \
 ${base_libexecdir}/gcc/${TARGET_ARCH} \
 ${base_prefix}/${TARGET_ARCH}/bin \
 ${base_prefix}/${TARGET_ARCH}/lib \
@@ -87,8 +94,8 @@  ${base_prefix}/build.log* \
 
 FILES_${PN}-dbg += "\
 ${base_prefix}/${TARGET_ARCH}/bin/.debug \
-${libexecdir}/gcc/${TARGET_ARCH}/${CT_CC_VERSION}/.debug \
-${libexecdir}/gcc/${TARGET_ARCH}/${CT_CC_VERSION}/*/.debug \
+${libexecdir}/gcc/${TARGET_ARCH}/${CT_CC_GCC_VERSION}/.debug \
+${libexecdir}/gcc/${TARGET_ARCH}/${CT_CC_GCC_VERSION}/*/.debug \
 "
 
 FILES_${PN}-gdb = "\
@@ -142,7 +149,7 @@  FILES_${PN}-sysroot-gdbserver = "\
 ${base_prefix}/${TARGET_ARCH}/debug-root${target_bindir}/gdbserver${TARGET_EXEEXT} \
 "
 RDEPENDS_${PN}-sysroot-gdbserver = "${PN}-sysroot-libdl ${PN}-sysroot-libinproctrace"
-RDEPENDS_${PN}-sysroot-gdbserver:TARGET_OS_mingw32 = ""
+RDEPENDS_${PN}-sysroot-gdbserver:TARGET_LIBC_mingw = ""
 PROVIDES_${PN}-sysroot-gdbserver += "util/gdbserver"
 
 TARGET_PACKAGES += "${PN}-sysroot-gdbserver-doc"
@@ -195,6 +202,8 @@  ${base_prefix}/${TARGET_ARCH}/debug-root${target_libdir}/.debug/strace* \
 TARGET_PACKAGES += "${PN}-sysroot-dmalloc-dbg"
 FILES_${PN}-sysroot-dmalloc-dbg = "\
 ${base_prefix}/${TARGET_ARCH}/debug-root${target_bindir}/.debug/dmalloc \
+${base_prefix}/${TARGET_ARCH}/debug-root${target_mandir}/*/*trace.* \
+${base_prefix}/${TARGET_ARCH}/debug-root${target_docdir}/*trace \
 "
 
 TARGET_PACKAGES += "${PN}-sysroot-dmalloc"
@@ -237,8 +246,11 @@  ${base_prefix}/${TARGET_ARCH}/sysroot${target_libdir}/*.a \
 ${base_prefix}/${TARGET_ARCH}/sysroot${target_libdir}/*.la \
 ${base_prefix}/${TARGET_ARCH}/sysroot${target_libdir}/*.so \
 ${base_prefix}/${TARGET_ARCH}/sysroot${target_libdir}/pkgconfig/*.pc \
+${base_prefix}/${TARGET_ARCH}/sysroot${target_libdir}/*.dylib \
+${base_prefix}/${TARGET_ARCH}/sysroot${target_libdir}/system/*.dylib \
 ${base_prefix}/${TARGET_ARCH}/sysroot${target_libdir}/gconv \
 ${base_prefix}/${TARGET_ARCH}/sysroot/mingw \
+${base_prefix}/${TARGET_ARCH}/sysroot/System \
 "
 DEPENDS_${PN}-sysroot-dev  = "${PN}-sysroot-libc ${PN}-sysroot-libgcc"
 DEPENDS_${PN}-sysroot-dev:>TARGET_BINFMT_elf = " ${PN}-sysroot-libelf"
@@ -246,7 +258,7 @@  DEPENDS_${PN}-sysroot-dev:>TARGET_BINFMT_elf = " ${PN}-sysroot-libelf"
 RDEPENDS_${PN}-sysroot-dev = "${PN}-sysroot-libc-dev ${PN}-sysroot-libgcc-dev"
 RDEPENDS_${PN}-sysroot-dev:>TARGET_BINFMT_elf = " ${PN}-sysroot-libelf-dev"
 
-FILES_${PN}-sysroot-dev:>TARGET_OS_mingw32 = "\
+FILES_${PN}-sysroot-dev:>TARGET_LIBC_mingw = "\
 ${base_prefix}/${TARGET_ARCH}/sysroot${target_base_bindir}/*.dll \
 "
 
@@ -258,7 +270,7 @@  ${base_prefix}/${TARGET_ARCH}/sysroot${target_docdir} \
 "
 
 # Hackeydihack.... should instead get all sysroot doc in target_docdir
-FILES_${PN}-sysroot-doc:>TARGET_OS_mingw32 = "\
+FILES_${PN}-sysroot-doc:>TARGET_LIBC_mingw = "\
 ${base_prefix}/${TARGET_ARCH}/sysroot/doc/runtime \
 "
 
@@ -376,6 +388,8 @@  PROVIDES_${PN}-sysroot-iconv-utils:canadian-cross = ""
 TARGET_PACKAGES += "${PN}-sysroot-garbage"
 FILES_${PN}-sysroot-garbage = "\
 ${base_prefix}/${TARGET_ARCH}/sysroot \
+${base_prefix}/include \
+${base_prefix}/docs \
 "
 
 # Remaining / ignored files
@@ -384,7 +398,7 @@  ${base_prefix}/${TARGET_ARCH}/sysroot \
 #/${TARGET_ARCH}/debug-root
 
 SPLIT_FUNCS = "do_split_sysroot_mangle"
-SPLIT_FUNCS:>TARGET_OS_mingw32 = " do_split_sysroot_mangle_mingw32"
+SPLIT_FUNCS:>TARGET_LIBC_mingw = " do_split_sysroot_mangle_mingw32"
 SPLIT_FUNCS:>cross = " do_split_sysroot_mangle_stage"
 SPLIT_FUNCS:>sdk-cross = " do_split_sysroot_mangle_stage"
 SPLIT_FUNCS:>native = " do_split_sysroot_mangle_stage"
@@ -492,3 +506,6 @@  LICENSE_${PN}-sysroot-libfd		= "GPL-3.0+"
 LICENSE_${PN}-sysroot-gdbserver		= "GPL-2.0 & GPL-3.0 & LGPL-2.0 & LGPL-3.0"
 LICENSE_${PN}-sysroot-trace		= "BSD-2-Clause"
 LICENSE_${PN}-sysroot-dmalloc		= "CC-BY-NC-SA-3.0"
+
+# Change priority for overriding
+FILE_PRIORITY_gcc-sysroot-dev = "-1"
diff --git a/recipes/crosstool-ng/gcc-versions.inc b/recipes/crosstool-ng/gcc-versions.inc
index de678e1..fd8fbc2 100644
--- a/recipes/crosstool-ng/gcc-versions.inc
+++ b/recipes/crosstool-ng/gcc-versions.inc
@@ -1,10 +1,14 @@ 
 # -*- mode:python; -*-
 
 CT_CC				= "gcc"
-CT_CC_VERSION			= "${GCC_VERSION}"
+CT_CC_GCC_VERSION		= "${GCC_VERSION}"
+CT_CC_CLANG_VERSION		= "${CLANG_VERSION}"
+
+CT_LLVM_VERSION			?= "${CLANG_VERSION}"
 
 CT_KERNEL			= "linux"
-CT_KERNEL:TARGET_OS_mingw32	= "mingw32"
+CT_KERNEL:TARGET_LIBC_mingw	= "mingw32"
+CT_KERNEL:TARGET_KERNEL_darwin	= "darwin"
 CT_KERNEL_VERSION		= "${MACHINE_CT_KERNEL_VERSION}"
 CT_KERNEL_VERSION:sdk-cross	= "${SDK_CT_KERNEL_VERSION}"
 CT_KERNEL_VERSION:sdk		= "${SDK_CT_KERNEL_VERSION}"
@@ -13,10 +17,14 @@  USE_KERNEL_VERSION_MACHINE = "toolchain_kernel_version_machine"
 USE_KERNEL_VERSION_MACHINE:sdk-cross = ""
 USE_KERNEL_VERSION_MACHINE:native = ""
 USE_KERNEL_VERSION_MACHINE:sdk = ""
+CT_DARWIN_SDK 			?= "MacOSX${USE_toolchain_darwin_version_sdk}.sdk"
+RECIPE_FLAGS += "toolchain_darwin_version_sdk"
 MACHINE_CT_KERNEL_VERSION	= "${USE_toolchain_kernel_version_machine}"
-MACHINE_CT_KERNEL_VERSION:TARGET_OS_mingw32 = "${USE_toolchain_w32api_version}"
+MACHINE_CT_KERNEL_VERSION:TARGET_LIBC_mingw = ""
+MACHINE_CT_KERNEL_VERSION:TARGET_KERNEL_darwin = "${USE_toolchain_darwin_version_sdk}"
 SDK_CT_KERNEL_VERSION		= "${USE_toolchain_kernel_version_sdk}"
-SDK_CT_KERNEL_VERSION:TARGET_OS_mingw32 = "${USE_toolchain_w32api_version}"
+SDK_CT_KERNEL_VERSION:TARGET_LIBC_mingw = ""
+SDK_CT_KERNEL_VERSION:TARGET_KERNEL_darwin = ""
 BUILD_CT_KERNEL_VERSION		= "${USE_toolchain_kernel_version_build}"
 RECIPE_FLAGS += " ${USE_KERNEL_VERSION_MACHINE} toolchain_kernel_version_sdk \
 	toolchain_kernel_version_build toolchain_w32api_version"
@@ -31,7 +39,7 @@  RECIPE_FLAGS += "toolchain_min_kernel_machine \ toolchain_min_kernel_sdk \
 # Legacy (pre OE-lite/core 3.3) USE flags.
 # These are considered deprecated, and will be removed in OE-lite/core 4.
 RECIPE_FLAGS += "toolchain_libc \
-	toolchain_libc_version toolchain_mingwrt_version \
+	toolchain_libc_version toolchain_winapi_version \
 	toolchain_libc_eglibc_revision"
 
 #
@@ -106,6 +114,9 @@  def libc_useflags(d):
             return "ERROR: Invalid %s flag %r"%(libc_useflag, libc_str)
         d.set("CT_LIBC", "mingw")
         d.set("CT_LIBC_VERSION", libc[1])
+    elif libc[0] == "none":
+        d.set("CT_LIBC", "none")
+        d.set("CT_LIBC_VERSION", "0")
     else:
         return "ERROR: Invalid %s flag %r"%(libc_useflag, libc_str)
     return True
@@ -129,6 +140,9 @@  RECIPE_FLAGS		+= "toolchain_ppl_version"
 CT_CLOOG_VERSION	= "${USE_toolchain_cloog_version}"
 RECIPE_FLAGS		+= "toolchain_cloog_version"
 
+CT_ISL_VERSION		= "${USE_toolchain_isl_version}"
+RECIPE_FLAGS		+= "toolchain_isl_version"
+
 CT_MPC_VERSION		= "${USE_toolchain_mpc_version}"
 RECIPE_FLAGS		+= "toolchain_mpc_version"
 
@@ -144,8 +158,19 @@  RECIPE_FLAGS		+= "toolchain_ltrace_version"
 CT_STRACE_VERSION	= "${USE_toolchain_strace_version}"
 RECIPE_FLAGS		+= "toolchain_strace_version"
 
-CT_MINGW_PDCURSES_VERSION = "${USE_toolchain_pdcurses_version}"
-RECIPE_FLAGS		+= "toolchain_pdcurses_version"
-
 CT_DMALLOC_VERSION	= "${USE_toolchain_dmalloc_version}"
 RECIPE_FLAGS		+= "toolchain_dmalloc_version"
+
+CT_CC_clang			= "n"
+CT_CC_clang:USE_toolchain_clang	= "y"
+RECIPE_FLAGS			+= "toolchain_clang"
+
+CT_LLVM				= "n"
+CT_LLVM:USE_toolchain_llvm 	= "y"
+CT_LLVM:USE_toolchain_clang	= "y"
+CT_LLVM:TARGET_KERNEL_darwin	= "y"
+RECIPE_FLAGS			+= "toolchain_llvm"
+
+CT_LLVM_COMPILER_RT					= "n"
+CT_LLVM_COMPILER_RT:USE_toolchain_llvm_compiler_rt	= "y"
+RECIPE_FLAGS						+= "toolchain_llvm_compiler_rt"
diff --git a/recipes/crosstool-ng/gcc.inc b/recipes/crosstool-ng/gcc.inc
index b64dd7e..f3ca8cd 100644
--- a/recipes/crosstool-ng/gcc.inc
+++ b/recipes/crosstool-ng/gcc.inc
@@ -5,6 +5,7 @@  FILESPATHPKG = "${P}:${PN}-${@'.'.join('${PV}'.split('.')[:2])}:${PN}:files"
 require gcc-versions.inc
 
 B = "${WORKDIR}/build"
+DEFAULT_PREFERENCE = "1"
 
 # Depend on the right version of the ct-ng tool
 DEPENDS := "native:crosstool-ng_${PV}"
@@ -18,7 +19,7 @@  DEPENDS:>machine = " ${EXTRA_TOOLCHAIN_DEPENDS}"
 DEPENDS:>canadian-cross = " ${EXTRA_TOOLCHAIN_DEPENDS}"
 
 TUI_DEPENDS				= "host:libtermcap host:libreadline"
-TUI_DEPENDS:HOST_OS_mingw32		= ""
+TUI_DEPENDS:HOST_LIBC_mingw		= ""
 DEPENDS:>machine			+= " ${TUI_DEPENDS}"
 DEPENDS:>sdk				+= " ${TUI_DEPENDS}"
 DEPENDS:>canadian-cross			+= " ${TUI_DEPENDS} host:libexpat"
@@ -28,7 +29,7 @@  DEPENDS:>canadian-cross			+= " ${TUI_DEPENDS} host:libexpat"
 
 # FIXME: this looks REALLY wrong!
 BUILD_DEPENDS_CANADIAN = "host:libdl target:libdl target:libpthread target:libm"
-BUILD_DEPENDS_CANADIAN:HOST_OS_mingw32 = "target:libdl target:libpthread target:libm"
+BUILD_DEPENDS_CANADIAN:HOST_LIBC_mingw = "target:libdl target:libpthread target:libm"
 DEPENDS:>canadian-cross += " ${BUILD_DEPENDS_CANADIAN}"
 
 DEPENDS += "${TOOLCHAIN_DEPENDS}"
diff --git a/recipes/crosstool-ng/gcc_1.17.0.oe b/recipes/crosstool-ng/gcc_1.17.0.oe
deleted file mode 100644
index f10aaa3..0000000
--- a/recipes/crosstool-ng/gcc_1.17.0.oe
+++ /dev/null
@@ -1,108 +0,0 @@ 
-## Builds compilers using @recipe crosstool-ng
-##
-## Recipe for building compilers using crosstool-ng. Supports building a
-## a variety of compilers. For the full list of compilers creatable, see the
-## crosstool-ng website http://crosstool-ng.org/.
-##
-## @useflag machine_libc Set libc version when building
-##          cross/canadian-cross/machine. Distro set in distro/glibc.conf to
-##          glibc:2.12.2, or in distro/mingw32.conf to mingw:3.18, or in
-##          distro/uclibc.conf to uclibc:0.9.33.2. Default set to glibc:2.12.2.
-## @useflag sdk_linux_libc  Set libc version when building sdk/cross to linux.
-##          Default set in distro/common.inc to glibc:2.12.2.
-## @useflag sdk_windows_libc Set libc version for building sdk/sdk-cross to
-##          windows. Default se tin distro/common.inc to mingw:3.18.
-## @useflag toolchain_libc Notice! This flag is marked for removal in OE-lite
-##          4.0! Use the machine_libc, sdk_linux_libc, or sdk_windows_libc USE
-##          flags instead. DEPRECATED!
-## @useflag toolchain_libc_version Notice! This flag is marked for removal in
-##          OE-lite 4.0! Use machine_lib, sdk_linux_libc, or sdk_windows_libc
-##          USE flags instead. DEPRECATED!
-## @useflag toolchain_libc_eglibc_revision Notice! This flag is marked for
-##          removal in OE-lite 4.0! Use machine_libc, sdk_linux_libc, or
-##          sdk_windows_libc USE flags instead. DEPRECATED!
-## @useflag toolchain_mingwrt_version Notice! This flag is marked for removal
-##          in OE-lite 4.0! Use the sdk_windows_libc USE flag instead. This
-##          useflag is only used if sdk_windows_libc is not set. DEPRECATED.
-## @useflag toolchain_strace Enable strace. Enabled by default.
-## @useflag toolchain_ltrace Enable ltrace. Enabled by default.
-## @useflag toolchain_dmalloc Enable dmalloc. Disabled by default.
-## @useflag extra_toolchain_patch Enabled a patch to be appended to the list of
-##          DEPENDS. Set it to what your package (with the patch) provides.
-##          Usefull for applying crosstool-ng patches when building a compiler.
-## @useflag toolchain_cross_gdb Enabled gdb when building cross. Disabled by
-##          default.
-## @useflag toolchain_kernel_version_machine Kernel version that the toolchain
-##          is build for, for machine builds. Default is set to 2.6.32.60.
-## @useflag toolchain_kernel_version_sdk Kernel version that the toolchain is
-##          build for, for sdk and sdk-cross builds. Default is set to
-##           2.6.32.60.
-## @useflag toolchain_kernel_version_build Kernel version that the toolchain
-##          is build for, for native builds. Default is set to 2.6.32.60.
-## @useflag toolchain_w32api_version Minimum kernel version supported when
-##          building to mingw. Default is set to 3.14.
-## @useflag toolchain_pdcurses_version PDcurses version for when building to
-##          mingw. Default is set to 3.4.
-## @useflag toolchain_min_kernel_machine Minimum kernel version supported when
-##          building to machine. Default is set to 2.6.27.
-## @useflag toolchain_min_kernel_sdk Minimum kernel version supported when
-##          building to sdk or sdk-cross. Default is set to 2.6.9.
-## @useflag toolchain_min_kernel_build Minimum kernel version supported when
-##          building native. Default is set to 2.6.9.
-## @useflag toolchain_binutils_version Version of binutils. Default is set to
-##          2.20.1a.
-## @useflag toolchain_gdb_version Gdb version. Default is set to 7.2a.
-## @useflag toolchain_gmp_version Gmp version. Default is set to 5.0.2.
-## @useflag toolchain_mpfr_version Mpfr version. Default is set to 3.0.1.
-## @useflag toolchain_mpc_version Mpc version. Default is set to 0.9.
-## @useflag toolchain_cloog_version Cloog version. Default is set to 0.15.11.
-## @useflag toolchain_elf2flt_version elf2flt version. Default is set to
-##          commitid 40f0d175e0847d922faa85cc18ec01f2129bb2b9.
-## @useflag toolchain_ltrace_version ltrace version. Default is set to 0.5.3.
-## @useflag toolchain_strace_version strace version. Default is set to 4.5.20.
-## @useflag toolchain_dmalloc_version Dmalloc version. Default is set to 5.5.2.
-## @useflag gcc_ld_so_unstripped Enable unstripped ld_so. Default disabled.
-
-RECIPE_TYPES = "cross sdk-cross canadian-cross"
-
-DEFAULT_USE_machine_libc			= "glibc:2.12.2"
-
-DEFAULT_USE_toolchain_kernel_version_machine	= "2.6.32.60"
-DEFAULT_USE_toolchain_kernel_version_sdk	= "2.6.32.60"
-DEFAULT_USE_toolchain_kernel_version_build	= "2.6.32.60"
-
-DEFAULT_USE_toolchain_w32api_version		= "3.14"
-DEFAULT_USE_toolchain_pdcurses_version		= "3.4"
-
-DEFAULT_USE_toolchain_min_kernel_machine	= "2.6.27"
-DEFAULT_USE_toolchain_min_kernel_sdk		= "2.6.9"
-DEFAULT_USE_toolchain_min_kernel_build		= "2.6.9"
-
-DEFAULT_USE_toolchain_binutils_version		= "2.20.1a"
-DEFAULT_USE_toolchain_gdb_version		= "7.2a"
-DEFAULT_USE_toolchain_gmp_version		= "5.0.2"
-DEFAULT_USE_toolchain_mpfr_version		= "3.0.1"
-DEFAULT_USE_toolchain_mpc_version		= "0.9"
-DEFAULT_USE_toolchain_ppl_version		= "0.11.2"
-DEFAULT_USE_toolchain_cloog_version		= "0.15.11"
-DEFAULT_USE_toolchain_libelf_version		= "0.8.13"
-DEFAULT_USE_toolchain_elf2flt_version		= "commit=40f0d175e0847d922faa85cc18ec01f2129bb2b9"
-DEFAULT_USE_toolchain_ltrace_version		= "0.5.3"
-DEFAULT_USE_toolchain_strace_version		= "4.5.20"
-DEFAULT_USE_toolchain_dmalloc_version		= "5.5.2"
-
-require gcc.inc
-
-SRC_URI += "file://gcc-linaro-fix-lp-605255.patch;apply=0"
-SRC_URI += "file://gcc-r171000-fix-pr47688.patch;apply=0"
-
-do_unpack[postfuncs] += "do_unpack_mvpatches"
-do_unpack_mvpatches () {
-       mkdir -p ${S}/gcc/4.5.3
-       mv ${SRCDIR}/gcc-linaro-fix-lp-605255.patch ${S}/gcc/4.5.3
-       mv ${SRCDIR}/gcc-r171000-fix-pr47688.patch ${S}/gcc/4.5.3
-}
-
-# Local Variables:
-# mode: python
-# End:
diff --git a/recipes/crosstool-ng/gcc_1.17.0.oe.sig b/recipes/crosstool-ng/gcc_1.17.0.oe.sig
deleted file mode 100644
index 847b548..0000000
--- a/recipes/crosstool-ng/gcc_1.17.0.oe.sig
+++ /dev/null
@@ -1,50 +0,0 @@ 
-e36684442a6171cc3a5165c8c49c70f67db7288c  PDCurses-3.4.tar.gz
-3f0e3746a15f806a95dd079be2a7f43c17b18818  binutils-2.20.1a.tar.bz2
-525255ca6874b872540c9967a1d26acfbc7c8230  binutils-2.21.1a.tar.bz2
-65b304a0b9a53a686ce50a01173d1f40f8efe404  binutils-2.22.tar.bz2
-20719de78decbd724bc3ab9d6dce2ea5e5922335  dmalloc-5.5.2.tgz
-45d1e7242a08cbb7a343ed2bf640a5afd0ebe098  gcc-4.4.4.tar.bz2
-2b1427a932a620c909d74f1e4821ed90c90fd350  gcc-4.4.5.tar.bz2
-73c45dfda5eef6b124be53e56828b5925198cc1b  gcc-4.5.3.tar.bz2
-8bf66f7a71534ba564563a0ba0b2517aead8ac30  gcc-4.6.1.tar.bz2
-ce317ca5c8185b58bc9300182b534608c578637f  gcc-4.6.3.tar.bz2
-a464ba0f26eef24c29bcd1e7489421117fb9ee35  gcc-4.7.2.tar.bz2
-6dcd985f46430d157b2b66ef2a1558279c961da3  gcc-linaro-4.7-2012.10.tar.bz2
-3b2c0d50533bcf834c2da0a700dfc2f4852a07e4  gdb-7.0.1a.tar.bz2
-ba3980daf648d3ca0dfdee012efc5faad840ae86  gdb-7.1a.tar.bz2
-14daf8ccf1307f148f80c8db17f8e43f545c2691  gdb-7.2a.tar.bz2
-d68061206a3485bab32da3fb751c6c3b913c2b9c  gdb-7.3a.tar.bz2
-1b0f8c3778d4b10c8d2be6922ac01a9900e8116c  gdb-7.4.1.tar.bz2
-2c8f8ca6fe548dcedc9dbcfcfe3e135bb2d937d4  gdb-linaro-7.5-2012.09.tar.bz2
-86db07dc1fbb93a5c72d4e0f880874751a19ef71  git://sourceware.org/git/glibc-ports.git;tag=glibc-2.12.2
-3ef6d36eee2dc7c4351f215f689e6a04c161a35e  glibc-2.12.2.tar.bz2
-86dbd8a6b2fbb4c75760a80009227c9a11b801a9  gmp-4.3.0.tar.bz2
-acbd1edc61230b1457e9742136994110e4f381b2  gmp-4.3.1.tar.bz2
-c011e8feaf1bb89158bd55eaabd7ef8fdd101a2c  gmp-4.3.2.tar.bz2
-6340edc7ceb95f9015a758c7c0d196eb0f441d49  gmp-5.0.1.tar.bz2
-2968220e1988eabb61f921d11e5d2db5431e0a35  gmp-5.0.2.tar.bz2
-b6ff5c0262418fbca8ce281f9f927e25181f4237  libelf-0.8.12.tar.gz
-c1d6ac5f182d19dd685c4dfd74eedbfe3992425d  libelf-0.8.13.tar.gz
-cdcec9db35957865eb3ed30a0dec4c3f14b18809  linux-2.6.32.59.tar.bz2
-67f299d887f290b26a3e6da45cff0ba6166e1186  linux-2.6.32.60.tar.bz2
-ac727da91126fd726d6aa6a81de90c002b2a86d0  linux-2.6.37.6.tar.bz2
-6b7e8c6fd5fd956278ba9eac342272a63d5a22d6  linux-3.0.48.tar.bz2
-d1db70ee633d04dec398df75a312343808e3bb72  ltrace_0.5.3.orig.tar.gz
-45f5abc0d3d88b06dcb2256df4080ad39ff511d8  mingwrt-3.18-mingw32-src.tar.gz
-07e48c8e2e8f1b3fa84502c310056c01f4cb3ae3  mpc-0.7.tar.gz
-5ef03ca7aee134fe7dfecb6c9d048799f0810278  mpc-0.8.1.tar.gz
-339550cedfb013b68749cd47250cd26163b9edd4  mpc-0.8.2.tar.gz
-229722d553030734d49731844abfef7617b64f1a  mpc-0.9.tar.gz
-6493015d9b5101b0a5ae62d28e64ebcc55b15f89  mpfr-2.4.0.tar.bz2
-1f965793526cafefb30cda64cebf3712cb75b488  mpfr-2.4.1.tar.bz2
-7ca93006e38ae6e53a995af836173cf10ee7c18c  mpfr-2.4.2.tar.bz2
-8ae8bc72ac26a0f17ad9f57c520264c056c64770  mpfr-3.0.0.tar.bz2
-fbf402fc196724ae60ef01eb6ca8490b1ea4db69  mpfr-3.0.1.tar.bz2
-9ba6dfe62dad298f0570daf182db31660f7f016c  mpfr-3.1.0.tar.bz2
-50081a7201dc240299396f088abe53c07de98e4c  strace-4.5.18.tar.bz2
-5554c2fd8ffae5c1e2b289b2024aa85a0889c989  strace-4.5.19.tar.bz2
-3f5c8874610d7e3d13fc1c8b2e5fb5513468c45a  strace-4.5.20.tar.bz2
-17ee58a9d5c3f7d4056d0f098a89d6f9732b4fd2  svn://www.eglibc.org/svn/branches/eglibc-2_16;protocol=http;rev=r21913
-f6d77131a2f158d3fbddde969e1359073085fc4c  svn://www.eglibc.org/svn/branches/eglibc-2_16;protocol=http;rev=r22666
-4d8d67d6754409bd10015d67d1ce7a04c0b001ba  uClibc-0.9.33.2.tar.bz2
-851d2df6b213c11a30e96c05665f91d68dfb3ce9  w32api-3.14-mingw32-src.tar.gz
diff --git a/recipes/crosstool-ng/gcc_github.oe b/recipes/crosstool-ng/gcc_github.oe
new file mode 100644
index 0000000..e2339db
--- /dev/null
+++ b/recipes/crosstool-ng/gcc_github.oe
@@ -0,0 +1,46 @@ 
+# -*- mode:python; -*-
+
+RECIPE_TYPES = "cross sdk-cross canadian-cross"
+
+DEFAULT_USE_toolchain_libc			= "glibc"
+DEFAULT_USE_toolchain_libc_version		= "2.14"
+
+#DEFAULT_USE_toolchain_libc:TARGET_OS_linux-uclibc = "uclibc"
+#DEFAULT_USE_toolchain_libc_version_linux-uclibc = ???
+
+#DEFAULT_USE_toolchain_libc			= "eglibc"
+#DEFAULT_USE_toolchain_libc_version		= "2_13"
+#DEFAULT_USE_toolchain_libc_eglibc_revision	= "HEAD"
+
+DEFAULT_USE_toolchain_clang			= "0"
+DEFAULT_USE_toolchain_llvm			= "0"
+DEFAULT_USE_toolchain_llvm_compiler_rt		= "0"
+
+DEFAULT_USE_toolchain_kernel_version_machine	= "3.13.11"
+DEFAULT_USE_toolchain_kernel_version_sdk	= "3.13.11"
+DEFAULT_USE_toolchain_kernel_version_build	= "3.13.11"
+
+DEFAULT_USE_toolchain_darwin_version_sdk 	= "10.7"
+
+DEFAULT_USE_toolchain_winapi_version		= "2.0.7"
+
+DEFAULT_USE_toolchain_min_kernel_machine	= "2.6.27"
+DEFAULT_USE_toolchain_min_kernel_sdk		= "2.6.9"
+DEFAULT_USE_toolchain_min_kernel_build		= "2.6.9"
+
+DEFAULT_USE_toolchain_binutils_version			= "2.22"
+DEFAULT_USE_toolchain_binutils_version:TARGET_KERNEL_darwin	= "809"
+DEFAULT_USE_toolchain_gdb_version			= "7.2a"
+DEFAULT_USE_toolchain_gmp_version			= "5.1.3"
+DEFAULT_USE_toolchain_mpfr_version			= "3.1.2"
+DEFAULT_USE_toolchain_mpc_version			= "1.0.2"
+DEFAULT_USE_toolchain_ppl_version			= "0.11.2"
+DEFAULT_USE_toolchain_cloog_version			= "0.18.1"
+DEFAULT_USE_toolchain_isl_version			= "0.12.2"
+DEFAULT_USE_toolchain_libelf_version			= "0.8.13"
+DEFAULT_USE_toolchain_elf2flt_version			= "commit=40f0d175e0847d922faa85cc18ec01f2129bb2b9"
+DEFAULT_USE_toolchain_ltrace_version			= "0.5.3"
+DEFAULT_USE_toolchain_strace_version			= "4.5.20"
+DEFAULT_USE_toolchain_dmalloc_version			= "5.5.2"
+
+require gcc.inc
diff --git a/recipes/crosstool-ng/gcc_github.oe.sig b/recipes/crosstool-ng/gcc_github.oe.sig
new file mode 100644
index 0000000..821eb1c
--- /dev/null
+++ b/recipes/crosstool-ng/gcc_github.oe.sig
@@ -0,0 +1,51 @@ 
+ae9e1ab046822007f25c88e1d8f2166e065da8c2  autoconf-2.65.tar.gz
+dc60b87d720cd2669f3e2e1659d904b383149c40  automake-1.11.1.tar.gz
+525255ca6874b872540c9967a1d26acfbc7c8230  binutils-2.21.1a.tar.bz2
+65b304a0b9a53a686ce50a01173d1f40f8efe404  binutils-2.22.tar.bz2
+b7bff424c86420866543379effb5b70d4404b95b  cctools-809.tar.gz
+ccd6dbf2cdb1189a028b70bcb8a22509c25c74c8  cfe-3.3.src.tar.gz
+a6a3c815dd045e9c13c7ae37d2cfefe65607860d  clang-3.4.src.tar.gz
+2dc70313e8e2c6610b856d627bce9c9c3f848077  cloog-0.18.1.tar.gz
+3d8725487a41e0f06c5d52daad74e279b555b833  cloog-ppl-0.15.10.tar.gz
+42fa476a79a1d52da41608a946dcb47c70f7e3b9  cloog-ppl-0.15.11.tar.gz
+745386ec046e3e49742e1ecb6912c560ccd0a002  compiler-rt-3.3.src.tar.gz
+fd1c6b6e08d0bb8a4682ffb705f5921d10bdbd64  dyld-210.2.3.tar.gz
+9182ca542c5368d3e1df1a70040f28006771e240  e2fsprogs-libs-1.41.14.tar.gz
+73c45dfda5eef6b124be53e56828b5925198cc1b  gcc-4.5.3.tar.bz2
+810fb70bd721e1d9f446b6503afe0a9088b62986  gcc-4.8.2.tar.bz2
+292a0cfcfdc061cb083658efd9a3812a120a1f50  gcc-5666.3.tar.gz
+14daf8ccf1307f148f80c8db17f8e43f545c2691  gdb-7.2a.tar.bz2
+86db07dc1fbb93a5c72d4e0f880874751a19ef71  git://sourceware.org/git/glibc-ports.git;tag=glibc-2.12.2
+75bbd6583321cfa8847065d2882f3a883c5228ed  git://sourceware.org/git/glibc-ports.git;tag=glibc-2.13
+3ef6d36eee2dc7c4351f215f689e6a04c161a35e  glibc-2.12.2.tar.bz2
+14d83dced873a21a3da6a0bfa0926f40d82ef980  glibc-2.13.tar.bz2
+382f4438a7321dc29ea1a3da8e7852d2c2b3208c  glibc-2.19.tar.bz2
+2968220e1988eabb61f921d11e5d2db5431e0a35  gmp-5.0.2.tar.bz2
+21d037f7fb32ae305a2e4157cff0c8caab06fe84  gmp-5.1.1.tar.bz2
+b35928e2927b272711fdfbf71b7cfd5f86a6b165  gmp-5.1.3.tar.bz2
+ca98a91e35fb3ded10d080342065919764d6f928  isl-0.12.2.tar.bz2
+df51258a75e4c5f0df185b99f74f7232d310f45e  ld64-127.2.tar.gz
+c1d6ac5f182d19dd685c4dfd74eedbfe3992425d  libelf-0.8.13.tar.gz
+5afa73c8ef9ebe64bbb438a0f8779c9036e43c55  libtool-2.2.6b.tar.gz
+32bfdde70d79d616adf3102fa9ccef0ee8e7c8f2  linux-3.10.2.tar.bz2
+893f9e5ce010d3ebb3fa7e308d105a68789d076b  linux-3.11.4.tar.bz2
+f7887f6f480596b2fdf07b1910a6c4b8947f0afb  linux-3.12.18.tar.gz
+52afc6d08909b2587681f52c39bef7a74eb1d05c  linux-3.12.tar.bz2
+75191798dc3dd4f152edb7ec3c336754955e6347  linux-3.13.11.tar.gz
+c6c22d5593419e3cb47cbcf16d967640e5cce133  llvm-3.3.src.tar.gz
+10b1fd085b45d8b19adb9a628353ce347bc136b8  llvm-3.4.src.tar.gz
+d1db70ee633d04dec398df75a312343808e3bb72  ltrace_0.5.3.orig.tar.gz
+75aba989a6dfaa0bbe43d3bcf8d1d47bcd03e39a  m4-1.4.13.tar.gz
+cd4fa5a3184176492bf0799593a8f250a728210c  make-3.81.tar.gz
+92d1b87a30d1c9482e52fb4a68e8a355e7946331  make-3.82.tar.gz
+55f74b8b87c9b081844a1ba46e97b1db696f6e00  mingw-w64-v2.0.7.tar.gz
+c167b1dc114a13c465fe6adcce9dc65c509baf75  mingw-w64-v3.1.0.tar.bz2
+229722d553030734d49731844abfef7617b64f1a  mpc-0.9.tar.gz
+8c7e19ad0dd9b3b5cc652273403423d6cf0c5edf  mpc-1.0.1.tar.gz
+5072d82ab50ec36cc8c0e320b5c377adb48abe70  mpc-1.0.2.tar.gz
+fbf402fc196724ae60ef01eb6ca8490b1ea4db69  mpfr-3.0.1.tar.bz2
+46d5a11a59a4e31f74f73dd70c5d57a59de2d0b4  mpfr-3.1.2.tar.bz2
+3f1b1223c9e8189bfe4e186d86449775bd903460  openssl-1.0.1e.tar.gz
+9bd5f6afa5d90aa1d8530b0b155f8e5bb03429b8  ppl-0.10.2.tar.gz
+f3fe00f14983d6abcd1d4d886d340af04a974dfa  ppl-0.11.2.tar.gz
+3f5c8874610d7e3d13fc1c8b2e5fb5513468c45a  strace-4.5.20.tar.bz2