From f250397c96dbfb7f3ea1c0a5ae1d9d1a82e1f4b2 Mon Sep 17 00:00:00 2001
From: Waldemar Brodkorb <wbx@openadk.org>
Date: Thu, 3 Dec 2015 11:46:03 +0100
Subject: toolchain: add newlib support

OpenADK can now build bare-metal toolchains.
Tested for ARM/MIPS. No runtime testing, yet.
---
 toolchain/newlib/patches/2.2.0/disable-docs.patch | 14 ++++++++++++++
 toolchain/newlib/patches/2.2.0/fix-tooldir.patch  | 12 ++++++++++++
 2 files changed, 26 insertions(+)
 create mode 100644 toolchain/newlib/patches/2.2.0/disable-docs.patch
 create mode 100644 toolchain/newlib/patches/2.2.0/fix-tooldir.patch

(limited to 'toolchain/newlib/patches')

diff --git a/toolchain/newlib/patches/2.2.0/disable-docs.patch b/toolchain/newlib/patches/2.2.0/disable-docs.patch
new file mode 100644
index 000000000..3b500b61c
--- /dev/null
+++ b/toolchain/newlib/patches/2.2.0/disable-docs.patch
@@ -0,0 +1,14 @@
+diff -Nur newlib-2.2.0-1.orig/etc/Makefile.in newlib-2.2.0-1/etc/Makefile.in
+--- newlib-2.2.0-1.orig/etc/Makefile.in	2010-11-20 20:37:57.000000000 +0100
++++ newlib-2.2.0-1/etc/Makefile.in	2015-12-03 14:23:44.043820971 +0100
+@@ -63,8 +63,8 @@
+ PDFFILES = standards.pdf configure.pdf
+ HTMLFILES = standards.html configure.html
+ 
+-all: info
+-install install-strip: install-info
++all:
++install install-strip:
+ 
+ uninstall:
+ 
diff --git a/toolchain/newlib/patches/2.2.0/fix-tooldir.patch b/toolchain/newlib/patches/2.2.0/fix-tooldir.patch
new file mode 100644
index 000000000..652f7494b
--- /dev/null
+++ b/toolchain/newlib/patches/2.2.0/fix-tooldir.patch
@@ -0,0 +1,12 @@
+diff -Nur newlib-2.2.0-1.orig/configure newlib-2.2.0-1/configure
+--- newlib-2.2.0-1.orig/configure	2014-07-05 23:09:07.000000000 +0200
++++ newlib-2.2.0-1/configure	2015-11-25 06:33:11.461178398 +0100
+@@ -6985,7 +6985,7 @@
+ 
+ # Some systems (e.g., one of the i386-aix systems the gas testers are
+ # using) don't handle "\$" correctly, so don't use it here.
+-tooldir='${exec_prefix}'/${target_noncanonical}
++tooldir='${exec_prefix}'
+ build_tooldir=${tooldir}
+ 
+ # Create a .gdbinit file which runs the one in srcdir
-- 
cgit v1.2.3