Index: patches/gcc-4.8.3-branch_update-1.patch
===================================================================
--- patches/gcc-4.8.3-branch_update-1.patch	(revision 390c3abd028ccad73f2d43f1f526ea1caf45046c)
+++ patches/gcc-4.8.3-branch_update-1.patch	(revision 390c3abd028ccad73f2d43f1f526ea1caf45046c)
@@ -0,0 +1,88 @@
+Submitted By: William Harrington (kb0iic at cross-lfs dot org)
+Date: 05-31-2014
+Initial Package Version: 4.8.3
+Origin: Upstream
+Upstream Status: Not applied
+Description: Do not depend on 2D + 1 form in parallelism check.
+http://gcc.gnu.org/ml/gcc-patches/2013-07/msg00524.html
+
+Includes PR tree-optimization/54094
+
+diff -Naur gcc-4.8.3.orig/gcc/ChangeLog gcc-4.8.3/gcc/ChangeLog
+--- gcc-4.8.3.orig/gcc/ChangeLog	2014-05-22 09:09:59.000000000 +0000
++++ gcc-4.8.3/gcc/ChangeLog	2014-06-01 05:18:00.010857918 +0000
+@@ -729,6 +729,15 @@
+ 	* config/rs6000/rs6000-protos.h (rs6000_data_alignment): Declare.
+ 	* config/rs6000/rs6000.c (rs6000_data_alignment): New function.
+ 
++	2013-07-13  Tobias Grosser  <tobias@grosser.es>
++
++	PR tree-optimization/54094
++	* graphite-clast-to-gimple.c (translate_clast_for_loop): Derive the
++	  scheduling dimension for the parallelism check from the polyhedral
++	  information in the AST.
++	* graphite-dependences.c (carries_deps): Do not assume the schedule is
++	  in 2D + 1 form.
++
+ 	2013-07-11  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
+ 
+ 	* config/rs6000/rs6000.md (""*tls_gd_low<TLSmode:tls_abi_suffix>"):
+diff -Naur gcc-4.8.3.orig/gcc/graphite-clast-to-gimple.c gcc-4.8.3/gcc/graphite-clast-to-gimple.c
+--- gcc-4.8.3.orig/gcc/graphite-clast-to-gimple.c	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/graphite-clast-to-gimple.c	2014-06-01 05:16:25.485054767 +0000
+@@ -1170,8 +1170,11 @@
+   redirect_edge_succ_nodup (next_e, after);
+   set_immediate_dominator (CDI_DOMINATORS, next_e->dest, next_e->src);
+ 
++  isl_set *domain = isl_set_from_cloog_domain (stmt->domain);
++  int scheduling_dim = isl_set_n_dim (domain);
++
+   if (flag_loop_parallelize_all
+-      && loop_is_parallel_p (loop, bb_pbb_mapping, level))
++      && loop_is_parallel_p (loop, bb_pbb_mapping, scheduling_dim))
+     loop->can_be_parallel = true;
+ 
+   return last_e;
+diff -Naur gcc-4.8.3.orig/gcc/graphite-dependences.c gcc-4.8.3/gcc/graphite-dependences.c
+--- gcc-4.8.3.orig/gcc/graphite-dependences.c	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/graphite-dependences.c	2014-06-01 05:16:25.485054767 +0000
+@@ -297,7 +297,7 @@
+ 	      int depth)
+ {
+   bool res;
+-  int idx, i;
++  int i;
+   isl_space *space;
+   isl_map *lex, *x;
+   isl_constraint *ineq;
+@@ -312,13 +312,12 @@
+   space = isl_map_get_space (x);
+   ineq = isl_inequality_alloc (isl_local_space_from_space (space));
+ 
+-  idx = 2 * depth + 1;
+-  for (i = 0; i < idx; i++)
++  for (i = 0; i < depth - 1; i++)
+     lex = isl_map_equate (lex, isl_dim_in, i, isl_dim_out, i);
+ 
+   /* in + 1 <= out  */
+-  ineq = isl_constraint_set_coefficient_si (ineq, isl_dim_out, idx, 1);
+-  ineq = isl_constraint_set_coefficient_si (ineq, isl_dim_in, idx, -1);
++  ineq = isl_constraint_set_coefficient_si (ineq, isl_dim_out, depth - 1, 1);
++  ineq = isl_constraint_set_coefficient_si (ineq, isl_dim_in, depth - 1, -1);
+   ineq = isl_constraint_set_constant_si (ineq, -1);
+   lex = isl_map_add_constraint (lex, ineq);
+   x = isl_map_intersect (x, lex);
+diff -Naur gcc-4.8.3.orig/gcc/testsuite/gcc.dg/graphite/pr54094.c gcc-4.8.3/gcc/testsuite/gcc.dg/graphite/pr54094.c
+--- gcc-4.8.3.orig/gcc/testsuite/gcc.dg/graphite/pr54094.c	1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.8.3/gcc/testsuite/gcc.dg/graphite/pr54094.c	2014-06-01 05:16:25.485054767 +0000
+@@ -0,0 +1,10 @@
++/* { dg-options "-O2 -floop-parallelize-all -floop-nest-optimize" } */
++void dwt_deinterleave_h(int *a, int *b, int dn, int sn, int cas)
++{
++  int i;
++  for (i=0; i<sn; i++)
++    b[i]=a[2*i+cas];
++  for (i=0; i<dn; i++)
++    b[sn+i]=a[(2*i+1-cas)];
++}
++
Index: patches/gcc-4.8.3-pure64-1.patch
===================================================================
--- patches/gcc-4.8.3-pure64-1.patch	(revision 390c3abd028ccad73f2d43f1f526ea1caf45046c)
+++ patches/gcc-4.8.3-pure64-1.patch	(revision 390c3abd028ccad73f2d43f1f526ea1caf45046c)
@@ -0,0 +1,176 @@
+Submitted By: William Harrington <kb0iic at cross-lfs dot org>
+Date: 05-31-2014
+Initial Package Version: 4.8.3
+Origin: Idea originally developed by Ryan Oliver and Greg Schafer for
+        the Pure LFS project with help from
+        Martin Ward <macros_the_black@ntlworld.com>
+Upstream Status: Not Applied - CLFS Specific
+Description: This patch makes changes to the paths for pure64, eg 64bit libs
+             in /usr/lib, 32bit in /usr/lib32.
+
+diff -Naur gcc-4.8.3.orig/gcc/config/i386/linux64.h gcc-4.8.3/gcc/config/i386/linux64.h
+--- gcc-4.8.3.orig/gcc/config/i386/linux64.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/i386/linux64.h	2014-06-01 05:03:44.355344528 +0000
+@@ -27,6 +27,6 @@
+ #define GNU_USER_LINK_EMULATION64 "elf_x86_64"
+ #define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64"
+ 
+-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
+-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
++#define GLIBC_DYNAMIC_LINKER32 "/lib32/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER64 "/lib/ld-linux-x86-64.so.2"
+ #define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2"
+diff -Naur gcc-4.8.3.orig/gcc/config/i386/t-linux64 gcc-4.8.3/gcc/config/i386/t-linux64
+--- gcc-4.8.3.orig/gcc/config/i386/t-linux64	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/i386/t-linux64	2014-06-01 05:03:44.355344528 +0000
+@@ -33,6 +33,6 @@
+ comma=,
+ MULTILIB_OPTIONS    = $(subst $(comma),/,$(TM_MULTILIB_CONFIG))
+ MULTILIB_DIRNAMES   = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS)))
+-MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu)
+-MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu)
++MULTILIB_OSDIRNAMES = m64=../lib$(call if_multiarch,:x86_64-linux-gnu)
++MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib32)$(call if_multiarch,:i386-linux-gnu)
+ MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32)
+diff -Naur gcc-4.8.3.orig/gcc/config/linux.h gcc-4.8.3/gcc/config/linux.h
+--- gcc-4.8.3.orig/gcc/config/linux.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/linux.h	2014-06-01 05:03:44.355344528 +0000
+@@ -74,7 +74,7 @@
+    GLIBC_DYNAMIC_LINKER32 and GLIBC_DYNAMIC_LINKER64 for targets
+    supporting both 32-bit and 64-bit compilation.  */
+ #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+-#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKER32 "/lib32/ld-uClibc.so.0"
+ #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
+ #define UCLIBC_DYNAMIC_LINKERX32 "/lib/ldx32-uClibc.so.0"
+ #define BIONIC_DYNAMIC_LINKER "/system/bin/linker"
+diff -Naur gcc-4.8.3.orig/gcc/config/mips/linux64.h gcc-4.8.3/gcc/config/mips/linux64.h
+--- gcc-4.8.3.orig/gcc/config/mips/linux64.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/mips/linux64.h	2014-06-01 05:03:44.355344528 +0000
+@@ -22,10 +22,10 @@
+ #define GNU_USER_LINK_EMULATION64 "elf64%{EB:b}%{EL:l}tsmip"
+ #define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32"
+ 
+-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
+-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld.so.1"
+-#define GLIBC_DYNAMIC_LINKERN32 "/lib32/ld.so.1"
+-#define UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0"
++#define GLIBC_DYNAMIC_LINKER32 "/lib32/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER64 "/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKERN32 "/lib64/ld.so.1"
++#define UCLIBC_DYNAMIC_LINKERN32 "/lib64/ld-uClibc.so.0"
+ #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
+ #define GNU_USER_DYNAMIC_LINKERN32 \
+   CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \
+diff -Naur gcc-4.8.3.orig/gcc/config/mips/t-linux64 gcc-4.8.3/gcc/config/mips/t-linux64
+--- gcc-4.8.3.orig/gcc/config/mips/t-linux64	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/mips/t-linux64	2014-06-01 05:03:44.355344528 +0000
+@@ -22,5 +22,5 @@
+ MIPS_SOFT = $(if $(strip $(filter MASK_SOFT_FLOAT_ABI, $(target_cpu_default)) $(filter soft, $(with_float))),soft)
+ MULTILIB_OSDIRNAMES = \
+ 	../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \
+-	../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \
+-	../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT))
++	../lib32$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \
++	../lib$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT))
+diff -Naur gcc-4.8.3.orig/gcc/config/rs6000/linux64.h gcc-4.8.3/gcc/config/rs6000/linux64.h
+--- gcc-4.8.3.orig/gcc/config/rs6000/linux64.h	2014-04-04 15:10:24.000000000 +0000
++++ gcc-4.8.3/gcc/config/rs6000/linux64.h	2014-06-01 05:05:00.847317093 +0000
+@@ -366,13 +366,13 @@
+ #undef	LINK_OS_DEFAULT_SPEC
+ #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
+ 
+-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER32 "/lib32/ld.so.1"
+ #ifdef LINUX64_DEFAULT_ABI_ELFv2
+-#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv1:/lib64/ld64.so.1;:/lib64/ld64.so.2}"
++#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv1:/lib/ld64.so.1;:/lib/ld64.so.2}"
+ #else
+-#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv2:/lib64/ld64.so.2;:/lib64/ld64.so.1}"
++#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv2:/lib/ld64.so.2;:/lib/ld64.so.1}"
+ #endif
+-#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKER32 "/lib32/ld-uClibc.so.0"
+ #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
+ #if DEFAULT_LIBC == LIBC_UCLIBC
+ #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
+diff -Naur gcc-4.8.3.orig/gcc/config/rs6000/t-linux64 gcc-4.8.3/gcc/config/rs6000/t-linux64
+--- gcc-4.8.3.orig/gcc/config/rs6000/t-linux64	2014-04-04 14:39:26.000000000 +0000
++++ gcc-4.8.3/gcc/config/rs6000/t-linux64	2014-06-01 05:06:00.752194628 +0000
+@@ -28,5 +28,5 @@
+ MULTILIB_OPTIONS    := m64/m32
+ MULTILIB_DIRNAMES   := 64 32
+ MULTILIB_EXTRA_OPTS := 
+-MULTILIB_OSDIRNAMES := m64=../lib64$(call if_multiarch,:powerpc64-linux-gnu)
+-MULTILIB_OSDIRNAMES += m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:powerpc-linux-gnu)
++MULTILIB_OSDIRNAMES := m64=../lib$(call if_multiarch,:powerpc64-linux-gnu)
++MULTILIB_OSDIRNAMES += m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib32)$(call if_multiarch,:powerpc-linux-gnu)
+diff -Naur gcc-4.8.3.orig/gcc/config/s390/linux.h gcc-4.8.3/gcc/config/s390/linux.h
+--- gcc-4.8.3.orig/gcc/config/s390/linux.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/s390/linux.h	2014-06-01 05:03:44.355344528 +0000
+@@ -60,7 +60,7 @@
+ #define MULTILIB_DEFAULTS { "m31" }
+ #endif
+ 
+-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER32 "/lib32/ld.so.1"
+ #define GLIBC_DYNAMIC_LINKER64 "/lib/ld64.so.1"
+ 
+ #undef  LINK_SPEC
+diff -Naur gcc-4.8.3.orig/gcc/config/s390/t-linux64 gcc-4.8.3/gcc/config/s390/t-linux64
+--- gcc-4.8.3.orig/gcc/config/s390/t-linux64	2012-11-21 16:13:28.000000000 +0000
++++ gcc-4.8.3/gcc/config/s390/t-linux64	2014-06-01 05:03:44.355344528 +0000
+@@ -7,5 +7,5 @@
+ 
+ MULTILIB_OPTIONS = m64/m31
+ MULTILIB_DIRNAMES = 64 32
+-MULTILIB_OSDIRNAMES = ../lib64$(call if_multiarch,:s390x-linux-gnu)
+-MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:s390-linux-gnu)
++MULTILIB_OSDIRNAMES = ../lib$(call if_multiarch,:s390x-linux-gnu)
++MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib32)$(call if_multiarch,:s390-linux-gnu)
+diff -Naur gcc-4.8.3.orig/gcc/config/sparc/linux.h gcc-4.8.3/gcc/config/sparc/linux.h
+--- gcc-4.8.3.orig/gcc/config/sparc/linux.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/sparc/linux.h	2014-06-01 05:03:44.355344528 +0000
+@@ -83,7 +83,7 @@
+    When the -shared link option is used a final link is not being
+    done.  */
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER "/lib32/ld-linux.so.2"
+ 
+ #undef  LINK_SPEC
+ #define LINK_SPEC "-m elf32_sparc %{shared:-shared} \
+diff -Naur gcc-4.8.3.orig/gcc/config/sparc/linux64.h gcc-4.8.3/gcc/config/sparc/linux64.h
+--- gcc-4.8.3.orig/gcc/config/sparc/linux64.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/sparc/linux64.h	2014-06-01 05:03:44.355344528 +0000
+@@ -92,8 +92,8 @@
+    When the -shared link option is used a final link is not being
+    done.  */
+ 
+-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
+-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER32 "/lib32/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER64 "/lib/ld-linux.so.2"
+ 
+ #ifdef SPARC_BI_ARCH
+ 
+@@ -201,7 +201,7 @@
+ #else /* !SPARC_BI_ARCH */
+ 
+ #undef LINK_SPEC
+-#define LINK_SPEC "-m elf64_sparc -Y P,%R/usr/lib64 %{shared:-shared} \
++#define LINK_SPEC "-m elf64_sparc -Y P,%R/lib %{shared:-shared} \
+   %{!shared: \
+     %{!static: \
+       %{rdynamic:-export-dynamic} \
+diff -Naur gcc-4.8.3.orig/gcc/config/sparc/t-linux64 gcc-4.8.3/gcc/config/sparc/t-linux64
+--- gcc-4.8.3.orig/gcc/config/sparc/t-linux64	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/sparc/t-linux64	2014-06-01 05:03:44.358677723 +0000
+@@ -25,5 +25,5 @@
+ 
+ MULTILIB_OPTIONS = m64/m32
+ MULTILIB_DIRNAMES = 64 32
+-MULTILIB_OSDIRNAMES = ../lib64$(call if_multiarch,:sparc64-linux-gnu)
+-MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:sparc-linux-gnu)
++MULTILIB_OSDIRNAMES = ../lib$(call if_multiarch,:sparc64-linux-gnu)
++MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib32)$(call if_multiarch,:sparc-linux-gnu)
Index: patches/gcc-4.8.3-pure64_specs-1.patch
===================================================================
--- patches/gcc-4.8.3-pure64_specs-1.patch	(revision 390c3abd028ccad73f2d43f1f526ea1caf45046c)
+++ patches/gcc-4.8.3-pure64_specs-1.patch	(revision 390c3abd028ccad73f2d43f1f526ea1caf45046c)
@@ -0,0 +1,468 @@
+Submitted By: William Harrington <kb0iic at cross-lfs dot org>
+Date: 05-31-2014
+Initial Package Version: 4.8.3
+Origin: Idea originally developed by Ryan Oliver and Greg Schafer for
+        the Pure LFS project, and help from
+        Martin Ward <macros_the_black@ntlworld.com>
+Upstream Status: Not Applied - CLFS Specific
+Description: The specs patch changes the location of the dynamic linker as
+             well as the link spec to /tools/lib{,32,64}. This patch in
+             addition makes changes to the paths for pure64, eg 64bit libs
+             in /usr/lib, 32bit in /usr/lib32.
+
+diff -Naur gcc-4.8.3.orig/gcc/config/aarch64/aarch64-linux.h gcc-4.8.3/gcc/config/aarch64/aarch64-linux.h
+--- gcc-4.8.3.orig/gcc/config/aarch64/aarch64-linux.h	2013-08-13 13:22:18.000000000 +0000
++++ gcc-4.8.3/gcc/config/aarch64/aarch64-linux.h	2014-06-01 04:53:53.859803784 +0000
+@@ -21,7 +21,7 @@
+ #ifndef GCC_AARCH64_LINUX_H
+ #define GCC_AARCH64_LINUX_H
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64.so.1"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux-aarch64.so.1"
+ 
+ #define CPP_SPEC "%{pthread:-D_REENTRANT}"
+ 
+diff -Naur gcc-4.8.3.orig/gcc/config/aarch64/t-aarch64-linux gcc-4.8.3/gcc/config/aarch64/t-aarch64-linux
+--- gcc-4.8.3.orig/gcc/config/aarch64/t-aarch64-linux	2013-03-14 08:52:13.000000000 +0000
++++ gcc-4.8.3/gcc/config/aarch64/t-aarch64-linux	2014-06-01 04:53:53.859803784 +0000
+@@ -22,4 +22,4 @@
+ LIB1ASMFUNCS = _aarch64_sync_cache_range
+ 
+ AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be)
+-MULTILIB_OSDIRNAMES = .=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
++MULTILIB_OSDIRNAMES = .=../lib$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
+diff -Naur gcc-4.8.3.orig/gcc/config/alpha/linux-elf.h gcc-4.8.3/gcc/config/alpha/linux-elf.h
+--- gcc-4.8.3.orig/gcc/config/alpha/linux-elf.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/alpha/linux-elf.h	2014-06-01 04:53:53.859803784 +0000
+@@ -23,8 +23,8 @@
+ #define EXTRA_SPECS \
+ { "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
+ 
+-#define GLIBC_DYNAMIC_LINKER	"/lib/ld-linux.so.2"
+-#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
++#define GLIBC_DYNAMIC_LINKER	"/tools/lib/ld-linux.so.2"
++#define UCLIBC_DYNAMIC_LINKER "/tools/lib/ld-uClibc.so.0"
+ #if DEFAULT_LIBC == LIBC_UCLIBC
+ #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
+ #elif DEFAULT_LIBC == LIBC_GLIBC
+diff -Naur gcc-4.8.3.orig/gcc/config/arm/linux-eabi.h gcc-4.8.3/gcc/config/arm/linux-eabi.h
+--- gcc-4.8.3.orig/gcc/config/arm/linux-eabi.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/arm/linux-eabi.h	2014-06-01 04:53:53.859803784 +0000
+@@ -68,8 +68,8 @@
+    GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI.  */
+ 
+ #undef  GLIBC_DYNAMIC_LINKER
+-#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-linux.so.3"
+-#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-linux-armhf.so.3"
++#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/tools/lib/ld-linux.so.3"
++#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/tools/lib/ld-linux-armhf.so.3"
+ #define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT
+ 
+ #define GLIBC_DYNAMIC_LINKER \
+diff -Naur gcc-4.8.3.orig/gcc/config/arm/linux-elf.h gcc-4.8.3/gcc/config/arm/linux-elf.h
+--- gcc-4.8.3.orig/gcc/config/arm/linux-elf.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/arm/linux-elf.h	2014-06-01 04:53:53.859803784 +0000
+@@ -57,7 +57,7 @@
+ 
+ #define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc"
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux.so.2"
+ 
+ #define LINUX_TARGET_LINK_SPEC  "%{h*} \
+    %{static:-Bstatic} \
+diff -Naur gcc-4.8.3.orig/gcc/config/bfin/linux.h gcc-4.8.3/gcc/config/bfin/linux.h
+--- gcc-4.8.3.orig/gcc/config/bfin/linux.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/bfin/linux.h	2014-06-01 04:53:53.859803784 +0000
+@@ -45,7 +45,7 @@
+   %{shared:-G -Bdynamic} \
+   %{!shared: %{!static: \
+    %{rdynamic:-export-dynamic} \
+-   -dynamic-linker /lib/ld-uClibc.so.0} \
++   -dynamic-linker /tools/lib/ld-uClibc.so.0} \
+    %{static}} -init __init -fini __fini"
+ 
+ #undef TARGET_SUPPORTS_SYNC_CALLS
+diff -Naur gcc-4.8.3.orig/gcc/config/cris/linux.h gcc-4.8.3/gcc/config/cris/linux.h
+--- gcc-4.8.3.orig/gcc/config/cris/linux.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/cris/linux.h	2014-06-01 04:53:53.859803784 +0000
+@@ -102,7 +102,7 @@
+ #undef CRIS_DEFAULT_CPU_VERSION
+ #define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
+ 
+ #undef CRIS_LINK_SUBTARGET_SPEC
+ #define CRIS_LINK_SUBTARGET_SPEC \
+diff -Naur gcc-4.8.3.orig/gcc/config/freebsd-spec.h gcc-4.8.3/gcc/config/freebsd-spec.h
+--- gcc-4.8.3.orig/gcc/config/freebsd-spec.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/freebsd-spec.h	2014-06-01 04:53:53.859803784 +0000
+@@ -130,7 +130,7 @@
+ #if FBSD_MAJOR < 6
+ #define FBSD_DYNAMIC_LINKER "/usr/libexec/ld-elf.so.1"
+ #else
+-#define FBSD_DYNAMIC_LINKER "/libexec/ld-elf.so.1"
++#define FBSD_DYNAMIC_LINKER "/tools/libexec/ld-elf.so.1"
+ #endif
+ 
+ /* NOTE: The freebsd-spec.h header is included also for various
+diff -Naur gcc-4.8.3.orig/gcc/config/frv/linux.h gcc-4.8.3/gcc/config/frv/linux.h
+--- gcc-4.8.3.orig/gcc/config/frv/linux.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/frv/linux.h	2014-06-01 04:53:53.859803784 +0000
+@@ -34,7 +34,7 @@
+ #define ENDFILE_SPEC \
+   "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
+ 
+ #undef LINK_SPEC
+ #define LINK_SPEC "\
+diff -Naur gcc-4.8.3.orig/gcc/config/i386/gnu.h gcc-4.8.3/gcc/config/i386/gnu.h
+--- gcc-4.8.3.orig/gcc/config/i386/gnu.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/i386/gnu.h	2014-06-01 04:53:53.859803784 +0000
+@@ -22,7 +22,7 @@
+ #define GNU_USER_LINK_EMULATION "elf_i386"
+ 
+ #undef GNU_USER_DYNAMIC_LINKER
+-#define GNU_USER_DYNAMIC_LINKER "/lib/ld.so"
++#define GNU_USER_DYNAMIC_LINKER "/tools/lib/ld.so"
+ 
+ #undef	STARTFILE_SPEC
+ #if defined HAVE_LD_PIE
+diff -Naur gcc-4.8.3.orig/gcc/config/i386/linux.h gcc-4.8.3/gcc/config/i386/linux.h
+--- gcc-4.8.3.orig/gcc/config/i386/linux.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/i386/linux.h	2014-06-01 04:53:53.859803784 +0000
+@@ -20,4 +20,4 @@
+ <http://www.gnu.org/licenses/>.  */
+ 
+ #define GNU_USER_LINK_EMULATION "elf_i386"
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux.so.2"
+diff -Naur gcc-4.8.3.orig/gcc/config/i386/linux64.h gcc-4.8.3/gcc/config/i386/linux64.h
+--- gcc-4.8.3.orig/gcc/config/i386/linux64.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/i386/linux64.h	2014-06-01 04:53:53.859803784 +0000
+@@ -27,6 +27,6 @@
+ #define GNU_USER_LINK_EMULATION64 "elf_x86_64"
+ #define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64"
+ 
+-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
+-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
+-#define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2"
++#define GLIBC_DYNAMIC_LINKER32 "/tools/lib32/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER64 "/tools/lib/ld-linux-x86-64.so.2"
++#define GLIBC_DYNAMIC_LINKERX32 "/tools/libx32/ld-linux-x32.so.2"
+diff -Naur gcc-4.8.3.orig/gcc/config/i386/t-linux64 gcc-4.8.3/gcc/config/i386/t-linux64
+--- gcc-4.8.3.orig/gcc/config/i386/t-linux64	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/i386/t-linux64	2014-06-01 04:53:53.859803784 +0000
+@@ -33,6 +33,6 @@
+ comma=,
+ MULTILIB_OPTIONS    = $(subst $(comma),/,$(TM_MULTILIB_CONFIG))
+ MULTILIB_DIRNAMES   = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS)))
+-MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu)
+-MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu)
++MULTILIB_OSDIRNAMES = m64=../lib$(call if_multiarch,:x86_64-linux-gnu)
++MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib32)$(call if_multiarch,:i386-linux-gnu)
+ MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32)
+diff -Naur gcc-4.8.3.orig/gcc/config/ia64/linux.h gcc-4.8.3/gcc/config/ia64/linux.h
+--- gcc-4.8.3.orig/gcc/config/ia64/linux.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/ia64/linux.h	2014-06-01 04:53:53.859803784 +0000
+@@ -55,7 +55,7 @@
+ /* Define this for shared library support because it isn't in the main
+    linux.h file.  */
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux-ia64.so.2"
+ 
+ #undef LINK_SPEC
+ #define LINK_SPEC "\
+diff -Naur gcc-4.8.3.orig/gcc/config/knetbsd-gnu.h gcc-4.8.3/gcc/config/knetbsd-gnu.h
+--- gcc-4.8.3.orig/gcc/config/knetbsd-gnu.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/knetbsd-gnu.h	2014-06-01 04:53:53.859803784 +0000
+@@ -32,4 +32,4 @@
+ 
+ 
+ #undef GNU_USER_DYNAMIC_LINKER
+-#define GNU_USER_DYNAMIC_LINKER "/lib/ld.so.1"
++#define GNU_USER_DYNAMIC_LINKER "/tools/lib/ld.so.1"
+diff -Naur gcc-4.8.3.orig/gcc/config/kopensolaris-gnu.h gcc-4.8.3/gcc/config/kopensolaris-gnu.h
+--- gcc-4.8.3.orig/gcc/config/kopensolaris-gnu.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/kopensolaris-gnu.h	2014-06-01 04:53:53.859803784 +0000
+@@ -31,4 +31,4 @@
+   while (0)
+ 
+ #undef GNU_USER_DYNAMIC_LINKER
+-#define GNU_USER_DYNAMIC_LINKER "/lib/ld.so.1"
++#define GNU_USER_DYNAMIC_LINKER "/tools/lib/ld.so.1"
+diff -Naur gcc-4.8.3.orig/gcc/config/linux.h gcc-4.8.3/gcc/config/linux.h
+--- gcc-4.8.3.orig/gcc/config/linux.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/linux.h	2014-06-01 04:53:53.859803784 +0000
+@@ -73,10 +73,10 @@
+    GLIBC_DYNAMIC_LINKER must be defined for each target using them, or
+    GLIBC_DYNAMIC_LINKER32 and GLIBC_DYNAMIC_LINKER64 for targets
+    supporting both 32-bit and 64-bit compilation.  */
+-#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+-#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
+-#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
+-#define UCLIBC_DYNAMIC_LINKERX32 "/lib/ldx32-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKER "/tools/lib/ld-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKER32 "/tools/lib/ld-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKER64 "/tools/lib/ld64-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKERX32 "/tools/lib/ldx32-uClibc.so.0"
+ #define BIONIC_DYNAMIC_LINKER "/system/bin/linker"
+ #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker"
+ #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64"
+diff -Naur gcc-4.8.3.orig/gcc/config/lm32/uclinux-elf.h gcc-4.8.3/gcc/config/lm32/uclinux-elf.h
+--- gcc-4.8.3.orig/gcc/config/lm32/uclinux-elf.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/lm32/uclinux-elf.h	2014-06-01 04:53:53.859803784 +0000
+@@ -67,7 +67,7 @@
+    %{shared:-shared} \
+    %{symbolic:-Bsymbolic} \
+    %{rdynamic:-export-dynamic} \
+-   -dynamic-linker /lib/ld-linux.so.2"
++   -dynamic-linker /tools/lib/ld-linux.so.2"
+ 
+ #define TARGET_OS_CPP_BUILTINS() GNU_USER_TARGET_OS_CPP_BUILTINS()
+ 
+diff -Naur gcc-4.8.3.orig/gcc/config/m68k/linux.h gcc-4.8.3/gcc/config/m68k/linux.h
+--- gcc-4.8.3.orig/gcc/config/m68k/linux.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/m68k/linux.h	2014-06-01 04:53:53.859803784 +0000
+@@ -71,7 +71,7 @@
+    When the -shared link option is used a final link is not being
+    done.  */
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
+ 
+ #undef LINK_SPEC
+ #define LINK_SPEC "-m m68kelf %{shared} \
+diff -Naur gcc-4.8.3.orig/gcc/config/microblaze/linux.h gcc-4.8.3/gcc/config/microblaze/linux.h
+--- gcc-4.8.3.orig/gcc/config/microblaze/linux.h	2013-03-14 15:43:23.000000000 +0000
++++ gcc-4.8.3/gcc/config/microblaze/linux.h	2014-06-01 04:53:53.859803784 +0000
+@@ -25,7 +25,7 @@
+ #undef TLS_NEEDS_GOT
+ #define TLS_NEEDS_GOT 1
+ 
+-#define DYNAMIC_LINKER "/lib/ld.so.1"
++#define DYNAMIC_LINKER "/tools/lib/ld.so.1"
+ #undef  SUBTARGET_EXTRA_SPECS
+ #define SUBTARGET_EXTRA_SPECS \
+   { "dynamic_linker", DYNAMIC_LINKER }
+diff -Naur gcc-4.8.3.orig/gcc/config/mips/linux.h gcc-4.8.3/gcc/config/mips/linux.h
+--- gcc-4.8.3.orig/gcc/config/mips/linux.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/mips/linux.h	2014-06-01 04:53:53.859803784 +0000
+@@ -17,4 +17,4 @@
+ along with GCC; see the file COPYING3.  If not see
+ <http://www.gnu.org/licenses/>.  */
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
+diff -Naur gcc-4.8.3.orig/gcc/config/mips/linux64.h gcc-4.8.3/gcc/config/mips/linux64.h
+--- gcc-4.8.3.orig/gcc/config/mips/linux64.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/mips/linux64.h	2014-06-01 04:53:53.859803784 +0000
+@@ -22,10 +22,10 @@
+ #define GNU_USER_LINK_EMULATION64 "elf64%{EB:b}%{EL:l}tsmip"
+ #define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32"
+ 
+-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
+-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld.so.1"
+-#define GLIBC_DYNAMIC_LINKERN32 "/lib32/ld.so.1"
+-#define UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0"
++#define GLIBC_DYNAMIC_LINKER32 "/tools/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER64 "/tools/lib64/ld.so.1"
++#define GLIBC_DYNAMIC_LINKERN32 "/tools/lib32/ld.so.1"
++#define UCLIBC_DYNAMIC_LINKERN32 "/tools/lib32/ld-uClibc.so.0"
+ #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
+ #define GNU_USER_DYNAMIC_LINKERN32 \
+   CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \
+diff -Naur gcc-4.8.3.orig/gcc/config/mips/t-linux64 gcc-4.8.3/gcc/config/mips/t-linux64
+--- gcc-4.8.3.orig/gcc/config/mips/t-linux64	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/mips/t-linux64	2014-06-01 04:53:53.863137492 +0000
+@@ -22,5 +22,5 @@
+ MIPS_SOFT = $(if $(strip $(filter MASK_SOFT_FLOAT_ABI, $(target_cpu_default)) $(filter soft, $(with_float))),soft)
+ MULTILIB_OSDIRNAMES = \
+ 	../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \
+-	../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \
+-	../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT))
++	../lib32$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \
++	../lib$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT))
+diff -Naur gcc-4.8.3.orig/gcc/config/mn10300/linux.h gcc-4.8.3/gcc/config/mn10300/linux.h
+--- gcc-4.8.3.orig/gcc/config/mn10300/linux.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/mn10300/linux.h	2014-06-01 04:53:53.863137492 +0000
+@@ -32,7 +32,7 @@
+ #undef  ASM_SPEC
+ #define ASM_SPEC ""
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
+ 
+ #undef  LINK_SPEC
+ #define LINK_SPEC "%{mrelax:--relax} %{shared:-shared} \
+diff -Naur gcc-4.8.3.orig/gcc/config/pa/pa-linux.h gcc-4.8.3/gcc/config/pa/pa-linux.h
+--- gcc-4.8.3.orig/gcc/config/pa/pa-linux.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/pa/pa-linux.h	2014-06-01 04:53:53.863137492 +0000
+@@ -37,7 +37,7 @@
+ /* Define this for shared library support because it isn't in the main
+    linux.h file.  */
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
+ 
+ #undef LINK_SPEC
+ #define LINK_SPEC "\
+diff -Naur gcc-4.8.3.orig/gcc/config/rs6000/linux64.h gcc-4.8.3/gcc/config/rs6000/linux64.h
+--- gcc-4.8.3.orig/gcc/config/rs6000/linux64.h	2014-04-04 15:10:24.000000000 +0000
++++ gcc-4.8.3/gcc/config/rs6000/linux64.h	2014-06-01 04:56:50.147831773 +0000
+@@ -366,14 +366,14 @@
+ #undef	LINK_OS_DEFAULT_SPEC
+ #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
+ 
+-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER32 "/tools/lib32/ld.so.1"
+ #ifdef LINUX64_DEFAULT_ABI_ELFv2
+-#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv1:/lib64/ld64.so.1;:/lib64/ld64.so.2}"
++#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv1:/tools/lib/ld64.so.1;:/tools/lib/ld64.so.2}"
+ #else
+-#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv2:/lib64/ld64.so.2;:/lib64/ld64.so.1}"
++#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv2:/tools/lib/ld64.so.2;:/tools/lib/ld64.so.1}"
+ #endif
+-#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
+-#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKER32 "/tools/lib32/ld-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKER64 "/tools/lib/ld64-uClibc.so.0"
+ #if DEFAULT_LIBC == LIBC_UCLIBC
+ #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
+ #elif DEFAULT_LIBC == LIBC_GLIBC
+diff -Naur gcc-4.8.3.orig/gcc/config/rs6000/sysv4.h gcc-4.8.3/gcc/config/rs6000/sysv4.h
+--- gcc-4.8.3.orig/gcc/config/rs6000/sysv4.h	2014-04-04 14:50:31.000000000 +0000
++++ gcc-4.8.3/gcc/config/rs6000/sysv4.h	2014-06-01 04:53:53.863137492 +0000
+@@ -761,8 +761,8 @@
+ 
+ #define LINK_START_LINUX_SPEC ""
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
+-#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
++#define UCLIBC_DYNAMIC_LINKER "/tools/lib/ld-uClibc.so.0"
+ #if DEFAULT_LIBC == LIBC_UCLIBC
+ #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
+ #elif !defined (DEFAULT_LIBC) || DEFAULT_LIBC == LIBC_GLIBC
+diff -Naur gcc-4.8.3.orig/gcc/config/rs6000/t-linux64 gcc-4.8.3/gcc/config/rs6000/t-linux64
+--- gcc-4.8.3.orig/gcc/config/rs6000/t-linux64	2014-04-04 14:39:26.000000000 +0000
++++ gcc-4.8.3/gcc/config/rs6000/t-linux64	2014-06-01 05:00:41.310584131 +0000
+@@ -28,5 +28,5 @@
+ MULTILIB_OPTIONS    := m64/m32
+ MULTILIB_DIRNAMES   := 64 32
+ MULTILIB_EXTRA_OPTS := 
+-MULTILIB_OSDIRNAMES := m64=../lib64$(call if_multiarch,:powerpc64-linux-gnu)
+-MULTILIB_OSDIRNAMES += m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:powerpc-linux-gnu)
++MULTILIB_OSDIRNAMES := m64=../lib$(call if_multiarch,:powerpc64-linux-gnu)
++MULTILIB_OSDIRNAMES += m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib32)$(call if_multiarch,:powerpc-linux-gnu)
+diff -Naur gcc-4.8.3.orig/gcc/config/s390/linux.h gcc-4.8.3/gcc/config/s390/linux.h
+--- gcc-4.8.3.orig/gcc/config/s390/linux.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/s390/linux.h	2014-06-01 04:53:53.863137492 +0000
+@@ -60,8 +60,8 @@
+ #define MULTILIB_DEFAULTS { "m31" }
+ #endif
+ 
+-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
+-#define GLIBC_DYNAMIC_LINKER64 "/lib/ld64.so.1"
++#define GLIBC_DYNAMIC_LINKER32 "/tools/lib32/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER64 "/tools/lib/ld64.so.1"
+ 
+ #undef  LINK_SPEC
+ #define LINK_SPEC \
+diff -Naur gcc-4.8.3.orig/gcc/config/s390/t-linux64 gcc-4.8.3/gcc/config/s390/t-linux64
+--- gcc-4.8.3.orig/gcc/config/s390/t-linux64	2012-11-21 16:13:28.000000000 +0000
++++ gcc-4.8.3/gcc/config/s390/t-linux64	2014-06-01 04:53:53.863137492 +0000
+@@ -7,5 +7,5 @@
+ 
+ MULTILIB_OPTIONS = m64/m31
+ MULTILIB_DIRNAMES = 64 32
+-MULTILIB_OSDIRNAMES = ../lib64$(call if_multiarch,:s390x-linux-gnu)
+-MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:s390-linux-gnu)
++MULTILIB_OSDIRNAMES = ../lib$(call if_multiarch,:s390x-linux-gnu)
++MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib32)$(call if_multiarch,:s390-linux-gnu)
+diff -Naur gcc-4.8.3.orig/gcc/config/sh/linux.h gcc-4.8.3/gcc/config/sh/linux.h
+--- gcc-4.8.3.orig/gcc/config/sh/linux.h	2013-03-14 03:01:53.000000000 +0000
++++ gcc-4.8.3/gcc/config/sh/linux.h	2014-06-01 04:53:53.863137492 +0000
+@@ -43,7 +43,7 @@
+ 
+ #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux.so.2"
+ 
+ #undef SUBTARGET_LINK_EMUL_SUFFIX
+ #define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
+diff -Naur gcc-4.8.3.orig/gcc/config/sparc/linux.h gcc-4.8.3/gcc/config/sparc/linux.h
+--- gcc-4.8.3.orig/gcc/config/sparc/linux.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/sparc/linux.h	2014-06-01 04:53:53.863137492 +0000
+@@ -83,7 +83,7 @@
+    When the -shared link option is used a final link is not being
+    done.  */
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux.so.2"
+ 
+ #undef  LINK_SPEC
+ #define LINK_SPEC "-m elf32_sparc %{shared:-shared} \
+diff -Naur gcc-4.8.3.orig/gcc/config/sparc/linux64.h gcc-4.8.3/gcc/config/sparc/linux64.h
+--- gcc-4.8.3.orig/gcc/config/sparc/linux64.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/sparc/linux64.h	2014-06-01 04:53:53.863137492 +0000
+@@ -92,8 +92,8 @@
+    When the -shared link option is used a final link is not being
+    done.  */
+ 
+-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
+-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER32 "/tools/lib32/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER64 "/tools/lib/ld-linux.so.2"
+ 
+ #ifdef SPARC_BI_ARCH
+ 
+@@ -201,7 +201,7 @@
+ #else /* !SPARC_BI_ARCH */
+ 
+ #undef LINK_SPEC
+-#define LINK_SPEC "-m elf64_sparc -Y P,%R/usr/lib64 %{shared:-shared} \
++#define LINK_SPEC "-m elf64_sparc -Y P,%R/tools/lib %{shared:-shared} \
+   %{!shared: \
+     %{!static: \
+       %{rdynamic:-export-dynamic} \
+diff -Naur gcc-4.8.3.orig/gcc/config/sparc/t-linux64 gcc-4.8.3/gcc/config/sparc/t-linux64
+--- gcc-4.8.3.orig/gcc/config/sparc/t-linux64	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/sparc/t-linux64	2014-06-01 04:53:53.863137492 +0000
+@@ -25,5 +25,5 @@
+ 
+ MULTILIB_OPTIONS = m64/m32
+ MULTILIB_DIRNAMES = 64 32
+-MULTILIB_OSDIRNAMES = ../lib64$(call if_multiarch,:sparc64-linux-gnu)
+-MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:sparc-linux-gnu)
++MULTILIB_OSDIRNAMES = ../lib$(call if_multiarch,:sparc64-linux-gnu)
++MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib32)$(call if_multiarch,:sparc-linux-gnu)
+diff -Naur gcc-4.8.3.orig/gcc/config/vax/linux.h gcc-4.8.3/gcc/config/vax/linux.h
+--- gcc-4.8.3.orig/gcc/config/vax/linux.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/vax/linux.h	2014-06-01 04:53:53.863137492 +0000
+@@ -41,7 +41,7 @@
+   %{!shared: \
+     %{!static: \
+       %{rdynamic:-export-dynamic} \
+-      -dynamic-linker /lib/ld.so.1} \
++      -dynamic-linker /tools/lib/ld.so.1} \
+     %{static:-static}}"
+ 
+ #undef  WCHAR_TYPE
+diff -Naur gcc-4.8.3.orig/gcc/config/xtensa/linux.h gcc-4.8.3/gcc/config/xtensa/linux.h
+--- gcc-4.8.3.orig/gcc/config/xtensa/linux.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/xtensa/linux.h	2014-06-01 04:53:53.863137492 +0000
+@@ -44,7 +44,7 @@
+   %{mlongcalls:--longcalls} \
+   %{mno-longcalls:--no-longcalls}"
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
+ 
+ #undef LINK_SPEC
+ #define LINK_SPEC \
Index: patches/gcc-4.8.3-specs-1.patch
===================================================================
--- patches/gcc-4.8.3-specs-1.patch	(revision 390c3abd028ccad73f2d43f1f526ea1caf45046c)
+++ patches/gcc-4.8.3-specs-1.patch	(revision 390c3abd028ccad73f2d43f1f526ea1caf45046c)
@@ -0,0 +1,436 @@
+Submitted By: William Harrington <kb0iic at cross-lfs dot org>
+Date: 05-31-2014
+Initial Package Version: 4.8.3 
+Origin: Idea originally developed by Ryan Oliver and Greg Schafer for
+        the Pure LFS project.
+Upstream Status: Not Applied - CLFS Specific
+Description: The specs patch changes the location of the dynamic linker as
+             well as the link spec to /tools/lib{,32,64}.
+
+diff -Naur gcc-4.8.3.orig/gcc/config/aarch64/aarch64-linux.h gcc-4.8.3/gcc/config/aarch64/aarch64-linux.h
+--- gcc-4.8.3.orig/gcc/config/aarch64/aarch64-linux.h	2013-08-13 13:22:18.000000000 +0000
++++ gcc-4.8.3/gcc/config/aarch64/aarch64-linux.h	2014-06-01 05:02:45.010471852 +0000
+@@ -21,7 +21,7 @@
+ #ifndef GCC_AARCH64_LINUX_H
+ #define GCC_AARCH64_LINUX_H
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64.so.1"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux-aarch64.so.1"
+ 
+ #define CPP_SPEC "%{pthread:-D_REENTRANT}"
+ 
+diff -Naur gcc-4.8.3.orig/gcc/config/alpha/linux-elf.h gcc-4.8.3/gcc/config/alpha/linux-elf.h
+--- gcc-4.8.3.orig/gcc/config/alpha/linux-elf.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/alpha/linux-elf.h	2014-06-01 05:02:45.013805272 +0000
+@@ -23,8 +23,8 @@
+ #define EXTRA_SPECS \
+ { "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
+ 
+-#define GLIBC_DYNAMIC_LINKER	"/lib/ld-linux.so.2"
+-#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
++#define GLIBC_DYNAMIC_LINKER	"/tools/lib/ld-linux.so.2"
++#define UCLIBC_DYNAMIC_LINKER "/tools/lib/ld-uClibc.so.0"
+ #if DEFAULT_LIBC == LIBC_UCLIBC
+ #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
+ #elif DEFAULT_LIBC == LIBC_GLIBC
+diff -Naur gcc-4.8.3.orig/gcc/config/arm/linux-eabi.h gcc-4.8.3/gcc/config/arm/linux-eabi.h
+--- gcc-4.8.3.orig/gcc/config/arm/linux-eabi.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/arm/linux-eabi.h	2014-06-01 05:02:45.013805272 +0000
+@@ -68,8 +68,8 @@
+    GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI.  */
+ 
+ #undef  GLIBC_DYNAMIC_LINKER
+-#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-linux.so.3"
+-#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-linux-armhf.so.3"
++#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/tools/lib/ld-linux.so.3"
++#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/tools/lib/ld-linux-armhf.so.3"
+ #define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT
+ 
+ #define GLIBC_DYNAMIC_LINKER \
+diff -Naur gcc-4.8.3.orig/gcc/config/arm/linux-elf.h gcc-4.8.3/gcc/config/arm/linux-elf.h
+--- gcc-4.8.3.orig/gcc/config/arm/linux-elf.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/arm/linux-elf.h	2014-06-01 05:02:45.013805272 +0000
+@@ -57,7 +57,7 @@
+ 
+ #define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc"
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux.so.2"
+ 
+ #define LINUX_TARGET_LINK_SPEC  "%{h*} \
+    %{static:-Bstatic} \
+diff -Naur gcc-4.8.3.orig/gcc/config/c6x/uclinux-elf.h gcc-4.8.3/gcc/config/c6x/uclinux-elf.h
+--- gcc-4.8.3.orig/gcc/config/c6x/uclinux-elf.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/c6x/uclinux-elf.h	2014-06-01 05:02:45.013805272 +0000
+@@ -36,7 +36,7 @@
+ #define STARTFILE_SPEC \
+   "%{!shared:crt1%O%s} crti%O%s %{shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
+ 
+-#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKER "/tools/lib/ld-uClibc.so.0"
+ 
+ #undef LINK_SPEC
+ #define LINK_SPEC ENDIAN_LINK_SPEC \
+diff -Naur gcc-4.8.3.orig/gcc/config/cris/linux.h gcc-4.8.3/gcc/config/cris/linux.h
+--- gcc-4.8.3.orig/gcc/config/cris/linux.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/cris/linux.h	2014-06-01 05:02:45.013805272 +0000
+@@ -102,7 +102,7 @@
+ #undef CRIS_DEFAULT_CPU_VERSION
+ #define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
+ 
+ #undef CRIS_LINK_SUBTARGET_SPEC
+ #define CRIS_LINK_SUBTARGET_SPEC \
+diff -Naur gcc-4.8.3.orig/gcc/config/freebsd-spec.h gcc-4.8.3/gcc/config/freebsd-spec.h
+--- gcc-4.8.3.orig/gcc/config/freebsd-spec.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/freebsd-spec.h	2014-06-01 05:02:45.013805272 +0000
+@@ -128,9 +128,9 @@
+ #endif
+ 
+ #if FBSD_MAJOR < 6
+-#define FBSD_DYNAMIC_LINKER "/usr/libexec/ld-elf.so.1"
++#define FBSD_DYNAMIC_LINKER "/tools/lib/ld-elf.so.1"
+ #else
+-#define FBSD_DYNAMIC_LINKER "/libexec/ld-elf.so.1"
++#define FBSD_DYNAMIC_LINKER "/tools/lib/ld-elf.so.1"
+ #endif
+ 
+ /* NOTE: The freebsd-spec.h header is included also for various
+diff -Naur gcc-4.8.3.orig/gcc/config/frv/linux.h gcc-4.8.3/gcc/config/frv/linux.h
+--- gcc-4.8.3.orig/gcc/config/frv/linux.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/frv/linux.h	2014-06-01 05:02:45.013805272 +0000
+@@ -34,7 +34,7 @@
+ #define ENDFILE_SPEC \
+   "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
+ 
+ #undef LINK_SPEC
+ #define LINK_SPEC "\
+diff -Naur gcc-4.8.3.orig/gcc/config/i386/gnu.h gcc-4.8.3/gcc/config/i386/gnu.h
+--- gcc-4.8.3.orig/gcc/config/i386/gnu.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/i386/gnu.h	2014-06-01 05:02:45.013805272 +0000
+@@ -22,7 +22,7 @@
+ #define GNU_USER_LINK_EMULATION "elf_i386"
+ 
+ #undef GNU_USER_DYNAMIC_LINKER
+-#define GNU_USER_DYNAMIC_LINKER "/lib/ld.so"
++#define GNU_USER_DYNAMIC_LINKER "/tools/lib/ld.so"
+ 
+ #undef	STARTFILE_SPEC
+ #if defined HAVE_LD_PIE
+diff -Naur gcc-4.8.3.orig/gcc/config/i386/kfreebsd-gnu.h gcc-4.8.3/gcc/config/i386/kfreebsd-gnu.h
+--- gcc-4.8.3.orig/gcc/config/i386/kfreebsd-gnu.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/i386/kfreebsd-gnu.h	2014-06-01 05:02:45.013805272 +0000
+@@ -19,4 +19,4 @@
+ <http://www.gnu.org/licenses/>.  */
+ 
+ #define GNU_USER_LINK_EMULATION "elf_i386_fbsd"
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
+diff -Naur gcc-4.8.3.orig/gcc/config/i386/kfreebsd-gnu64.h gcc-4.8.3/gcc/config/i386/kfreebsd-gnu64.h
+--- gcc-4.8.3.orig/gcc/config/i386/kfreebsd-gnu64.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/i386/kfreebsd-gnu64.h	2014-06-01 05:02:45.013805272 +0000
+@@ -22,6 +22,6 @@
+ #define GNU_USER_LINK_EMULATION64 "elf_x86_64_fbsd"
+ #define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64_fbsd"
+ 
+-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
+-#define GLIBC_DYNAMIC_LINKER64 "/lib/ld-kfreebsd-x86-64.so.1"
+-#define GLIBC_DYNAMIC_LINKERX32 "/lib/ld-kfreebsd-x32.so.1"
++#define GLIBC_DYNAMIC_LINKER32 "/tools/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER64 "/tools/lib/ld-kfreebsd-x86-64.so.1"
++#define GLIBC_DYNAMIC_LINKERX32 "/tools/lib/ld-kfreebsd-x32.so.1"
+diff -Naur gcc-4.8.3.orig/gcc/config/i386/linux.h gcc-4.8.3/gcc/config/i386/linux.h
+--- gcc-4.8.3.orig/gcc/config/i386/linux.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/i386/linux.h	2014-06-01 05:02:45.013805272 +0000
+@@ -20,4 +20,4 @@
+ <http://www.gnu.org/licenses/>.  */
+ 
+ #define GNU_USER_LINK_EMULATION "elf_i386"
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux.so.2"
+diff -Naur gcc-4.8.3.orig/gcc/config/i386/linux64.h gcc-4.8.3/gcc/config/i386/linux64.h
+--- gcc-4.8.3.orig/gcc/config/i386/linux64.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/i386/linux64.h	2014-06-01 05:02:45.013805272 +0000
+@@ -27,6 +27,6 @@
+ #define GNU_USER_LINK_EMULATION64 "elf_x86_64"
+ #define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64"
+ 
+-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
+-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
+-#define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2"
++#define GLIBC_DYNAMIC_LINKER32 "/tools/lib/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER64 "/tools/lib64/ld-linux-x86-64.so.2"
++#define GLIBC_DYNAMIC_LINKERX32 "/tools/libx32/ld-linux-x32.so.2"
+diff -Naur gcc-4.8.3.orig/gcc/config/ia64/linux.h gcc-4.8.3/gcc/config/ia64/linux.h
+--- gcc-4.8.3.orig/gcc/config/ia64/linux.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/ia64/linux.h	2014-06-01 05:02:45.013805272 +0000
+@@ -55,7 +55,7 @@
+ /* Define this for shared library support because it isn't in the main
+    linux.h file.  */
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux-ia64.so.2"
+ 
+ #undef LINK_SPEC
+ #define LINK_SPEC "\
+diff -Naur gcc-4.8.3.orig/gcc/config/knetbsd-gnu.h gcc-4.8.3/gcc/config/knetbsd-gnu.h
+--- gcc-4.8.3.orig/gcc/config/knetbsd-gnu.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/knetbsd-gnu.h	2014-06-01 05:02:45.013805272 +0000
+@@ -32,4 +32,4 @@
+ 
+ 
+ #undef GNU_USER_DYNAMIC_LINKER
+-#define GNU_USER_DYNAMIC_LINKER "/lib/ld.so.1"
++#define GNU_USER_DYNAMIC_LINKER "/tools/lib/ld.so.1"
+diff -Naur gcc-4.8.3.orig/gcc/config/kopensolaris-gnu.h gcc-4.8.3/gcc/config/kopensolaris-gnu.h
+--- gcc-4.8.3.orig/gcc/config/kopensolaris-gnu.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/kopensolaris-gnu.h	2014-06-01 05:02:45.013805272 +0000
+@@ -31,4 +31,4 @@
+   while (0)
+ 
+ #undef GNU_USER_DYNAMIC_LINKER
+-#define GNU_USER_DYNAMIC_LINKER "/lib/ld.so.1"
++#define GNU_USER_DYNAMIC_LINKER "/tools/lib/ld.so.1"
+diff -Naur gcc-4.8.3.orig/gcc/config/linux.h gcc-4.8.3/gcc/config/linux.h
+--- gcc-4.8.3.orig/gcc/config/linux.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/linux.h	2014-06-01 05:02:45.013805272 +0000
+@@ -73,10 +73,10 @@
+    GLIBC_DYNAMIC_LINKER must be defined for each target using them, or
+    GLIBC_DYNAMIC_LINKER32 and GLIBC_DYNAMIC_LINKER64 for targets
+    supporting both 32-bit and 64-bit compilation.  */
+-#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+-#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
+-#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
+-#define UCLIBC_DYNAMIC_LINKERX32 "/lib/ldx32-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKER "/tools/lib/ld-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKER32 "/tools/lib/ld-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKER64 "/tools/lib/ld64-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKERX32 "/tools/lib/ldx32-uClibc.so.0"
+ #define BIONIC_DYNAMIC_LINKER "/system/bin/linker"
+ #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker"
+ #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64"
+diff -Naur gcc-4.8.3.orig/gcc/config/m32r/linux.h gcc-4.8.3/gcc/config/m32r/linux.h
+--- gcc-4.8.3.orig/gcc/config/m32r/linux.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/m32r/linux.h	2014-06-01 05:02:45.013805272 +0000
+@@ -37,7 +37,7 @@
+    When the -shared link option is used a final link is not being
+    done.  */
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux.so.2"
+ 
+ #undef	LINK_SPEC
+ #if TARGET_LITTLE_ENDIAN
+diff -Naur gcc-4.8.3.orig/gcc/config/m68k/linux.h gcc-4.8.3/gcc/config/m68k/linux.h
+--- gcc-4.8.3.orig/gcc/config/m68k/linux.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/m68k/linux.h	2014-06-01 05:02:45.013805272 +0000
+@@ -71,7 +71,7 @@
+    When the -shared link option is used a final link is not being
+    done.  */
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
+ 
+ #undef LINK_SPEC
+ #define LINK_SPEC "-m m68kelf %{shared} \
+diff -Naur gcc-4.8.3.orig/gcc/config/microblaze/linux.h gcc-4.8.3/gcc/config/microblaze/linux.h
+--- gcc-4.8.3.orig/gcc/config/microblaze/linux.h	2013-03-14 15:43:23.000000000 +0000
++++ gcc-4.8.3/gcc/config/microblaze/linux.h	2014-06-01 05:02:45.013805272 +0000
+@@ -25,7 +25,7 @@
+ #undef TLS_NEEDS_GOT
+ #define TLS_NEEDS_GOT 1
+ 
+-#define DYNAMIC_LINKER "/lib/ld.so.1"
++#define DYNAMIC_LINKER "/tools/lib/ld.so.1"
+ #undef  SUBTARGET_EXTRA_SPECS
+ #define SUBTARGET_EXTRA_SPECS \
+   { "dynamic_linker", DYNAMIC_LINKER }
+diff -Naur gcc-4.8.3.orig/gcc/config/mips/linux.h gcc-4.8.3/gcc/config/mips/linux.h
+--- gcc-4.8.3.orig/gcc/config/mips/linux.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/mips/linux.h	2014-06-01 05:02:45.017138692 +0000
+@@ -17,4 +17,4 @@
+ along with GCC; see the file COPYING3.  If not see
+ <http://www.gnu.org/licenses/>.  */
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
+diff -Naur gcc-4.8.3.orig/gcc/config/mips/linux64.h gcc-4.8.3/gcc/config/mips/linux64.h
+--- gcc-4.8.3.orig/gcc/config/mips/linux64.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/mips/linux64.h	2014-06-01 05:02:45.017138692 +0000
+@@ -22,10 +22,10 @@
+ #define GNU_USER_LINK_EMULATION64 "elf64%{EB:b}%{EL:l}tsmip"
+ #define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32"
+ 
+-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
+-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld.so.1"
+-#define GLIBC_DYNAMIC_LINKERN32 "/lib32/ld.so.1"
+-#define UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0"
++#define GLIBC_DYNAMIC_LINKER32 "/tools/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER64 "/tools/lib64/ld.so.1"
++#define GLIBC_DYNAMIC_LINKERN32 "/tools/lib32/ld.so.1"
++#define UCLIBC_DYNAMIC_LINKERN32 "/tools/lib32/ld-uClibc.so.0"
+ #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
+ #define GNU_USER_DYNAMIC_LINKERN32 \
+   CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \
+diff -Naur gcc-4.8.3.orig/gcc/config/mn10300/linux.h gcc-4.8.3/gcc/config/mn10300/linux.h
+--- gcc-4.8.3.orig/gcc/config/mn10300/linux.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/mn10300/linux.h	2014-06-01 05:02:45.017138692 +0000
+@@ -32,7 +32,7 @@
+ #undef  ASM_SPEC
+ #define ASM_SPEC ""
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
+ 
+ #undef  LINK_SPEC
+ #define LINK_SPEC "%{mrelax:--relax} %{shared:-shared} \
+diff -Naur gcc-4.8.3.orig/gcc/config/pa/pa-linux.h gcc-4.8.3/gcc/config/pa/pa-linux.h
+--- gcc-4.8.3.orig/gcc/config/pa/pa-linux.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/pa/pa-linux.h	2014-06-01 05:02:45.017138692 +0000
+@@ -37,7 +37,7 @@
+ /* Define this for shared library support because it isn't in the main
+    linux.h file.  */
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
+ 
+ #undef LINK_SPEC
+ #define LINK_SPEC "\
+diff -Naur gcc-4.8.3.orig/gcc/config/rs6000/freebsd64.h gcc-4.8.3/gcc/config/rs6000/freebsd64.h
+--- gcc-4.8.3.orig/gcc/config/rs6000/freebsd64.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/rs6000/freebsd64.h	2014-06-01 05:02:45.017138692 +0000
+@@ -154,8 +154,8 @@
+   { "link_os_freebsd_spec32",	LINK_OS_FREEBSD_SPEC32 },     		\
+   { "link_os_freebsd_spec64",	LINK_OS_FREEBSD_SPEC64 },
+ 
+-#define FREEBSD_DYNAMIC_LINKER32 "/libexec/ld-elf32.so.1"
+-#define FREEBSD_DYNAMIC_LINKER64 "/libexec/ld-elf.so.1"
++#define FREEBSD_DYNAMIC_LINKER32 "/tools/lib/ld-elf32.so.1"
++#define FREEBSD_DYNAMIC_LINKER64 "/tools/lib64/ld-elf.so.1"
+ 
+ #define LINK_OS_FREEBSD_SPEC_DEF32 "\
+   %{p:%nconsider using `-pg' instead of `-p' with gprof(1)} \
+diff -Naur gcc-4.8.3.orig/gcc/config/rs6000/linux64.h gcc-4.8.3/gcc/config/rs6000/linux64.h
+--- gcc-4.8.3.orig/gcc/config/rs6000/linux64.h	2014-04-04 15:10:24.000000000 +0000
++++ gcc-4.8.3/gcc/config/rs6000/linux64.h	2014-06-01 05:02:45.017138692 +0000
+@@ -366,14 +366,14 @@
+ #undef	LINK_OS_DEFAULT_SPEC
+ #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
+ 
+-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER32 "/tools/lib/ld.so.1"
+ #ifdef LINUX64_DEFAULT_ABI_ELFv2
+-#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv1:/lib64/ld64.so.1;:/lib64/ld64.so.2}"
++#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv1:/lib64/ld64.so.1;:/tools/lib64/ld64.so.2}"
+ #else
+-#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv2:/lib64/ld64.so.2;:/lib64/ld64.so.1}"
++#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv2:/lib64/ld64.so.2;:/tools/lib64/ld64.so.1}"
+ #endif
+-#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
+-#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKER32 "/tools/lib/ld-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKER64 "/tools/lib/ld64-uClibc.so.0"
+ #if DEFAULT_LIBC == LIBC_UCLIBC
+ #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
+ #elif DEFAULT_LIBC == LIBC_GLIBC
+diff -Naur gcc-4.8.3.orig/gcc/config/rs6000/sysv4.h gcc-4.8.3/gcc/config/rs6000/sysv4.h
+--- gcc-4.8.3.orig/gcc/config/rs6000/sysv4.h	2014-04-04 14:50:31.000000000 +0000
++++ gcc-4.8.3/gcc/config/rs6000/sysv4.h	2014-06-01 05:02:45.017138692 +0000
+@@ -761,8 +761,8 @@
+ 
+ #define LINK_START_LINUX_SPEC ""
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
+-#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
++#define UCLIBC_DYNAMIC_LINKER "/tools/lib/ld-uClibc.so.0"
+ #if DEFAULT_LIBC == LIBC_UCLIBC
+ #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
+ #elif !defined (DEFAULT_LIBC) || DEFAULT_LIBC == LIBC_GLIBC
+@@ -806,7 +806,7 @@
+ #define LINK_OS_NETBSD_SPEC "\
+ %{!shared: %{!static: \
+   %{rdynamic:-export-dynamic} \
+-  -dynamic-linker /usr/libexec/ld.elf_so}}"
++  -dynamic-linker /tools/lib/ld.elf_so}}"
+ 
+ #define CPP_OS_NETBSD_SPEC "\
+ -D__powerpc__ -D__NetBSD__ -D__KPRINTF_ATTRIBUTE__"
+diff -Naur gcc-4.8.3.orig/gcc/config/s390/linux.h gcc-4.8.3/gcc/config/s390/linux.h
+--- gcc-4.8.3.orig/gcc/config/s390/linux.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/s390/linux.h	2014-06-01 05:02:45.017138692 +0000
+@@ -60,8 +60,8 @@
+ #define MULTILIB_DEFAULTS { "m31" }
+ #endif
+ 
+-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
+-#define GLIBC_DYNAMIC_LINKER64 "/lib/ld64.so.1"
++#define GLIBC_DYNAMIC_LINKER32 "/tools/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER64 "/tools/lib64/ld64.so.1"
+ 
+ #undef  LINK_SPEC
+ #define LINK_SPEC \
+diff -Naur gcc-4.8.3.orig/gcc/config/sh/linux.h gcc-4.8.3/gcc/config/sh/linux.h
+--- gcc-4.8.3.orig/gcc/config/sh/linux.h	2013-03-14 03:01:53.000000000 +0000
++++ gcc-4.8.3/gcc/config/sh/linux.h	2014-06-01 05:02:45.017138692 +0000
+@@ -43,7 +43,7 @@
+ 
+ #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux.so.2"
+ 
+ #undef SUBTARGET_LINK_EMUL_SUFFIX
+ #define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
+diff -Naur gcc-4.8.3.orig/gcc/config/sparc/linux.h gcc-4.8.3/gcc/config/sparc/linux.h
+--- gcc-4.8.3.orig/gcc/config/sparc/linux.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/sparc/linux.h	2014-06-01 05:02:45.017138692 +0000
+@@ -83,7 +83,7 @@
+    When the -shared link option is used a final link is not being
+    done.  */
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux.so.2"
+ 
+ #undef  LINK_SPEC
+ #define LINK_SPEC "-m elf32_sparc %{shared:-shared} \
+diff -Naur gcc-4.8.3.orig/gcc/config/sparc/linux64.h gcc-4.8.3/gcc/config/sparc/linux64.h
+--- gcc-4.8.3.orig/gcc/config/sparc/linux64.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/sparc/linux64.h	2014-06-01 05:02:45.017138692 +0000
+@@ -92,8 +92,8 @@
+    When the -shared link option is used a final link is not being
+    done.  */
+ 
+-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
+-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER32 "/tools/lib/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER64 "/tools/lib64/ld-linux.so.2"
+ 
+ #ifdef SPARC_BI_ARCH
+ 
+@@ -201,7 +201,7 @@
+ #else /* !SPARC_BI_ARCH */
+ 
+ #undef LINK_SPEC
+-#define LINK_SPEC "-m elf64_sparc -Y P,%R/usr/lib64 %{shared:-shared} \
++#define LINK_SPEC "-m elf64_sparc -Y P,%R/tools/lib64 %{shared:-shared} \
+   %{!shared: \
+     %{!static: \
+       %{rdynamic:-export-dynamic} \
+diff -Naur gcc-4.8.3.orig/gcc/config/xtensa/linux.h gcc-4.8.3/gcc/config/xtensa/linux.h
+--- gcc-4.8.3.orig/gcc/config/xtensa/linux.h	2013-01-10 20:38:27.000000000 +0000
++++ gcc-4.8.3/gcc/config/xtensa/linux.h	2014-06-01 05:02:45.017138692 +0000
+@@ -44,7 +44,7 @@
+   %{mlongcalls:--longcalls} \
+   %{mno-longcalls:--no-longcalls}"
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld.so.1"
+ 
+ #undef LINK_SPEC
+ #define LINK_SPEC \
