Merge "Additional sysroot checks."
diff --git a/patches/gcc-patch.txt b/patches/gcc-patch.txt
index 403f226..d3db393 100644
--- a/patches/gcc-patch.txt
+++ b/patches/gcc-patch.txt
@@ -257,7 +257,7 @@
+
diff -rdcp --unidirectional-new-file gcc-6.2.0-fsf/gcc/config/fuchsia.h gcc-6.2.0/gcc/config/fuchsia.h
*** gcc-6.2.0-fsf/gcc/config/fuchsia.h 1969-12-31 16:00:00.000000000 -0800
---- gcc-6.2.0/gcc/config/fuchsia.h 2016-12-20 17:04:59.055746685 -0800
+--- gcc-6.2.0/gcc/config/fuchsia.h 2017-01-10 09:07:12.943847114 -0800
***************
*** 0 ****
--- 1,105 ----
@@ -326,7 +326,7 @@
+ #define TARGET_OS_CPP_BUILTINS() \
+ do \
+ { \
-+ builtin_define ("__fuchsia__"); \
++ builtin_define ("__Fuchsia__"); \
+ TARGET_SUB_OS_CPP_BUILTINS(); \
+ } \
+ while (false)
@@ -829,8 +829,8 @@
if (signal (SIGPIPE, SIG_IGN) != SIG_IGN)
signal (SIGPIPE, fatal_signal);
diff -rdcp --unidirectional-new-file gcc-6.2.0-fsf/libgcc/config/arm/unwind-arm.h gcc-6.2.0/libgcc/config/arm/unwind-arm.h
-*** gcc-6.2.0-fsf/libgcc/config/arm/unwind-arm.h 2016-11-23 09:11:08.272176504 -0800
---- gcc-6.2.0/libgcc/config/arm/unwind-arm.h 2016-11-21 15:14:40.515788234 -0800
+*** gcc-6.2.0-fsf/libgcc/config/arm/unwind-arm.h 2016-12-20 14:00:07.118829367 -0800
+--- gcc-6.2.0/libgcc/config/arm/unwind-arm.h 2017-01-10 09:08:36.419550153 -0800
*************** extern "C" {
*** 49,55 ****
return 0;
@@ -844,7 +844,7 @@
return 0;
#if (defined(linux) && !defined(__uClinux__)) || defined(__NetBSD__) \
-! || defined(__FreeBSD__) || defined(__fuchsia__)
+! || defined(__FreeBSD__) || defined(__Fuchsia__)
/* Pc-relative indirect. */
#define _GLIBCXX_OVERRIDE_TTYPE_ENCODING (DW_EH_PE_pcrel | DW_EH_PE_indirect)
tmp += ptr;
@@ -940,15 +940,15 @@
i[34567]86-*-dragonfly*)
tmake_file="${tmake_file} i386/t-dragonfly i386/t-crtstuff"
diff -rdcp --unidirectional-new-file gcc-6.2.0-fsf/libiberty/pex-unix.c gcc-6.2.0/libiberty/pex-unix.c
-*** gcc-6.2.0-fsf/libiberty/pex-unix.c 2016-11-23 09:11:07.752178546 -0800
---- gcc-6.2.0/libiberty/pex-unix.c 2016-12-09 16:42:25.553491646 -0800
+*** gcc-6.2.0-fsf/libiberty/pex-unix.c 2016-12-20 14:00:06.758830644 -0800
+--- gcc-6.2.0/libiberty/pex-unix.c 2017-01-10 09:09:16.271408329 -0800
*************** extern int errno;
*** 60,65 ****
--- 60,71 ----
#include <process.h>
#endif
-+ #ifdef __fuchsia__
++ #ifdef __Fuchsia__
+ #include <launchpad/launchpad.h>
+ #include <magenta/syscalls.h>
+ #include <magenta/syscalls/object.h>
@@ -970,7 +970,7 @@
static pid_t pex_wait (struct pex_obj *, pid_t, int *, struct pex_time *);
-! #ifdef __fuchsia__
+! #ifdef __Fuchsia__
!
! static pid_t
! pex_wait (struct pex_obj *obj ATTRIBUTE_UNUSED, pid_t pid, int *status,
@@ -1017,7 +1017,7 @@
/* Execute a child. */
-! #if defined(__fuchsia__) || (defined(HAVE_SPAWNVE) && defined(HAVE_SPAWNVPE))
+! #if defined(__Fuchsia__) || (defined(HAVE_SPAWNVE) && defined(HAVE_SPAWNVPE))
/* Implementation of pex->exec_child using the Cygwin spawn operation. */
/* Subroutine of pex_unix_exec_child. Move OLD_FD to a new file descriptor
@@ -1027,7 +1027,7 @@
{
typedef const char * const *cc_cp;
-+ #ifdef __fuchsia__
++ #ifdef __Fuchsia__
+ {
+ int argc;
+