Merge "Add fuchsia support to the auxiliary compiler runtime libraries."
diff --git a/patches/gmp-patch.txt b/patches/gmp-patch.txt
new file mode 100644
index 0000000..babc876
--- /dev/null
+++ b/patches/gmp-patch.txt
@@ -0,0 +1,36 @@
+diff -rdcp gmp-5.1.3-orig/configfsf.sub gmp-5.1.3/configfsf.sub
+*** gmp-5.1.3/configfsf.sub	2013-09-30 03:18:28.000000000 -0700
+--- gmp-5.1.3-fuchsia/configfsf.sub	2016-11-02 14:19:33.480028816 -0700
+*************** case $os in
+*** 1514,1519 ****
+--- 1514,1522 ----
+  		;;
+  	-nacl*)
+  		;;
++ 	-fuchsia*)
++ 		os=-fuchsia
++ 		;;
+  	-none)
+  		;;
+  	*)
+diff -rdcp gmp-5.1.3/gmp-h.in gmp-5.1.3-fuchsia/gmp-h.in
+*** gmp-5.1.3/gmp-h.in	2013-09-30 03:18:28.000000000 -0700
+--- gmp-5.1.3-fuchsia/gmp-h.in	2016-11-02 15:00:44.702141626 -0700
+*************** typedef __mpq_struct *mpq_ptr;
+*** 264,270 ****
+    || defined (_MSL_STDIO_H)           /* Metrowerks */          \
+    || defined (_STDIO_H_INCLUDED)      /* QNX4 */		\
+    || defined (_ISO_STDIO_ISO_H)       /* Sun C++ */		\
+!   || defined (__STDIO_LOADED)         /* VMS */
+  #define _GMP_H_HAVE_FILE 1
+  #endif
+  
+--- 264,271 ----
+    || defined (_MSL_STDIO_H)           /* Metrowerks */          \
+    || defined (_STDIO_H_INCLUDED)      /* QNX4 */		\
+    || defined (_ISO_STDIO_ISO_H)       /* Sun C++ */		\
+!   || defined (__STDIO_LOADED)         /* VMS */			\
+!   || defined (__DEFINED_FILE)         /* musl */
+  #define _GMP_H_HAVE_FILE 1
+  #endif
+  
diff --git a/patches/mpc-patch.txt b/patches/mpc-patch.txt
new file mode 100644
index 0000000..fbca915
--- /dev/null
+++ b/patches/mpc-patch.txt
@@ -0,0 +1,14 @@
+diff -rdcp mpc-1.0.3/config.sub mpc-1.0.3-fuchsia/config.sub
+*** mpc-1.0.3/config.sub	2015-02-16 04:28:25.000000000 -0800
+--- mpc-1.0.3-fuchsia/config.sub	2016-11-02 15:29:27.031205366 -0700
+*************** case $os in
+*** 1525,1530 ****
+--- 1525,1532 ----
+  		;;
+  	-nacl*)
+  		;;
++ 	-fuchsia*)
++ 		;;
+  	-none)
+  		;;
+  	*)
diff --git a/patches/mpfr-patch.txt b/patches/mpfr-patch.txt
new file mode 100644
index 0000000..dd16aa8
--- /dev/null
+++ b/patches/mpfr-patch.txt
@@ -0,0 +1,21 @@
+diff -rdcp mpfr-3.1.3/config.sub mpfr-3.1.3-fuchsia/config.sub
+*** mpfr-3.1.3/config.sub	2016-11-02 15:03:19.805513995 -0700
+--- mpfr-3.1.3-fuchsia/config.sub	2016-11-04 17:30:32.321099399 -0700
+*************** case $os in
+*** 1393,1399 ****
+  	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+  	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+  	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+! 	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
+  	# Remember, each alternative MUST END IN *, to match a version number.
+  		;;
+  	-qnx*)
+--- 1393,1400 ----
+  	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+  	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+  	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+! 	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
+! 	      | -tirtos* | -fuchsia*)
+  	# Remember, each alternative MUST END IN *, to match a version number.
+  		;;
+  	-qnx*)