Updated the build tool for the cross compiler
This commit is contained in:
parent
adaca1d72e
commit
6ce50485be
|
@ -0,0 +1,20 @@
|
|||
Copyright (c) 2008-2016 Travis Geiselbrecht
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files
|
||||
(the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge,
|
||||
publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@ -0,0 +1,36 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
function help()
|
||||
{
|
||||
echo "Options"
|
||||
echo " -h|-? display this help message"
|
||||
echo " -o <dir> output directory"
|
||||
exit 1
|
||||
}
|
||||
|
||||
while getopts ho:? arg
|
||||
do
|
||||
case $arg in
|
||||
o ) OUTDIR=$OPTARG ;;
|
||||
h ) help ;;
|
||||
? ) help ;;
|
||||
* ) echo "unrecognized option '$arg'" ; exit 1 ;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -z "$OUTDIR" ]; then
|
||||
OUTDIR=`pwd`
|
||||
fi
|
||||
|
||||
# load GCCVER and BINVER
|
||||
. ./toolvers
|
||||
|
||||
rm -f $OUTDIR/build.log
|
||||
rm -rf $OUTDIR/build-*
|
||||
rm -rf $OUTDIR/gcc-$GCCVER
|
||||
rm -rf $OUTDIR/binutils-$BINVER
|
||||
rm -rf $OUTDIR/gdb-$GDBVER
|
||||
rm -rf $OUTDIR/gmp-$GMPVER
|
||||
rm -rf $OUTDIR/mpc-$MPCVER
|
||||
rm -rf $OUTDIR/mpfr-$MPFRVER
|
||||
rm -f $OUTDIR/.extracted-stamp
|
|
@ -0,0 +1,273 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
OS=`uname`
|
||||
HOSTARCH=`uname -m`
|
||||
PARALLEL=
|
||||
FETCH=0
|
||||
QUIET=0
|
||||
STRIP=0
|
||||
GNU_MIRROR=https://mirrors.kernel.org/gnu
|
||||
# Get absolute path, will spawn a subshell then exit so our pwd is retained
|
||||
SCRIPTROOT=$(cd "$(dirname $0)" && pwd)
|
||||
PATCHES=$SCRIPTROOT/patches/
|
||||
|
||||
# Cause errors in pipes to return failure when necessary
|
||||
set -o pipefail
|
||||
|
||||
function err() {
|
||||
echo "doit: error during build"
|
||||
if [ "$QUIET" = "1" ]; then
|
||||
echo "doit: dumping last 50 lines of build log..."
|
||||
echo "doit: see $OUTDIR/build.log for the full details"
|
||||
tail -50 $OUTDIR/build.log
|
||||
fi
|
||||
exit 1
|
||||
}
|
||||
|
||||
trap err ERR
|
||||
|
||||
function help()
|
||||
{
|
||||
echo "Options"
|
||||
echo " -a <arch list> architectures to build"
|
||||
echo " example: -a 'arm' or -a 'arm i386 x86_64' for multiple"
|
||||
echo " -c use compilation cache (ccache must be installed)"
|
||||
echo " -f fetch source releases from upstream"
|
||||
echo " -h|-? display this help message"
|
||||
echo " -j<#> use <#> parallel workers to build"
|
||||
echo " -o <dir> output directory"
|
||||
echo " -q make the build quieter"
|
||||
echo " -s strip the binaries"
|
||||
exit 1
|
||||
}
|
||||
|
||||
function log()
|
||||
{
|
||||
if [ "$QUIET" = "1" ]; then
|
||||
"$@" >> $OUTDIR/build.log 2>&1
|
||||
else
|
||||
"$@" 2>&1 | tee -a $OUTDIR/build.log
|
||||
fi
|
||||
}
|
||||
|
||||
function extract-tool()
|
||||
{
|
||||
#echo "extract-tool " $1 $2 $3 $4
|
||||
|
||||
TARFILE=${1}-${2}.tar$3
|
||||
TARGETDIR=${1}-${2}
|
||||
HASH="$4"
|
||||
PATCH="$5"
|
||||
if [ -f ${TARGETDIR}/.extracted ]; then
|
||||
log echo "$TARFILE already extracted into $TARGETDIR, skipping"
|
||||
return 0
|
||||
fi
|
||||
if [ ! -f $ARCHIVES/$TARFILE ]; then
|
||||
log echo "error, missing $TARFILE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "checking $TARFILE integrity"
|
||||
if [ "$(shasum -a 256 -b "$ARCHIVES/$TARFILE" | cut -f1 -d' ')" != "$HASH" ]; then
|
||||
log echo "$TARFILE failed integrity check"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo extracting $TARFILE
|
||||
pushd $OUTDIR
|
||||
rm -rf $TARGETDIR
|
||||
tar xf $ARCHIVES/$TARFILE || exit 1
|
||||
|
||||
if [ -n "$PATCH" ]; then
|
||||
log echo patching $1
|
||||
log patch -d $TARGETDIR -p1 < "$PATCH" || exit 1
|
||||
fi
|
||||
|
||||
touch $TARGETDIR/.extracted || exit 1
|
||||
popd
|
||||
}
|
||||
|
||||
MAKE=make
|
||||
if [ "$OS" = "Linux" ]; then
|
||||
COUNT=`grep processor /proc/cpuinfo | wc -l`
|
||||
PARALLEL=-j`expr $COUNT + $COUNT`
|
||||
fi
|
||||
if [ "$OS" = "Darwin" ]; then
|
||||
PARALLEL=-j`sysctl -n hw.ncpu`
|
||||
export CXXFLAGS="-fbracket-depth=1024"
|
||||
fi
|
||||
if [ "$OS" = "FreeBSD" ]; then
|
||||
PARALLEL=-j`sysctl -n hw.ncpu`
|
||||
export CXXFLAGS="-fbracket-depth=1024"
|
||||
MAKE=gmake
|
||||
fi
|
||||
|
||||
if [ "$HOSTARCH" = "amd64" ]; then
|
||||
HOSTARCH=x86_64
|
||||
fi
|
||||
|
||||
if [ $# == "0" ]; then
|
||||
help
|
||||
fi
|
||||
|
||||
while getopts a:cfhj:o:qs? arg
|
||||
do
|
||||
case $arg in
|
||||
a ) ARCHES=$OPTARG ;;
|
||||
c ) CCACHE=1 ;;
|
||||
j ) PARALLEL="-j$OPTARG" ;;
|
||||
f ) FETCH=1 ;;
|
||||
o ) OUTDIR=$OPTARG ;;
|
||||
q ) QUIET=1 ;;
|
||||
s ) STRIP=1 ;;
|
||||
h ) help ;;
|
||||
? ) help ;;
|
||||
* ) echo "unrecognized option '$arg'" ; exit 1 ;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
if [ -z "$ARCHES" ]; then
|
||||
echo need to specify architectures to build
|
||||
echo ie -a "arm sh"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$OUTDIR" ]; then
|
||||
OUTDIR=`pwd`
|
||||
fi
|
||||
ARCHIVES=$OUTDIR/archives
|
||||
|
||||
if [ -z $(which makeinfo) ]; then
|
||||
echo makeinfo not found. On debian/ubuntu this is provided by the texinfo package.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export CC="cc"
|
||||
export CXX="c++"
|
||||
|
||||
if [ "$CCACHE" = "1" ]; then
|
||||
export CC="ccache $CC"
|
||||
export CXX="ccache $CXX"
|
||||
fi
|
||||
|
||||
log date
|
||||
log echo "ARCHES='$ARCHES' PARALLEL='$PARALLEL' FETCH='$FETCH' CCACHE='$CCACHE'"
|
||||
# load GCCVER and BINVER
|
||||
. toolvers
|
||||
|
||||
if [ "$FETCH" = "1" ]; then
|
||||
if [ ! -f $ARCHIVES/binutils-$BINVER.tar.bz2 ]; then
|
||||
echo fetching binutils-$BINVER
|
||||
log wget -P $ARCHIVES -N $GNU_MIRROR/binutils/binutils-$BINVER.tar.bz2
|
||||
fi
|
||||
if [ ! -f $ARCHIVES/gcc-$GCCVER.tar.bz2 ]; then
|
||||
echo fetching gcc-$GCCVER
|
||||
log wget -P $ARCHIVES -N $GNU_MIRROR/gcc/gcc-$GCCVER/gcc-$GCCVER.tar.bz2
|
||||
fi
|
||||
if [ ! -f $ARCHIVES/gdb-$GDBVER.tar.xz ]; then
|
||||
echo fetching gdb-$GDBVER
|
||||
log wget -P $ARCHIVES -N $GNU_MIRROR/gdb/gdb-$GDBVER.tar.xz
|
||||
fi
|
||||
if [ ! -f $ARCHIVES/mpfr-$MPFRVER.tar.bz2 ]; then
|
||||
echo fetching mpfr-$MPFRVER
|
||||
log wget -P $ARCHIVES -N $GNU_MIRROR/mpfr/mpfr-$MPFRVER.tar.bz2
|
||||
fi
|
||||
if [ ! -f $ARCHIVES/mpc-$MPCVER.tar.gz ]; then
|
||||
echo fetching mpc-$MPCVER
|
||||
log wget -P $ARCHIVES -N $GNU_MIRROR/mpc/mpc-$MPCVER.tar.gz
|
||||
fi
|
||||
if [ ! -f $ARCHIVES/gmp-$GMPVER.tar.bz2 ]; then
|
||||
echo fetching gmp-$GMPVER
|
||||
log wget -P $ARCHIVES -N $GNU_MIRROR/gmp/gmp-$GMPVER.tar.bz2
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -f $OUTDIR/.extracted-stamp ]; then
|
||||
extract-tool binutils $BINVER .bz2 $BINHASH
|
||||
extract-tool gcc $GCCVER .bz2 $GCCHASH $PATCHES/gcc-patch.txt
|
||||
extract-tool gdb $GDBVER .xz $GDBHASH $PATCHES/gdb-patch.txt
|
||||
extract-tool gmp $GMPVER .bz2 $GMPHASH
|
||||
extract-tool mpc $MPCVER .gz $MPCHASH
|
||||
extract-tool mpfr $MPFRVER .bz2 $MPFRHASH
|
||||
touch $OUTDIR/.extracted-stamp
|
||||
fi
|
||||
|
||||
# link the last three libs into gcc
|
||||
pushd $OUTDIR/gcc-$GCCVER
|
||||
ln -sf ../gmp-$GMPVER gmp
|
||||
ln -sf ../mpc-$MPCVER mpc
|
||||
ln -sf ../mpfr-$MPFRVER mpfr
|
||||
popd
|
||||
|
||||
for ARCH in $ARCHES; do
|
||||
echo building for arch \"$ARCH\"
|
||||
if [ "$ARCH" == "arm" ]; then
|
||||
TARGET=arm-eabi
|
||||
else
|
||||
TARGET=$ARCH-elf
|
||||
fi
|
||||
|
||||
INSTALLPATH=$OUTDIR/$TARGET-$GCCVER-$OS-$HOSTARCH
|
||||
BINBUILDPATH=$OUTDIR/build-binutils-$BINVER-$ARCH-$OS-$HOSTARCH
|
||||
GCCBUILDPATH=$OUTDIR/build-gcc-$GCCVER-$ARCH-$OS-$HOSTARCH
|
||||
GDBBUILDPATH=$OUTDIR/build-gdb-$GDBVER-$ARCH-$OS-$HOSTARCH
|
||||
export PATH=$INSTALLPATH/bin:$PATH
|
||||
|
||||
# Building Binutils
|
||||
if [ ! -f $BINBUILDPATH/built.txt ]; then
|
||||
echo building binutils
|
||||
mkdir -p $BINBUILDPATH
|
||||
pushd $BINBUILDPATH
|
||||
log ../binutils-$BINVER/configure --target=$TARGET --prefix=$INSTALLPATH --with-sysroot --disable-nls --disable-werror
|
||||
log $MAKE $PARALLEL
|
||||
log $MAKE install
|
||||
touch built.txt
|
||||
popd
|
||||
fi
|
||||
|
||||
# Building GCC
|
||||
if [ ! -f $GCCBUILDPATH/built.txt ]; then
|
||||
echo building gcc
|
||||
ARCH_OPTIONS=
|
||||
if [ $ARCH == "arm" ]; then
|
||||
ARCH_OPTIONS="--with-cpu=arm926ej-s --with-fpu=vfp"
|
||||
fi
|
||||
|
||||
mkdir -p $GCCBUILDPATH
|
||||
pushd $GCCBUILDPATH
|
||||
log ../gcc-$GCCVER/configure --target=$TARGET --prefix=$INSTALLPATH --enable-languages=c --disable-nls --without-headers $ARCH_OPTIONS
|
||||
log $MAKE all-gcc $PARALLEL
|
||||
log $MAKE all-target-libgcc $PARALLEL
|
||||
log $MAKE install-gcc
|
||||
log $MAKE install-target-libgcc
|
||||
touch built.txt
|
||||
popd
|
||||
fi
|
||||
|
||||
if [ ! -f $GDBBUILDPATH/built.txt ]; then
|
||||
case "$TARGET" in
|
||||
aarch64-elf) EXTRA_TARGETS="--enable-targets=arm-eabi" ;;
|
||||
*) EXTRA_TARGETS="" ;;
|
||||
esac
|
||||
|
||||
echo building gdb
|
||||
mkdir -p $GDBBUILDPATH
|
||||
pushd $GDBBUILDPATH
|
||||
log ../gdb-$GDBVER/configure --target=$TARGET --prefix=$INSTALLPATH --disable-werror $EXTRA_TARGETS
|
||||
log make $PARALLEL
|
||||
log make install
|
||||
touch built.txt
|
||||
popd
|
||||
fi
|
||||
|
||||
# Optionally strip the binaries
|
||||
if [ "${STRIP}" = "1" ]; then
|
||||
find "${INSTALLPATH}/bin" -type f -exec strip {} \;
|
||||
for filename in $(find "${INSTALLPATH}/libexec" -type f); do
|
||||
(file "${filename}" | grep -q ELF) && strip "${filename}"
|
||||
done
|
||||
fi
|
||||
done
|
||||
|
||||
echo all done
|
|
@ -0,0 +1,24 @@
|
|||
# This script adds toolchains built by doit to $PATH. It should sourced from within bash like:
|
||||
# . path/to/env.sh
|
||||
|
||||
OS=`uname`
|
||||
HOSTARCH=`uname -m`
|
||||
DIR=`dirname "$BASH_SOURCE"`
|
||||
SELF=`basename "$BASH_SOURCE"`
|
||||
# OSX readlink doesn't support -f, but greadlink is the gnu version
|
||||
# that Linux uses
|
||||
READLINK=`which greadlink || which readlink`
|
||||
|
||||
if [ "${BASH_SOURCE[0]}" = "${0}" ]; then
|
||||
echo "$SELF must be sourced, not executed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for p in `ls -d $DIR/*-$OS-$HOSTARCH | grep -v build`;
|
||||
do
|
||||
if [ -d $p/bin ]; then
|
||||
ABS_PATH=`$READLINK -f $p`
|
||||
echo "added $ABS_PATH";
|
||||
export PATH=$ABS_PATH/bin:$PATH;
|
||||
fi
|
||||
done
|
|
@ -0,0 +1,86 @@
|
|||
diff -durN gcc-6.2.0/gcc/config/arm/t-arm-elf gcc-6.2.0.patched/gcc/config/arm/t-arm-elf
|
||||
--- gcc-6.2.0/gcc/config/arm/t-arm-elf 2016-01-04 06:30:50.000000000 -0800
|
||||
+++ gcc-6.2.0.patched/gcc/config/arm/t-arm-elf 2016-09-30 11:41:23.318385513 -0700
|
||||
@@ -25,22 +25,36 @@
|
||||
#MULTILIB_DIRNAMES += fa526 fa626 fa606te fa626te fmp626 fa726te
|
||||
#MULTILIB_EXCEPTIONS += *mthumb*/*mcpu=fa526 *mthumb*/*mcpu=fa626
|
||||
|
||||
-#MULTILIB_OPTIONS += march=armv7
|
||||
-#MULTILIB_DIRNAMES += thumb2
|
||||
-#MULTILIB_EXCEPTIONS += march=armv7* marm/*march=armv7*
|
||||
-#MULTILIB_MATCHES += march?armv7=march?armv7-a
|
||||
-#MULTILIB_MATCHES += march?armv7=march?armv7-r
|
||||
-#MULTILIB_MATCHES += march?armv7=march?armv7-m
|
||||
-#MULTILIB_MATCHES += march?armv7=mcpu?cortex-a8
|
||||
-#MULTILIB_MATCHES += march?armv7=mcpu?cortex-r4
|
||||
-#MULTILIB_MATCHES += march?armv7=mcpu?cortex-m3
|
||||
+# build a bunch of specialized versions of libcc for particular cores
|
||||
+#MULTILIB_OPTIONS += mcpu=arm7tdmi/mcpu=arm9tdmi/mcpu=arm920t/mcpu=arm926ej-s/mcpu=arm1136j-s/mcpu=arm1136jf-s/mcpu=arm1176jz-s/mcpu=arm1176jzf-s/mcpu=xscale/mcpu=mpcore/mcpu=cortex-a8/cortex-a9/march=armv4t/march=armv5t/march=armv5te/march=armv6/march=armv6j/march=armv6k/march=armv6z/march=armv6zk/march=armv7-a/march=armv7-r
|
||||
+#MULTILIB_DIRNAMES += arm7tdmi arm9tdmi arm920t arm926ej-s arm1136j-s arm1136jf-s arm1176jz-s arm1176jzf-s xscale mpcore cortex-a8 cortex-a9 cortex-m3 armv4t armv5t armv5te armv6 armv6j armv6k armv6z armv6zk armv7-a armv7-r
|
||||
+#MULTILIB_OPTIONS += mcpu=arm7tdmi/mcpu=arm9tdmi/mcpu=arm920t/mcpu=arm926ej-s/mcpu=arm1136j-s/mcpu=arm1136jf-s/mcpu=arm1176jz-s/mcpu=arm1176jzf-s/mcpu=xscale/mcpu=mpcore/mcpu=cortex-a8/mcpu=cortex-a9
|
||||
+#MULTILIB_DIRNAMES += arm7tdmi arm9tdmi arm920t arm926ej-s arm1136j-s arm1136jf-s arm1176jz-s arm1176jzf-s xscale mpcore cortex-a8 cortex-a9
|
||||
+
|
||||
+MULTILIB_OPTIONS += march=armv7
|
||||
+MULTILIB_DIRNAMES += thumb2
|
||||
+MULTILIB_EXCEPTIONS += march=armv7* marm/*march=armv7*
|
||||
+MULTILIB_MATCHES += march?armv7=march?armv7-a
|
||||
+MULTILIB_MATCHES += march?armv7=march?armv7-r
|
||||
+MULTILIB_MATCHES += march?armv7=march?armv7-m
|
||||
+MULTILIB_MATCHES += march?armv7=mcpu?cortex-a15
|
||||
+MULTILIB_MATCHES += march?armv7=mcpu?cortex-a9
|
||||
+MULTILIB_MATCHES += march?armv7=mcpu?cortex-a8
|
||||
+MULTILIB_MATCHES += march?armv7=mcpu?cortex-r4
|
||||
+MULTILIB_MATCHES += march?armv7=mcpu?cortex-m4
|
||||
+MULTILIB_MATCHES += march?armv7=mcpu?cortex-m3
|
||||
+
|
||||
+#MULTILIB_OPTIONS += mfpu=vfp
|
||||
+#MULTILIB_DIRNAMES += vfp
|
||||
+#MULTILIB_MATCHES += mfpu?vfp=mcpu?arm1136jf-s
|
||||
+#MULTILIB_MATCHES += mfpu?vfp=mcpu?arm1136jzf-s
|
||||
|
||||
# Not quite true. We can support hard-vfp calling in Thumb2, but how do we
|
||||
# express that here? Also, we really need architecture v5e or later
|
||||
# (mcrr etc).
|
||||
-MULTILIB_OPTIONS += mfloat-abi=hard
|
||||
-MULTILIB_DIRNAMES += fpu
|
||||
-MULTILIB_EXCEPTIONS += *mthumb/*mfloat-abi=hard*
|
||||
+#MULTILIB_OPTIONS += mfloat-abi=hard
|
||||
+#MULTILIB_DIRNAMES += fpu
|
||||
+#MULTILIB_EXCEPTIONS += *mthumb/*mfloat-abi=hard*
|
||||
#MULTILIB_EXCEPTIONS += *mcpu=fa526/*mfloat-abi=hard*
|
||||
#MULTILIB_EXCEPTIONS += *mcpu=fa626/*mfloat-abi=hard*
|
||||
|
||||
@@ -56,8 +70,8 @@
|
||||
# MULTILIB_DIRNAMES += fpu soft
|
||||
# MULTILIB_EXCEPTIONS += *mthumb/*mfloat-abi=hard*
|
||||
#
|
||||
-# MULTILIB_OPTIONS += mno-thumb-interwork/mthumb-interwork
|
||||
-# MULTILIB_DIRNAMES += normal interwork
|
||||
+MULTILIB_OPTIONS += mno-thumb-interwork/mthumb-interwork
|
||||
+MULTILIB_DIRNAMES += normal interwork
|
||||
#
|
||||
# MULTILIB_OPTIONS += fno-leading-underscore/fleading-underscore
|
||||
# MULTILIB_DIRNAMES += elf under
|
||||
diff -durN gcc-6.2.0/gcc/config/i386/t-x86_64-elf gcc-6.2.0.patched/gcc/config/i386/t-x86_64-elf
|
||||
--- gcc-6.2.0/gcc/config/i386/t-x86_64-elf 1969-12-31 16:00:00.000000000 -0800
|
||||
+++ gcc-6.2.0.patched/gcc/config/i386/t-x86_64-elf 2016-09-30 11:55:53.602700086 -0700
|
||||
@@ -0,0 +1,7 @@
|
||||
+# Add redzoneless libgcc
|
||||
+MULTILIB_OPTIONS += mno-red-zone
|
||||
+MULTILIB_DIRNAMES += no-red-zone
|
||||
+
|
||||
+# Build a 32bit libgcc as well
|
||||
+MULTILIB_OPTIONS += m32
|
||||
+MULTILIB_DIRNAMES += 32
|
||||
Binary files gcc-6.2.0/gcc/config/i386/.t-x86_64-elf.swp and gcc-6.2.0.patched/gcc/config/i386/.t-x86_64-elf.swp differ
|
||||
diff -durN gcc-6.2.0/gcc/config.gcc gcc-6.2.0.patched/gcc/config.gcc
|
||||
--- gcc-6.2.0/gcc/config.gcc 2016-06-08 06:34:25.000000000 -0700
|
||||
+++ gcc-6.2.0.patched/gcc/config.gcc 2016-09-30 11:41:23.318385513 -0700
|
||||
@@ -1418,6 +1418,7 @@
|
||||
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h"
|
||||
;;
|
||||
x86_64-*-elf*)
|
||||
+ tmake_file="${tmake_file} i386/t-x86_64-elf"
|
||||
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h"
|
||||
;;
|
||||
x86_64-*-rtems*)
|
|
@ -0,0 +1,15 @@
|
|||
diff -ru gdb-7.6/gdb/configure.tgt gdb-7.6.patched/gdb/configure.tgt
|
||||
--- gdb-7.6/gdb/configure.tgt 2013-03-05 05:37:10.000000000 -0800
|
||||
+++ gdb-7.6.patched/gdb/configure.tgt 2013-10-01 19:58:55.000000000 -0700
|
||||
@@ -646,6 +646,11 @@
|
||||
solib-svr4.o symfile-mem.o linux-tdep.o linux-record.o"
|
||||
build_gdbserver=yes
|
||||
;;
|
||||
+x86_64-*-elf*)
|
||||
+ # Target: x86-64
|
||||
+ gdb_target_obs="amd64-tdep.o i386-tdep.o \
|
||||
+ i387-tdep.o"
|
||||
+ ;;
|
||||
x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu)
|
||||
# Target: FreeBSD/amd64
|
||||
gdb_target_obs="amd64-tdep.o amd64fbsd-tdep.o i386-tdep.o \
|
|
@ -0,0 +1,14 @@
|
|||
# Rerun updatetoolvers after modifying this file
|
||||
GCCVER=6.2.0
|
||||
BINVER=2.27
|
||||
GDBVER=7.11.1
|
||||
GMPVER=5.1.3
|
||||
MPCVER=1.0.3
|
||||
MPFRVER=3.1.4
|
||||
# Below is autogenerated by updatetoolvers
|
||||
GCCHASH=9944589fc722d3e66308c0ce5257788ebd7872982a718aa2516123940671b7c5
|
||||
BINHASH=369737ce51587f92466041a97ab7d2358c6d9e1b6490b3940eb09fb0a9a6ac88
|
||||
GDBHASH=e9216da4e3755e9f414c1aa0026b626251dfc57ffe572a266e98da4f6988fc70
|
||||
GMPHASH=752079520b4690531171d0f4532e40f08600215feefede70b24fabdc6f1ab160
|
||||
MPCHASH=617decc6ea09889fb08ede330917a00b16809b8db88c29c31bfbb49cbf88ecc3
|
||||
MPFRHASH=d3103a80cdad2407ed581f3618c4bed04e0c92d1cf771a65ead662cc397f7775
|
|
@ -0,0 +1,65 @@
|
|||
#!/usr/bin/env bash
|
||||
# Change the version numbers in the toolvers file and then run this
|
||||
# script to update the hashes
|
||||
|
||||
ARCHIVES=archives
|
||||
GNU_MIRROR=https://mirrors.kernel.org/gnu
|
||||
TOOLVERS_FILE="toolvers"
|
||||
. "$TOOLVERS_FILE"
|
||||
|
||||
function verify_sig() {
|
||||
SIGFILE="$1"
|
||||
ARCHIVE="$2"
|
||||
|
||||
if ! gpg -q --verify "$SIGFILE" "$ARCHIVE"; then
|
||||
echo "Failed to verify $ARCHIVE, aborting"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
function fetch_and_verify() {
|
||||
PKG_URI_DIR="$1"
|
||||
FILENAME="$2"
|
||||
|
||||
if [ ! -f "$ARCHIVES/$FILENAME" ]; then
|
||||
wget -P "$ARCHIVES" -N "$PKG_URI_DIR/$FILENAME"
|
||||
fi
|
||||
if [ ! -f "$ARCHIVES/$FILENAME.sig" ]; then
|
||||
wget -P "$ARCHIVES" -N "$PKG_URI_DIR/$FILENAME.sig"
|
||||
fi
|
||||
|
||||
verify_sig "$ARCHIVES/$FILENAME.sig" "$ARCHIVES/$FILENAME"
|
||||
}
|
||||
|
||||
|
||||
fetch_and_verify "$GNU_MIRROR/binutils/" "binutils-$BINVER.tar.bz2"
|
||||
fetch_and_verify "$GNU_MIRROR/gcc/gcc-$GCCVER/" "gcc-$GCCVER.tar.bz2"
|
||||
fetch_and_verify "$GNU_MIRROR/gdb/" "gdb-$GDBVER.tar.xz"
|
||||
fetch_and_verify "$GNU_MIRROR/mpfr/" "mpfr-$MPFRVER.tar.bz2"
|
||||
fetch_and_verify "$GNU_MIRROR/mpc/" "mpc-$MPCVER.tar.gz"
|
||||
fetch_and_verify "$GNU_MIRROR/gmp/" "gmp-$GMPVER.tar.bz2"
|
||||
|
||||
BINHASH=$(shasum -a 256 -b "$ARCHIVES/binutils-$BINVER.tar.bz2" | cut -f1 -d' ')
|
||||
GCCHASH=$(shasum -a 256 -b "$ARCHIVES/gcc-$GCCVER.tar.bz2" | cut -f1 -d' ')
|
||||
GDBHASH=$(shasum -a 256 -b "$ARCHIVES/gdb-$GDBVER.tar.xz" | cut -f1 -d' ')
|
||||
MPFRHASH=$(shasum -a 256 -b "$ARCHIVES/mpfr-$MPFRVER.tar.bz2" | cut -f1 -d' ')
|
||||
MPCHASH=$(shasum -a 256 -b "$ARCHIVES/mpc-$MPCVER.tar.gz" | cut -f1 -d' ')
|
||||
GMPHASH=$(shasum -a 256 -b "$ARCHIVES/gmp-$GMPVER.tar.bz2" | cut -f1 -d' ')
|
||||
|
||||
tmp=$(mktemp)
|
||||
echo "# Rerun updatetoolvers after modifying this file" > "$tmp"
|
||||
echo "GCCVER=$GCCVER" >> "$tmp"
|
||||
echo "BINVER=$BINVER" >> "$tmp"
|
||||
echo "GDBVER=$GDBVER" >> "$tmp"
|
||||
echo "GMPVER=$GMPVER" >> "$tmp"
|
||||
echo "MPCVER=$MPCVER" >> "$tmp"
|
||||
echo "MPFRVER=$MPFRVER" >> "$tmp"
|
||||
|
||||
echo "# Below is autogenerated by updatetoolvers" >> "$tmp"
|
||||
echo "GCCHASH=$GCCHASH" >> "$tmp"
|
||||
echo "BINHASH=$BINHASH" >> "$tmp"
|
||||
echo "GDBHASH=$GDBHASH" >> "$tmp"
|
||||
echo "GMPHASH=$GMPHASH" >> "$tmp"
|
||||
echo "MPCHASH=$MPCHASH" >> "$tmp"
|
||||
echo "MPFRHASH=$MPFRHASH" >> "$tmp"
|
||||
mv "$tmp" "$TOOLVERS_FILE"
|
|
@ -1,4 +1,4 @@
|
|||
#include <assert.h>
|
||||
#include "assert.h"
|
||||
#include "intr.h"
|
||||
|
||||
irql_t KABI ke_raise_irql(irql_t irql)
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#include <spin_lock.h>
|
||||
#include "atomic.h"
|
||||
#include "spin_lock.h"
|
||||
|
||||
|
|
Loading…
Reference in New Issue