Index: source-builder/config/gcc-common-1.cfg
===================================================================
--- source-builder/config/gcc-common-1.cfg	(revision b8ee74d356e95e43387ffa0c4a73776724ed4015)
+++ source-builder/config/gcc-common-1.cfg	(revision 649a64c0afab47496be2894364f370813e550b6c)
@@ -34,7 +34,8 @@
 %prep
   # gcc and optional the g++ core if separate packages
+  source_dir_0="gcc-%{gcc_version}"
   %setup -q -c -n %{name}-%{version}
   %{?source1:%setup -q -D -T -n %{name}-%{version} -a1}
-  cd gcc-%{gcc_version}
+  cd ${source_dir_0}
   %{?patch0:%patch0 %{?patch0_opts:%{patch0_opts}}%{!?patch0_opts:-p1}}
   %{?patch1:%patch1 %{?patch1_opts:%{patch1_opts}}%{!?patch1_opts:-p1}}
@@ -50,6 +51,7 @@
 
   # newlib
+  source_dir_10="newlib-%{newlib_version}"
   %setup -q -D -T -n %{name}-%{version} -a10
-  cd newlib-%{newlib_version}
+  cd ${source_dir_10}
   %{?patch10:%patch10 %{?patch10_opts:%{patch10_opts}}%{!?patch10_opts:-p1}}
   %{?patch11:%patch11 %{?patch11_opts:%{patch11_opts}}%{!?patch11_opts:-p1}}
@@ -65,38 +67,46 @@
 
   # Link newlib into the gcc source tree
-  ln -s ../newlib-%{newlib_version}/newlib gcc-%{gcc_version}
+  %{__rmfile} ${source_dir_0}/newlib
+  %{__ln_s} $PWD/${source_dir_10}/newlib ${source_dir_0}/newlib
 
   # MPFR
+  source_dir_20="mpfr-%{mpfr_version}"
   %setup -q -D -T -n %{name}-%{version} -a20
-  cd mpfr-%{mpfr_version}
+  cd ${source_dir_20}
   %{?patch20:%patch20 -p1}
   cd ..
   # Build MPFR one-tree style
-  ln -s ../mpfr-%{mpfr_version} gcc-%{gcc_version}/mpfr
+  %{__rmfile} ${source_dir_0}/mpfr
+  %{__ln_s} $PWD/${source_dir_20} ${source_dir_0}/mpfr
 
   # MPC
+  source_dir_21="mpc-%{mpc_version}"
   %setup -q -D -T -n %{name}-%{version} -a21
-  cd mpc-%{mpc_version}
+  cd ${source_dir_21}
   %{?patch21:%patch21 -p1}
   cd ..
   # Build MPC one-tree style
-  ln -s ../mpc-%{mpc_version} gcc-%{gcc_version}/mpc
+  %{__rmfile} ${source_dir_0}/mpc
+  %{__ln_s} $PWD/${source_dir_21} ${source_dir_0}/mpc
 
   # GMP
+  source_dir_22="gmp-%{gmp_version}"
   %setup -q -D -T -n %{name}-%{version} -a22
-  cd gmp-%{gmp_version}
+  cd ${source_dir_22}
   %{?patch22:%patch22 -p1}
   cd ..
   # Build GMP one-tree style
-  ln -s ../gmp-%{gmp_version} gcc-%{gcc_version}/gmp
-
-  echo "%{gcc_version_message}" > gcc-%{gcc_version}/gcc/DEV-PHASE
+  %{__rmfile} ${source_dir_0}/gmp
+  %{__ln_s} $PWD/${source_dir_22} ${source_dir_0}/gmp
+
+  echo "%{gcc_version_message}" > ${source_dir_0}/gcc/DEV-PHASE
 
   # Fix timestamps
-  cd gcc-%{gcc_version}
+  cd ${source_dir_0}
   contrib/gcc_update --touch
   cd ..
 
 %build
+  # Build directory support.
   if test "%{_build}" != "%{_host}" ; then
     build_dir="build-cxc"
@@ -106,8 +116,27 @@
   mkdir -p ${build_dir}
   cd ${build_dir}
+
+  # Languages.
   languages="c"
 %if %{enable_cxx}
   languages="$languages,c++"
 %endif
+%if %{enable_ada}
+  languages="$languages,ada"
+%endif
+%if %{enable_go}
+  languages="$languages,go"
+%endif
+%if %{enable_fortran}
+  languages="$languages,fortran"
+%endif
+%if %{enable_java}
+  languages="$languages,java"
+%endif
+%if %{enable_objc}
+  languages="$languages,objc"
+%endif
+
+  # Host flags
   if test "%{_build}" != "%{_host}" ; then
     CFLAGS_FOR_BUILD="-g -O2 -Wall"
@@ -121,5 +150,6 @@
   fi
   export CFLAGS CFLAGS_FOR_BUILD CC CXXFLAGS_FOR_BUILD CXX
-  ../gcc-%{gcc_version}/configure \
+
+  ../${source_dir_0}/configure \
     --prefix=%{_prefix} \
     --bindir=%{_bindir} \
@@ -148,15 +178,15 @@
     --enable-languages="$languages"
 
-  unset CFLAGS CFLAGS_FOR_BUILD CC CXXFLAGS_FOR_BUILD CXX
-
   if test "%_host" != "%_build" ; then
     # Bug in gcc-3.2.1:
     # Somehow, gcc doesn't get syslimits.h right for Cdn-Xs
     mkdir -p gcc/include
-    cp ../gcc-%{gcc_version}/gcc/gsyslimits.h gcc/include/syslimits.h
+    cp ../${source_dir_0}/gcc/gsyslimits.h gcc/include/syslimits.h
   fi
 
   %{__make} %{?_smp_mflags} all
   cd ..
+
+  unset CFLAGS CFLAGS_FOR_BUILD CC CXXFLAGS_FOR_BUILD CXX
 
 %install
@@ -180,4 +210,10 @@
   %{__rmfile} $SB_BUILD_ROOT%{_mandir}/man3/*ffi*
 
+  # Clean the symlinks away incase the source is a repo
+  %{__rmfile} ${source_dir_0}/newlib
+  %{__rmfile} ${source_dir_0}/mpfr
+  %{__rmfile} ${source_dir_0}/mpc
+  %{__rmfile} ${source_dir_0}/gmp
+
 %testing
   # Add testing here.
