Working on toolchain autobuild

This commit is contained in:
Kevin Lange 2012-05-16 21:37:06 -04:00
parent b608069bc4
commit 94037f482f
6 changed files with 179 additions and 0 deletions

1
.gitignore vendored
View File

@ -27,3 +27,4 @@ util/toaru-toolchain
util/bin/*
.passed
tags
toolchain/tarballs

63
toolchain/install.sh Executable file
View File

@ -0,0 +1,63 @@
#!/bin/bash
# Toolchain Installer for Debian-like systems. If you're running
# something else, you're pretty much on your own.
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
BEG=$DIR/../util/mk-beg
END=$DIR/../util/mk-end
INFO=$DIR/../util/mk-info
function grab () {
$BEG "wget" "Pulling $1..."
wget -q "$2"
$END "wget" "$1"
}
function deco () {
$BEG "tar" "Unarchving $1..."
tar -xf $2
$END "tar" "$1"
}
function patc () {
$BEG "patch" "Patching $1..."
pushd "$2" > /dev/null
patch -p1 < ../../patches/$2.patch > /dev/null
popd > /dev/null
$END "patch" "$1"
}
function deleteUnused_gcc_4_6_0 () {
# These directories are not used and are primarily for support of unecessarily libraries like Java and the testsuite.
rm -r gcc-4.6.0/boehm-gc gcc-4.6.0/gcc/ada gcc-4.6.0/gcc/go gcc-4.6.0/gcc/java gcc-4.6.0/gcc/objc gcc-4.6.0/gcc/objcp gcc-4.6.0/gcc/testsuite gcc-4.6.0/gnattools gcc-4.6.0/libada gcc-4.6.0/libffi gcc-4.6.0/libgo gcc-4.6.0/libjava gcc-4.6.0/libobjc
}
pushd "$DIR" > /dev/null
if [ ! -d tarballs ]; then
mkdir tarballs
fi
pushd tarballs > /dev/null
$INFO "wget" "Pulling source pakcages..."
#grab "gcc" "http://gcc.petsads.us/releases/gcc-4.6.0/gcc-4.6.0.tar.gz"
#grab "mpc" "http://www.multiprecision.org/mpc/download/mpc-0.9.tar.gz"
#grab "mpfr" "http://www.mpfr.org/mpfr-3.0.1/mpfr-3.0.1.tar.gz"
#grab "gmp" "ftp://ftp.gmplib.org/pub/gmp-5.0.1/gmp-5.0.1.tar.gz"
$INFO "wget" "Pulled source packages."
$INFO "tar" "Decompressing..."
#deco "gcc" "gcc-4.6.0.tar.gz"
#deco "mpc" "mpc-0.9.tar.gz"
#deco "mpfr" "mpfr-3.0.1.tar.gz"
#deco "gmp" "gmp-5.0.1.tar.gz"
$INFO "tar" "Decompressed source packages."
$INFO "patch" "Patching..."
#patc "gcc" "gcc-4.6.0"
#patc "mpc" "mpc-0.9"
#patc "mpfr" "mpfr-3.0.1"
#patc "gmp" "gmp-5.0.1"
$INFO "patch" "Patched third-party software."
popd > /dev/null
popd > /dev/null

View File

@ -0,0 +1,82 @@
diff -rupN original/config.sub new/config.sub
--- original/config.sub 2010-05-25 08:22:07.000000000 -0500
+++ new/config.sub 2011-04-24 19:55:22.000000000 -0500
@@ -1298,6 +1298,7 @@ case $os in
| -sym* | -kopensolaris* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* | -aros* \
+ | -toaru* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
diff -rupN original/gcc/config/toaru.h new/gcc/config/toaru.h
--- original/gcc/config/toaru.h 1969-12-31 18:00:00.000000000 -0600
+++ new/gcc/config/toaru.h 2011-04-24 19:51:58.000000000 -0500
@@ -0,0 +1,11 @@
+#undef TARGET_OS_CPP_BUILTINS
+#define TARGET_OS_CPP_BUILTINS() \
+ do { \
+ builtin_define_std ("toaru"); \
+ builtin_define_std ("unix"); \
+ builtin_assert ("system=toaru"); \
+ builtin_assert ("system=unix"); \
+ } while (0);
+
+#undef TARGET_VERSION
+#define TARGET_VERSION fprintf(stderr, " (i386 toaru)");
diff -rupN original/gcc/config.gcc new/gcc/config.gcc
--- original/gcc/config.gcc 2011-03-14 01:05:29.000000000 -0500
+++ new/gcc/config.gcc 2011-04-24 20:04:11.000000000 -0500
@@ -694,6 +694,12 @@ case ${target} in
*) echo 'Unknown thread configuration for VxWorks'; exit 1 ;;
esac
;;
+*-*-toaru*)
+ extra_parts="crtbegin.o crtend.o"
+ gas=yes
+ gnu_ld=yes
+ default_use_cxa_atexit=yes
+ ;;
*-*-elf)
# Assume that newlib is being used and so __cxa_atexit is provided.
default_use_cxa_atexit=yes
@@ -1190,6 +1196,11 @@ hppa[12]*-*-hpux11*)
dwarf2=no
fi
;;
+i[34567]86-*-toaru*)
+ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h toaru.h"
+ tmake_file="${tmake_file} i386/t-i386elf t-svr4"
+ use_fixproto=yes
+ ;;
i[34567]86-*-darwin*)
need_64bit_hwint=yes
need_64bit_isa=yes
diff -rupN original/libgcc/config.host new/libgcc/config.host
--- original/libgcc/config.host 2011-03-14 01:06:23.000000000 -0500
+++ new/libgcc/config.host 2011-04-24 20:00:50.000000000 -0500
@@ -345,6 +345,8 @@ x86_64-*-mingw*)
;;
i[34567]86-*-interix3*)
;;
+i[34567]86-*-toaru*)
+ ;;
ia64*-*-elf*)
extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
tmake_file="ia64/t-ia64"
diff -rupN original/libstdc++-v3/crossconfig.m4 new/libstdc++-v3/crossconfig.m4
--- original/libstdc++-v3/crossconfig.m4 2011-02-04 01:26:57.000000000 -0600
+++ new/libstdc++-v3/crossconfig.m4 2011-04-24 19:56:16.000000000 -0500
@@ -249,6 +249,12 @@ case "${host}" in
AC_DEFINE(HAVE_ISNANL)
fi
;;
+ *-toaru*)
+ AC_CHECK_HEADERS([sys/types.h local.h float.h])
+ GLIBCXX_CHECK_BUILTIN_MATH_SUPPORT
+ GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
+ GLIBCXX_CHECK_STDLIB_SUPPORT
+ ;;
*-vxworks)
AC_DEFINE(HAVE_ACOSF)
AC_DEFINE(HAVE_ASINF)

View File

@ -0,0 +1,11 @@
diff -rupN original/configfsf.sub new/configfsf.sub
--- original/configfsf.sub 2010-02-06 06:43:13.000000000 -0600
+++ new/configfsf.sub 2012-04-23 16:18:31.000000000 -0500
@@ -1252,6 +1252,7 @@ case $os in
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* \
+ | -toaru* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \

View File

@ -0,0 +1,11 @@
diff -rupN original/config.sub new/config.sub
--- original/config.sub 2011-01-18 07:09:45.000000000 -0600
+++ new/config.sub 2012-04-23 18:49:45.000000000 -0500
@@ -1290,6 +1290,7 @@ case $os in
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -toaru* \
| -aos* | -aros* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \

View File

@ -0,0 +1,11 @@
diff -rupN original/config.sub new/config.sub
--- original/config.sub 2011-04-04 05:19:46.000000000 -0500
+++ new/config.sub 2012-04-23 18:46:38.000000000 -0500
@@ -1291,6 +1291,7 @@ case $os in
| -sym* | -kopensolaris* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* | -aros* \
+ | -toaru* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \