updated patches
authorReto Achermann <acreto@student.ethz.ch>
Wed, 26 Mar 2014 17:43:18 +0000 (18:43 +0100)
committerStefan Kaestle <stefan.kaestle@inf.ethz.ch>
Wed, 20 Aug 2014 13:27:56 +0000 (15:27 +0200)
tools/k1om/binutils-2.22+mpss3.2-barrelfish.patch
tools/k1om/build-toolchain.sh
tools/k1om/gcc-4.7.0+mpss3.2-barrelfish.patch

index 35cb7ee..20cd88d 100644 (file)
@@ -24,7 +24,8 @@ index 5324d39a21cb..3f0119ab2649 100644
 +    ;;
 +    k1om-*-barrelfish*)
 +    targ_defvec=bfd_elf64_k1om_vec
-+    targ_selvecs="bfd_elf64_x86_64_vec"
++    targ_selvecs="bfd_elf64_x86_64_vec bfd_elf64_k1om_vec bfd_elf64_l1om_vec"
+#+    targ_selvecs="bfd_elf64_k1om_vec bfd_elf64_l1om_vec"
 +    want64=true ;;
    k1om-*-mingw* | k1om-*-pe | k1om-*-pep)
      targ_defvec=bfd_elf64_k1om_vec
@@ -157,9 +158,11 @@ index c50730b9c514..27702cbedc3a 100644
                        targ_extra_libpath="elf_i386 elf32_x86_64 elf_x86_64"
                        tdir_i386linux=`echo ${targ_alias}aout | sed -e 's/x86_64/i386/'`
                        tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'` ;;
-+k1om-*-barrelfish*)   targ_emul=barrelfish_k1om
-+                      targ_extra_emuls="elf_k1om barrelfish_x86_64 elf_x86_64"
-+                      targ_extra_libpath="elf_k1om barrelfish_x86_64 elf_x86_64" ;;
++k1om-*-barrelfish*)   targ_emul=elf_k1om
++                      targ_extra_emuls="barrelfish_k1om barrelfish_x86_64 elf_x86_64"
+#+                     targ_extra_emuls="barrelfish_k1om"
++                      targ_extra_libpath="barrelfish_k1om elf_k1om barrelfish_x86_64 elf_x86_64" ;;
+#+                     targ_extra_libpath="elf_k1om" ;;
 +x86_64-*-barrelfish*) targ_emul=barrelfish_x86_64 ;;
  x86_64-*-linux-*)     targ_emul=elf_x86_64
                        targ_extra_emuls="elf32_x86_64 elf_i386 i386linux elf_l1om elf_k1om"
index e67cafa..2150968 100755 (executable)
@@ -21,6 +21,8 @@ set -x  # Trace each command before execution.
 BINUTILS=binutils-2.22+mpss3.2
 GCC=gcc-4.7.0+mpss3.2
 
+export CC=gcc-4.6
+
 # Path of your Barrelfish source and build tree.
 BARRELFISH_SOURCE=/home/acreto/barrelfish.xeon-phi
 BARRELFISH_BUILD=${BARRELFISH_SOURCE}/build
@@ -31,7 +33,7 @@ TOOLCHAIN_PREFIX=${BARRELFISH_SOURCE}/toolchain
 
 # Cross compiler target.
 #TARGET=x86_64-pc-barrelfish
-TARGET=k1om-pc-barrelfish
+export TARGET=k1om-pc-barrelfish
 #TARGET=i586-pc-barrelfish
 #TARGET=i586-scc-barrelfish
 
@@ -67,8 +69,11 @@ exit_with_error() { echo "error: $1" && exit 1; }
 
 TOOLCHAIN_BUILD="$(mktemp -d --tmpdir barrelfish-toolchain-build.XXXXXXXXXX)"
 
+
+
 # Build the toolchain.
 export PATH=${PATH}:${TOOLCHAIN_PREFIX}/bin
+export PREFIX=${TOOLCHAIN_PREFIX}
 
 pushd "${TOOLCHAIN_BUILD}"
 
@@ -86,11 +91,17 @@ pushd ${BINUTILS}-build/
     --target="${TARGET}" \
     --enable-threads \
     --enable-lto \
+    --with-cpu-64=k1om \
+    --with-arch-64=k1om \
+    --with-tune-64=k1om \
+    --with-cpu=k1om \
+    --with-arch=k1om \
+    --with-tune=k1om \
     --enable-plugins \
     --disable-nls \
     --disable-doc \
     MAKEINFO=missing
-make MAKEINFO=true -j${MAKE_JOBS}
+make MAKEINFO=true ARCH=k1om -j${MAKE_JOBS}
 make MAKEINFO=true install-strip 
 popd  # ${BINUTILS}-build/
 
@@ -109,21 +120,55 @@ popd  # ${GCC}/
 
 mkdir -p ${GCC}-build/
 pushd ${GCC}-build/
-CC=gcc-4.7 ../${GCC}/configure \
+../${GCC}/configure \
     --prefix="${TOOLCHAIN_PREFIX}" \
     --target="${TARGET}" \
     --enable-languages=c \
     --enable-initfini-array \
     --disable-nls \
-    --disable-multilib \
+    --with-multilib-list=m64 \
     --disable-libssp \
     --with-newlib \
-  #  --with-cpu-64=k1om \
-  #  --with-arch-64=k1om \
-  #  --with-tune-64=k1om \
+    --with-gnu-as \
+    --with-gnu-ld \
+    --with-cpu-64=k1om \
+    --with-arch-64=k1om \
+    --with-tune-64=k1om \
+    --with-cpu=k1om \
+    --with-arch=k1om \
+    --with-tune=k1om \
     MAKEINFO=missing
-make MAKEINFO=true -j$MAKE_JOBS
-make MAKEINFO=true install-strip
+
+#    --disable-multilib \
+
+make MAKEINFO=true ARCH=k1om all-gcc -j$MAKE_JOBS
+make MAKEINFO=true ARCH=k1om install-gcc -j$MAKE_JOBS
+
+
+../${GCC}/configure \
+    --prefix="${TOOLCHAIN_PREFIX}" \
+    --target="${TARGET}" \
+    --enable-languages=c \
+    --enable-initfini-array \
+    --disable-nls \
+    --with-multilib-list=m64 \
+    --disable-libssp \
+    --with-newlib \
+    --with-gnu-as \
+    --with-gnu-ld \
+    --disable-shared \
+    --with-cpu-64=k1om \
+    --with-arch-64=k1om \
+    --with-tune-64=k1om \
+    --with-cpu=k1om \
+    --with-arch=k1om \
+    --with-tune=k1om \
+    MAKEINFO=missing
+
+#    --disable-multilib \
+
+make MAKEINFO=true all -j$MAKE_JOBS
+make MAKEINFO=true install-strip -j$MAKE_JOBS
 popd  # ${GCC}-build/
 
 popd  # ${TOOLCHAIN_BUILD}
index a0f0988..97465cc 100644 (file)
@@ -62,6 +62,15 @@ index 7282a68..3933f4d 100644
  i[34567]86-*-freebsd*)
        tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/freebsd.h"
        tmake_file="${tmake_file} i386/t-crtstuff"
+@@ -2688,7 +2688,7 @@
+ esac
+ case ${target} in
+-i[34567]86-*-linux* | x86_64-*-linux* | [lk]1om-*-linux*)
++i[34567]86-*-linux* | x86_64-*-linux* | [lk]1om-*-linux* | k1om-*-barrelfish* )
+       tmake_file="${tmake_file} i386/t-pmm_malloc i386/t-i386"
+       ;;
+ i[34567]86-*-* | x86_64-*-* | [lk]1om-*-*)
 @@ -2864,6 +2882,10 @@
      arch=l1om
      cpu=l1om
@@ -83,15 +92,35 @@ index 7282a68..3933f4d 100644
        i[34567]86-*-solaris2*)
                tmake_file="${tmake_file} i386/t-fprules-softfp soft-fp/t-softfp"
                ;;
-@@ -2706,7 +2706,7 @@
- esac
- case ${target} in
--i[34567]86-*-linux* | x86_64-*-linux* | [lk]1om-*-linux*)
-+i[34567]86-*-linux* | x86_64-*-linux* | [lk]1om-*-linux* | k1om-*-barrelfish* )
-       tmake_file="${tmake_file} i386/t-pmm_malloc i386/t-i386"
-       ;;
- i[34567]86-*-* | x86_64-*-* | [lk]1om-*-*)
+diff --git a/gcc/configure b/gcc/configure
+--- a/gcc/configure    
++++ b/gcc/configure
+@@ -6897,6 +6897,6 @@
+   case $target in
+     powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux* | [lk]1om*-*-linux* | s390*-*-linux* | \
+-    i?86*-*-mingw* | x86_64*-*-mingw* | \
++    i?86*-*-mingw* | x86_64*-*-mingw* | k1om-*-barrelfish* | \
+     i?86*-*-cygwin*)
+       enable_decimal_float=yes
+       ;;
+@@ -13278,6 +13278,6 @@
+ x86_64-*kfreebsd*-gnu|[lk]1om-*kfreebsd*-gnu| \
+ x86_64-*linux*|[lk]1om-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+-s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
++s390*-*linux*|s390*-*tpf*|sparc*-*linux*|k1om-*-barrelfish*)
+   # Find out which ABI we are using.
+   echo 'int i;' > conftest.$ac_ext
+   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+@@ -13325,6 +13325,9 @@
+         k1om-*linux*)
+           LD="${LD-ld} -m elf_k1om"
+           ;;
++        k1om-*barrelfish*)
++          LD="${LD-ld} -m elf_k1om"
++          ;;
+         ppc*-*linux*|powerpc*-*linux*)
+           LD="${LD-ld} -m elf64ppc"
+           ;;
 diff --git a/boehm-gc/configure b/boehm-gc/configure
 --- a/boehm-gc/configure
 +++ b/boehm-gc/configure
@@ -144,34 +173,6 @@ diff --git a/libgcc/configure b/libgcc/configure
      i?86*-*-cygwin*)
        enable_decimal_float=yes
        ;;
-@@ -6896,7 +6896,7 @@
-   case $target in
-     powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux* | [lk]1om*-*-linux* | s390*-*-linux* | \
--    i?86*-*-mingw* | x86_64*-*-mingw* | \
-+    i?86*-*-mingw* | x86_64*-*-mingw* | k1om-*-barrelfish* | \
-     i?86*-*-cygwin*)
-       enable_decimal_float=yes
-       ;;
-@@ -13277,7 +13277,7 @@
- x86_64-*kfreebsd*-gnu|[lk]1om-*kfreebsd*-gnu| \
- x86_64-*linux*|[lk]1om-*linux*|ppc*-*linux*|powerpc*-*linux*| \
--s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
-+s390*-*linux*|s390*-*tpf*|sparc*-*linux*|k1om-*-barrelfish*)
-   # Find out which ABI we are using.
-   echo 'int i;' > conftest.$ac_ext
-   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
-@@ -13325,6 +13325,9 @@
-         k1om-*linux*)
-           LD="${LD-ld} -m elf_k1om"
-           ;;
-+        k1om-*barrelfish*)
-+          LD="${LD-ld} -m elf_k1om"
-+          ;;
-         ppc*-*linux*|powerpc*-*linux*)
-           LD="${LD-ld} -m elf64ppc"
-           ;;
 diff --git a/libmudflap/configure b/libmudflap/configure
 --- a/libmudflap/configure
 +++ b/libmudflap/configure
@@ -691,7 +692,7 @@ index 66b4724..86bb37d 100644
  i[34567]86-pc-msdosdjgpp*)
        ;;
  i[34567]86-*-lynxos*)
-@@ -597,7 +597,7 @@
+@@ -585,7 +585,7 @@
  esac
  
  case ${host} in
@@ -700,7 +701,7 @@ index 66b4724..86bb37d 100644
    i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | \
    i[34567]86-*-gnu*)
        tmake_file="${tmake_file} t-tls"
-@@ -611,7 +611,7 @@
+@@ -599,7 +599,7 @@
  i[34567]86-*-darwin* | x86_64-*-darwin* | [lk]1om-*-darwin* | \
    i[34567]86-*-kfreebsd*-gnu | x86_64-*-kfreebsd*-gnu | [lk]1om-*-kfreebsd*-gnu | \
    i[34567]86-*-linux* | x86_64-*-linux* | [lk]1om-*-linux* | \
@@ -709,7 +710,7 @@ index 66b4724..86bb37d 100644
    i[34567]86-*-solaris2* | \
    i[34567]86-*-cygwin* | i[34567]86-*-mingw* | x86_64-*-mingw* | \
    i[34567]86-*-freebsd* | x86_64-*-freebsd* | [lk]1om-*-freebsd*)
-@@ -622,7 +622,7 @@
+@@ -610,7 +610,7 @@
  esac
  
  case ${host} in
@@ -748,7 +749,7 @@ diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
 index b642495..45e3ed3 100755
 --- a/libstdc++-v3/configure
 +++ b/libstdc++-v3/configure
-@@ -50852,6 +51752,5867 @@ _ACEOF
+@@ -50889,6 +51789,5867 @@ _ACEOF
    fi
  
      ;;