Drastic toolchain changes
The build process has been completely restructured to use sysroots.
This commit is contained in:
parent
bd283b1a6d
commit
b5fa96e376
@ -4,5 +4,5 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
. $DIR/config.sh
|
||||
|
||||
export PATH="$DIR/local/bin:$PATH"
|
||||
export PKG_CONFIG_LIBDIR="$PREFIX/$TARGET/lib/pkgconfig"
|
||||
export TOOLCHAIN="$PREFIX/$TARGET"
|
||||
export PKG_CONFIG_LIBDIR="$TOARU_SYSROOT/usr/lib/pkgconfig"
|
||||
export TOOLCHAIN="$TOARU_SYSROOT/usr"
|
||||
|
@ -2,5 +2,15 @@
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
# PREFIX is the cross-compiler tools prefix
|
||||
PREFIX=$DIR/local
|
||||
|
||||
# TARGET is the platform triplet
|
||||
TARGET=i686-pc-toaru
|
||||
|
||||
# TOARU_SYSROOT is the system root, which is equivalent to the hard disk
|
||||
TOARU_SYSROOT=`readlink -f $DIR/../hdd`
|
||||
|
||||
# VIRTPREFIX is where we put stuff from the perspective of the target system
|
||||
# since most build scripts will default to /usr/local and we want just /usr...
|
||||
VIRTPREFIX=/usr
|
||||
|
@ -19,7 +19,7 @@ GCC=gcc-$GCCV
|
||||
BINUTILS=binutils-2.22
|
||||
|
||||
VIRTPREFIX=/usr
|
||||
REALPREFIX=$DIR/../hdd
|
||||
REALPREFIX=$TOARU_SYSROOT
|
||||
|
||||
if [ ! -d tarballs/$GCC/mpfr ]; then
|
||||
mv tarballs/$MPFR tarballs/$GCC/mpfr
|
||||
@ -33,6 +33,8 @@ fi
|
||||
|
||||
# Actual build process
|
||||
|
||||
echo "Building GCC for native installation targetting $TARGET, installed into $TOARU_SYSROOT$VIRTPREFIX"
|
||||
|
||||
pushd build || bail
|
||||
if [ -d binutils-native ]; then
|
||||
rm -rf binutils-native
|
||||
@ -43,27 +45,27 @@ pushd build || bail
|
||||
make || bail
|
||||
make DESTDIR=$REALPREFIX install || bail
|
||||
popd
|
||||
if [ -d gcc-native ]; then
|
||||
rm -rf gcc-native
|
||||
fi
|
||||
mkdir gcc-native
|
||||
pushd gcc-native || bail
|
||||
make distclean
|
||||
$DIR/tarballs/$GCC/configure --prefix=$VIRTPREFIX --host=$TARGET --target=$TARGET --disable-nls --enable-languages=c,c++ --disable-libssp --with-newlib || bail
|
||||
make all-gcc || bail
|
||||
make DESTDIR=$REALPREFIX install-gcc || bail
|
||||
make all-target-libgcc || bail
|
||||
make DESTDIR=$REALPREFIX install-target-libgcc || bail
|
||||
touch $PREFIX/$TARGET/include/fenv.h
|
||||
make all-target-libstdc++-v3 || bail
|
||||
make DESTDIR=$REALPREFIX install-target-libstdc++-v3 || bail
|
||||
popd
|
||||
#if [ -d gcc-native ]; then
|
||||
# rm -rf gcc-native
|
||||
#fi
|
||||
#mkdir gcc-native
|
||||
#pushd gcc-native || bail
|
||||
# make distclean
|
||||
# $DIR/tarballs/$GCC/configure --prefix=$VIRTPREFIX --host=$TARGET --target=$TARGET --disable-nls --enable-languages=c,c++ --disable-libssp --with-newlib || bail
|
||||
# make DESTDIR=$REALPREFIX all-gcc || bail
|
||||
# make DESTDIR=$REALPREFIX install-gcc || bail
|
||||
# make DESTDIR=$REALPREFIX all-target-libgcc || bail
|
||||
# make DESTDIR=$REALPREFIX install-target-libgcc || bail
|
||||
# touch $TOARU_SYSROOT/usr/include/fenv.h
|
||||
# make DESTDIR=$REALPREFIX all-target-libstdc++-v3 || bail
|
||||
# make DESTDIR=$REALPREFIX install-target-libstdc++-v3 || bail
|
||||
#popd
|
||||
|
||||
TMP_INCFIX=$REALPREFIX$VIRTPREFIX/lib/gcc/$TARGET/$GCCV/include-fixed
|
||||
#TMP_INCFIX=$REALPREFIX$VIRTPREFIX/lib/gcc/$TARGET/$GCCV/include-fixed
|
||||
|
||||
if [ -d $TMP_INCFIX ]; then
|
||||
rm -r "$TMP_INCFIX"
|
||||
fi
|
||||
#if [ -d $TMP_INCFIX ]; then
|
||||
# rm -r "$TMP_INCFIX"
|
||||
#fi
|
||||
|
||||
pushd $REALPREFIX$VIRTPREFIX/bin || bail
|
||||
$TARGET-strip *
|
||||
|
@ -1,124 +0,0 @@
|
||||
#!/bin/bash
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
. $DIR/config.sh
|
||||
. $DIR/util.sh
|
||||
. $DIR/activate.sh
|
||||
|
||||
# Just in case
|
||||
pushd $DIR
|
||||
|
||||
VIRTPREFIX=/usr
|
||||
REALPREFIX=$DIR/../hdd
|
||||
|
||||
pushd build
|
||||
if [ ! -d newlib-native ]; then
|
||||
mkdir newlib-native
|
||||
else
|
||||
# TOUCHY TOUCHY
|
||||
rm -r newlib-native
|
||||
mkdir newlib-native
|
||||
fi
|
||||
pushd $DIR/tarballs/newlib-1.19.0/newlib/libc/sys
|
||||
autoconf || bail
|
||||
pushd toaru
|
||||
autoreconf || bail
|
||||
yasm -f elf -o crt0.o crt0.s || bail
|
||||
yasm -f elf -o crti.o crti.s || bail
|
||||
yasm -f elf -o crtn.o crtn.s || bail
|
||||
cp crt0.o ../
|
||||
cp crt0.o /tmp/__toaru_crt0.o
|
||||
cp crti.o ../
|
||||
cp crti.o /tmp/__toaru_crti.o
|
||||
cp crtn.o ../
|
||||
cp crtn.o /tmp/__toaru_crtn.o
|
||||
popd
|
||||
popd
|
||||
pushd newlib-native
|
||||
mkdir -p $TARGET/newlib/libc/sys
|
||||
cp /tmp/__toaru_crt0.o $TARGET/newlib/libc/sys/crt0.o
|
||||
rm /tmp/__toaru_crt0.o
|
||||
cp /tmp/__toaru_crti.o $TARGET/newlib/libc/sys/crti.o
|
||||
rm /tmp/__toaru_crti.o
|
||||
cp /tmp/__toaru_crtn.o $TARGET/newlib/libc/sys/crtn.o
|
||||
rm /tmp/__toaru_crtn.o
|
||||
echo "" > $DIR/tarballs/newlib-1.19.0/newlib/libc/stdlib/malign.c
|
||||
$DIR/tarballs/newlib-1.19.0/configure --target=$TARGET --prefix=$VIRTPREFIX || bail
|
||||
make || bail
|
||||
make DESTDIR=$REALPREFIX install || bail
|
||||
cp -r $DIR/patches/newlib/include/* $REALPREFIX/$VIRTPREFIX/include/
|
||||
cp $TARGET/newlib/libc/sys/crt0.o $REALPREFIX/$VIRTPREFIX/lib/
|
||||
cp $TARGET/newlib/libc/sys/crti.o $REALPREFIX/$VIRTPREFIX/lib/
|
||||
cp $TARGET/newlib/libc/sys/crtn.o $REALPREFIX/$VIRTPREFIX/lib/
|
||||
popd
|
||||
if [ ! -d freetype-native ]; then
|
||||
mkdir freetype-native
|
||||
fi
|
||||
pushd freetype-native
|
||||
$DIR/tarballs/freetype-2.4.9/configure --host=$TARGET --prefix=$VIRTPREFIX || bail
|
||||
make || bail
|
||||
make DESTDIR=$REALPREFIX install || bail
|
||||
popd
|
||||
# XXX zlib can not be built in a separate directory
|
||||
pushd $DIR/tarballs/zlib*
|
||||
make distclean
|
||||
CC=i686-pc-toaru-gcc ./configure --static --prefix=$VIRTPREFIX || bail
|
||||
make || bail
|
||||
make DESTDIR=$REALPREFIX install || bail
|
||||
popd
|
||||
if [ ! -d libpng-native ]; then
|
||||
mkdir libpng-native
|
||||
fi
|
||||
pushd libpng-native
|
||||
$DIR/tarballs/libpng-1.5.13/configure --host=$TARGET --prefix=$VIRTPREFIX || bail
|
||||
make || bail
|
||||
make DESTDIR=$REALPREFIX install || bail
|
||||
popd
|
||||
if [ ! -d pixman-native ]; then
|
||||
mkdir pixman-native
|
||||
fi
|
||||
pushd pixman-native
|
||||
$DIR/tarballs/pixman-0.26.2/configure --host=$TARGET --prefix=$VIRTPREFIX || bail
|
||||
make || bail
|
||||
make DESTDIR=$REALPREFIX install || bail
|
||||
popd
|
||||
if [ ! -d cairo-native ]; then
|
||||
mkdir cairo-native
|
||||
fi
|
||||
pushd cairo-native
|
||||
$DIR/tarballs/cairo-1.12.2/configure --host=$TARGET --prefix=$VIRTPREFIX --enable-ps=no --enable-pdf=no --enable-interpreter=no --enable-xlib=no || bail
|
||||
cp $DIR/patches/cairo-Makefile test/Makefile
|
||||
cp $DIR/patches/cairo-Makefile perf/Makefile
|
||||
echo -e "\n\n#define CAIRO_NO_MUTEX 1" >> config.h
|
||||
make || bail
|
||||
make DESTDIR=$REALPREFIX install || bail
|
||||
popd
|
||||
# XXX Mesa can not be built from a separate directory (configure script doesn't provide a Makefile)
|
||||
pushd $DIR/tarballs/Mesa-*
|
||||
make distclean
|
||||
./configure --enable-32-bit --host=$TARGET --prefix=$VIRTPREFIX --with-osmesa-bits=8 --with-driver=osmesa --disable-egl --disable-shared --without-x --disable-glw --disable-glut --disable-driglx-direct --disable-gallium || bail
|
||||
make || bail
|
||||
make DESTDIR=$REALPREFIX install || bail
|
||||
popd
|
||||
if [ ! -d ncurses-native ]; then
|
||||
mkdir ncurses-native
|
||||
fi
|
||||
pushd ncurses-native
|
||||
$DIR/tarballs/ncurses-5.9/configure --prefix=$VIRTPREFIX --host=$TARGET --with-terminfo-dirs=/usr/share/terminfo --with-default-terminfo-dir=/usr/share/terminfo --without-tests || bail
|
||||
make || bail
|
||||
make DESTDIR=$REALPREFIX install || bail
|
||||
cp $DIR/../util/toaru.tic $REALPREFIX/$VIRTPREFIX/share/terminfo/t/toaru
|
||||
cp $DIR/../util/toaru-vga.tic $REALPREFIX/$VIRTPREFIX/share/terminfo/t/toaru-vga
|
||||
popd
|
||||
pushd $DIR/tarballs/vim73
|
||||
make distclean
|
||||
ac_cv_sizeof_int=4 vim_cv_getcwd_broken=no vim_cv_memmove_handles_overlap=yes vim_cv_stat_ignores_slash=no vim_cv_tgetent=zero vim_cv_terminfo=yes vim_cv_toupper_broken=no vim_cv_tty_group=world ./configure --host=$TARGET --target=$TARGET --prefix=$VIRTPREFIX --with-tlib=ncurses --enable-gui=no --disable-gtktest --disable-xim --with-features=normal --disable-gpm --without-x --disable-netbeans --enable-multibyte
|
||||
make || bail
|
||||
make DESTDIR=$REALPREFIX install || bail
|
||||
popd
|
||||
|
||||
pushd $REALPREFIX$VIRTPREFIX/bin || bail
|
||||
$TARGET-strip *
|
||||
popd
|
||||
|
||||
popd
|
@ -4,127 +4,219 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
. $DIR/config.sh
|
||||
. $DIR/util.sh
|
||||
|
||||
# Build everything by default.
|
||||
BUILD_BINUTILS=true
|
||||
BUILD_GCC=true
|
||||
BUILD_NEWLIB=true
|
||||
BUILD_LIBSTDCPP=true
|
||||
BUILD_ZLIB=true
|
||||
BUILD_FREETYPE=true
|
||||
BUILD_PNG=true
|
||||
BUILD_PIXMAN=true
|
||||
BUILD_CAIRO=true
|
||||
BUILD_MESA=true
|
||||
BUILD_NCURSES=true
|
||||
BUILD_VIM=true
|
||||
|
||||
#BUILD_BINUTILS=false
|
||||
#BUILD_GCC=false
|
||||
#BUILD_NEWLIB=false
|
||||
#BUILD_LIBSTDCPP=false
|
||||
#BUILD_ZLIB=false
|
||||
#BUILD_FREETYPE=false
|
||||
#BUILD_PNG=false
|
||||
#BUILD_PIXMAN=false
|
||||
#BUILD_CAIRO=false
|
||||
#BUILD_MESA=false
|
||||
#BUILD_NCURSES=false
|
||||
#BUILD_VIM=false
|
||||
|
||||
echo "Building a toolchain with a sysroot of $TOARU_SYSROOT with host binaries in $PREFIX targeting $TARGET"
|
||||
|
||||
if [ ! -d build ]; then
|
||||
mkdir build
|
||||
fi
|
||||
|
||||
pushd build
|
||||
if [ ! -d binutils ]; then
|
||||
mkdir binutils
|
||||
fi
|
||||
pushd binutils
|
||||
$DIR/tarballs/binutils-2.22/configure --target=$TARGET --prefix=$PREFIX --disable-werror || bail
|
||||
make || bail
|
||||
make install || bail
|
||||
popd
|
||||
export PATH=$PATH:$PREFIX/bin
|
||||
if [ ! -d gcc ]; then
|
||||
mkdir gcc
|
||||
fi
|
||||
pushd gcc
|
||||
$DIR/tarballs/gcc-4.6.4/configure --target=$TARGET --prefix=$PREFIX --disable-nls --enable-languages=c,c++ --disable-libssp --with-newlib || bail
|
||||
make all-gcc || bail
|
||||
make install-gcc || bail
|
||||
make all-target-libgcc || bail
|
||||
make install-target-libgcc || bail
|
||||
popd
|
||||
if [ ! -d newlib ]; then
|
||||
mkdir newlib
|
||||
else
|
||||
# Newlib is touchy about reconfigures
|
||||
rm -r newlib
|
||||
mkdir newlib
|
||||
fi
|
||||
pushd $DIR/tarballs/newlib-1.19.0
|
||||
find -type f -exec sed 's|--cygnus||g;s|cygnus||g' -i {} + || bail
|
||||
popd
|
||||
pushd $DIR/tarballs/newlib-1.19.0/newlib/libc/sys
|
||||
autoconf || bail
|
||||
pushd toaru
|
||||
touch INSTALL NEWS README AUTHORS ChangeLog COPYING || bail
|
||||
autoreconf || bail
|
||||
yasm -f elf -o crt0.o crt0.s || bail
|
||||
yasm -f elf -o crti.o crti.s || bail
|
||||
yasm -f elf -o crtn.o crtn.s || bail
|
||||
cp crt0.o ../
|
||||
cp crt0.o /tmp/__toaru_crt0.o
|
||||
cp crti.o ../
|
||||
cp crti.o /tmp/__toaru_crti.o
|
||||
cp crtn.o ../
|
||||
cp crtn.o /tmp/__toaru_crtn.o
|
||||
if $BUILD_BINUTILS; then
|
||||
if [ ! -d binutils ]; then
|
||||
mkdir binutils
|
||||
fi
|
||||
|
||||
unset PKG_CONFIG_LIBDIR
|
||||
|
||||
pushd binutils
|
||||
$DIR/tarballs/binutils-2.22/configure --target=$TARGET --prefix=$PREFIX --with-sysroot=$TOARU_SYSROOT --disable-werror || bail
|
||||
make || bail
|
||||
make install || bail
|
||||
popd
|
||||
popd
|
||||
pushd newlib
|
||||
mkdir -p $TARGET/newlib/libc/sys
|
||||
cp /tmp/__toaru_crt0.o $TARGET/newlib/libc/sys/crt0.o
|
||||
rm /tmp/__toaru_crt0.o
|
||||
cp /tmp/__toaru_crti.o $TARGET/newlib/libc/sys/crti.o
|
||||
rm /tmp/__toaru_crti.o
|
||||
cp /tmp/__toaru_crtn.o $TARGET/newlib/libc/sys/crtn.o
|
||||
rm /tmp/__toaru_crtn.o
|
||||
echo "" > $DIR/tarballs/newlib-1.19.0/newlib/libc/stdlib/malign.c
|
||||
$DIR/tarballs/newlib-1.19.0/configure --target=$TARGET --prefix=$PREFIX || bail
|
||||
make || bail
|
||||
make install || bail
|
||||
cp -r $DIR/patches/newlib/include/* $PREFIX/$TARGET/include/
|
||||
cp $TARGET/newlib/libc/sys/crt*.o $PREFIX/$TARGET/lib/
|
||||
popd
|
||||
pushd gcc
|
||||
# build libstdc++
|
||||
make all-target-libstdc++-v3 || bail
|
||||
make install-target-libstdc++-v3 || bail
|
||||
popd
|
||||
# Source the activate script, which will enable pkg-config stuff
|
||||
fi
|
||||
|
||||
if $BUILD_GCC; then
|
||||
if [ -d gcc ]; then
|
||||
rm -rf gcc
|
||||
fi
|
||||
mkdir gcc
|
||||
|
||||
unset PKG_CONFIG_LIBDIR
|
||||
|
||||
pushd gcc
|
||||
$DIR/tarballs/gcc-4.6.4/configure --target=$TARGET --prefix=$PREFIX --with-sysroot=$TOARU_SYSROOT --with-build-sysroot=$TOARU_SYSROOT --with-native-system-header-dir=$TOARU_SYSROOT --disable-nls --enable-languages=c,c++ --disable-libssp --with-newlib || bail
|
||||
make all-gcc || bail
|
||||
make install-gcc || bail
|
||||
make all-target-libgcc || bail
|
||||
make install-target-libgcc || bail
|
||||
popd
|
||||
fi
|
||||
|
||||
. $DIR/activate.sh
|
||||
if [ ! -d freetype ]; then
|
||||
mkdir freetype
|
||||
|
||||
if $BUILD_NEWLIB; then
|
||||
if [ ! -d newlib ]; then
|
||||
mkdir newlib
|
||||
else
|
||||
# Newlib is touchy about reconfigures
|
||||
rm -r newlib
|
||||
mkdir newlib
|
||||
fi
|
||||
pushd $DIR/tarballs/newlib-1.19.0
|
||||
find -type f -exec sed 's|--cygnus||g;s|cygnus||g' -i {} + || bail
|
||||
popd
|
||||
pushd $DIR/tarballs/newlib-1.19.0/newlib/libc/sys
|
||||
autoconf || bail
|
||||
pushd toaru
|
||||
touch INSTALL NEWS README AUTHORS ChangeLog COPYING || bail
|
||||
autoreconf || bail
|
||||
yasm -f elf -o crt0.o crt0.s || bail
|
||||
yasm -f elf -o crti.o crti.s || bail
|
||||
yasm -f elf -o crtn.o crtn.s || bail
|
||||
cp crt0.o ../
|
||||
cp crt0.o /tmp/__toaru_crt0.o
|
||||
cp crti.o ../
|
||||
cp crti.o /tmp/__toaru_crti.o
|
||||
cp crtn.o ../
|
||||
cp crtn.o /tmp/__toaru_crtn.o
|
||||
popd
|
||||
popd
|
||||
pushd newlib
|
||||
mkdir -p $TARGET/newlib/libc/sys
|
||||
cp /tmp/__toaru_crt0.o $TARGET/newlib/libc/sys/crt0.o
|
||||
rm /tmp/__toaru_crt0.o
|
||||
cp /tmp/__toaru_crti.o $TARGET/newlib/libc/sys/crti.o
|
||||
rm /tmp/__toaru_crti.o
|
||||
cp /tmp/__toaru_crtn.o $TARGET/newlib/libc/sys/crtn.o
|
||||
rm /tmp/__toaru_crtn.o
|
||||
echo "" > $DIR/tarballs/newlib-1.19.0/newlib/libc/stdlib/malign.c
|
||||
$DIR/tarballs/newlib-1.19.0/configure --target=$TARGET --prefix=$VIRTPREFIX || bail
|
||||
# Fix the damned tooldir
|
||||
sed -s 's/prefix}\/i686-pc-toaru/prefix}/' Makefile > Makefile.tmp
|
||||
mv Makefile.tmp Makefile
|
||||
make || bail
|
||||
make DESTDIR=$TOARU_SYSROOT install || bail
|
||||
cp -r $DIR/patches/newlib/include/* $TOARU_SYSROOT/$VIRTPREFIX/include/
|
||||
cp $TARGET/newlib/libc/sys/crt0.o $TOARU_SYSROOT/$VIRTPREFIX/lib/
|
||||
cp $TARGET/newlib/libc/sys/crti.o $TOARU_SYSROOT/$VIRTPREFIX/lib/
|
||||
cp $TARGET/newlib/libc/sys/crtn.o $TOARU_SYSROOT/$VIRTPREFIX/lib/
|
||||
popd
|
||||
fi
|
||||
pushd freetype
|
||||
$DIR/tarballs/freetype-2.4.9/configure --host=$TARGET --prefix=$PREFIX/$TARGET || bail
|
||||
make || bail
|
||||
make install || bail
|
||||
popd
|
||||
# XXX zlib can not be built in a separate directory
|
||||
pushd $DIR/tarballs/zlib*
|
||||
CC=i686-pc-toaru-gcc ./configure --static --prefix=$PREFIX/$TARGET || bail
|
||||
make || bail
|
||||
make install || bail
|
||||
popd
|
||||
if [ ! -d libpng ]; then
|
||||
mkdir libpng
|
||||
|
||||
if $BUILD_LIBSTDCPP; then
|
||||
pushd gcc
|
||||
# build libstdc++
|
||||
make all-target-libstdc++-v3 || bail
|
||||
make install-target-libstdc++-v3 || bail
|
||||
popd
|
||||
fi
|
||||
pushd libpng
|
||||
$DIR/tarballs/libpng-1.5.13/configure --host=$TARGET --prefix=$PREFIX/$TARGET || bail
|
||||
make || bail
|
||||
make install || bail
|
||||
popd
|
||||
if [ ! -d pixman ]; then
|
||||
mkdir pixman
|
||||
|
||||
if $BUILD_FREETYPE; then
|
||||
if [ ! -d freetype ]; then
|
||||
mkdir freetype
|
||||
fi
|
||||
pushd freetype
|
||||
$DIR/tarballs/freetype-2.4.9/configure --host=$TARGET --prefix=$VIRTPREFIX || bail
|
||||
make || bail
|
||||
make DESTDIR=$TOARU_SYSROOT install || bail
|
||||
popd
|
||||
fi
|
||||
pushd pixman
|
||||
$DIR/tarballs/pixman-0.26.2/configure --host=$TARGET --prefix=$PREFIX/$TARGET || bail
|
||||
make || bail
|
||||
make install || bail
|
||||
popd
|
||||
if [ ! -d cairo ]; then
|
||||
mkdir cairo
|
||||
|
||||
if $BUILD_ZLIB; then
|
||||
# XXX zlib can not be built in a separate directory
|
||||
pushd $DIR/tarballs/zlib*
|
||||
CC=i686-pc-toaru-gcc ./configure --static --prefix=$PREFIX/$TARGET || bail
|
||||
make || bail
|
||||
make DESTDIR=$TOARU_SYSROOT install || bail
|
||||
popd
|
||||
fi
|
||||
pushd cairo
|
||||
$DIR/tarballs/cairo-1.12.2/configure --host=$TARGET --prefix=$PREFIX/$TARGET --enable-ps=no --enable-pdf=no --enable-interpreter=no --enable-xlib=no || bail
|
||||
cp $DIR/patches/cairo-Makefile test/Makefile
|
||||
cp $DIR/patches/cairo-Makefile perf/Makefile
|
||||
echo -e "\n\n#define CAIRO_NO_MUTEX 1" >> config.h
|
||||
make || bail
|
||||
make install || bail
|
||||
popd
|
||||
# XXX Mesa can not be built from a separate directory (configure script doesn't provide a Makefile)
|
||||
pushd $DIR/tarballs/Mesa-*
|
||||
./configure --enable-32-bit --host=$TARGET --prefix=$PREFIX/$TARGET --with-osmesa-bits=8 --with-driver=osmesa --disable-egl --disable-shared --without-x --disable-glw --disable-glut --disable-driglx-direct --disable-gallium || bail
|
||||
make || bail
|
||||
make install || bail
|
||||
popd
|
||||
if [ ! -d ncurses ]; then
|
||||
mkdir ncurses
|
||||
|
||||
if $BUILD_PNG; then
|
||||
if [ ! -d libpng ]; then
|
||||
mkdir libpng
|
||||
fi
|
||||
pushd libpng
|
||||
$DIR/tarballs/libpng-1.5.13/configure --host=$TARGET --prefix=$VIRTPREFIX || bail
|
||||
make || bail
|
||||
make DESTDIR=$TOARU_SYSROOT install || bail
|
||||
popd
|
||||
fi
|
||||
pushd ncurses
|
||||
$DIR/tarballs/ncurses-5.9/configure --prefix=$PREFIX/$TARGET --host=$TARGET --with-terminfo-dirs=/usr/share/terminfo --with-default-terminfo-dir=/usr/share/terminfo --without-tests || bail
|
||||
make || bail
|
||||
make install || bail
|
||||
|
||||
if $BUILD_PIXMAN; then
|
||||
if [ ! -d pixman ]; then
|
||||
mkdir pixman
|
||||
fi
|
||||
pushd pixman
|
||||
$DIR/tarballs/pixman-0.26.2/configure --host=$TARGET --prefix=$VIRTPREFIX || bail
|
||||
make || bail
|
||||
make DESTDIR=$TOARU_SYSROOT install || bail
|
||||
popd
|
||||
fi
|
||||
|
||||
if $BUILD_CAIRO; then
|
||||
if [ ! -d cairo ]; then
|
||||
mkdir cairo
|
||||
fi
|
||||
pushd cairo
|
||||
$DIR/tarballs/cairo-1.12.2/configure --host=$TARGET --prefix=$VIRTPREFIX --enable-ps=no --enable-pdf=no --enable-interpreter=no --enable-xlib=no || bail
|
||||
cp $DIR/patches/cairo-Makefile test/Makefile
|
||||
cp $DIR/patches/cairo-Makefile perf/Makefile
|
||||
echo -e "\n\n#define CAIRO_NO_MUTEX 1" >> config.h
|
||||
make || bail
|
||||
make DESTDIR=$TOARU_SYSROOT install || bail
|
||||
popd
|
||||
fi
|
||||
|
||||
if $BUILD_MESA; then
|
||||
# XXX Mesa can not be built from a separate directory (configure script doesn't provide a Makefile)
|
||||
pushd $DIR/tarballs/Mesa-*
|
||||
./configure --enable-32-bit --host=$TARGET --prefix=$VIRTPREFIX --with-osmesa-bits=8 --with-driver=osmesa --disable-egl --disable-shared --without-x --disable-glw --disable-glut --disable-driglx-direct --disable-gallium || bail
|
||||
make || bail
|
||||
make DESTDIR=$TOARU_SYSROOT install || bail
|
||||
popd
|
||||
fi
|
||||
|
||||
if $BUILD_NCURSES; then
|
||||
if [ ! -d ncurses ]; then
|
||||
mkdir ncurses
|
||||
fi
|
||||
pushd ncurses
|
||||
$DIR/tarballs/ncurses-5.9/configure --prefix=$VIRTPREFIX --host=$TARGET --with-terminfo-dirs=/usr/share/terminfo --with-default-terminfo-dir=/usr/share/terminfo --without-tests || bail
|
||||
make || bail
|
||||
make DESTDIR=$TOARU_SYSROOT install || bail
|
||||
cp $DIR/../util/toaru.tic $TOARU_SYSROOT/$VIRTPREFIX/share/terminfo/t/toaru
|
||||
cp $DIR/../util/toaru-vga.tic $TOARU_SYSROOT/$VIRTPREFIX/share/terminfo/t/toaru-vga
|
||||
popd
|
||||
fi
|
||||
|
||||
if $BUILD_VIM; then
|
||||
pushd $DIR/tarballs/vim73
|
||||
make distclean
|
||||
ac_cv_sizeof_int=4 vim_cv_getcwd_broken=no vim_cv_memmove_handles_overlap=yes vim_cv_stat_ignores_slash=no vim_cv_tgetent=zero vim_cv_terminfo=yes vim_cv_toupper_broken=no vim_cv_tty_group=world ./configure --host=$TARGET --target=$TARGET --with-sysroot=$TOARU_SYSROOT --prefix=$VIRTPREFIX --with-tlib=ncurses --enable-gui=no --disable-gtktest --disable-xim --with-features=normal --disable-gpm --without-x --disable-netbeans --enable-multibyte
|
||||
make || bail
|
||||
make DESTDIR=$TOARU_SYSROOT install || bail
|
||||
popd
|
||||
fi
|
||||
|
||||
pushd $TOARU_SYSROOT/usr/bin || bail
|
||||
$TARGET-strip *
|
||||
popd
|
||||
|
||||
popd
|
||||
|
@ -1,34 +0,0 @@
|
||||
#!/bin/bash
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
. $DIR/config.sh
|
||||
. $DIR/util.sh
|
||||
. $DIR/activate.sh
|
||||
|
||||
VIRTPREFIX=/usr
|
||||
REALPREFIX=$DIR/../hdd
|
||||
|
||||
pushd tarballs > /dev/null
|
||||
rm -r "ncurses-5.9"
|
||||
deco "ncurses" "ncurses-5.9.tar.gz"
|
||||
patc "ncurses" "ncurses-5.9"
|
||||
popd > /dev/null
|
||||
|
||||
pushd build
|
||||
|
||||
if [ ! -d ncurses-native ]; then
|
||||
mkdir ncurses-native
|
||||
fi
|
||||
pushd ncurses-native
|
||||
$DIR/tarballs/ncurses-5.9/configure --prefix=$VIRTPREFIX --host=$TARGET --with-terminfo-dirs=/usr/share/terminfo --with-default-terminfo-dir=/usr/share/terminfo --without-tests || bail
|
||||
make || bail
|
||||
make DESTDIR=$REALPREFIX install || bail
|
||||
cp $DIR/../util/toaru.tic $REALPREFIX/$VIRTPREFIX/share/terminfo/t/toaru
|
||||
cp $DIR/../util/toaru-vga.tic $REALPREFIX/$VIRTPREFIX/share/terminfo/t/toaru-vga
|
||||
popd
|
||||
|
||||
pushd $REALPREFIX$VIRTPREFIX/bin || bail
|
||||
$TARGET-strip *
|
||||
popd
|
||||
|
||||
popd
|
@ -1,55 +0,0 @@
|
||||
#!/bin/bash
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
. $DIR/config.sh
|
||||
. $DIR/util.sh
|
||||
|
||||
pushd tarballs > /dev/null
|
||||
rm -rf "newlib-1.19.0"
|
||||
deco "newlib" "newlib-1.19.0.tar.gz"
|
||||
patc "newlib" "newlib-1.19.0"
|
||||
installNewlibStuff "newlib-1.19.0"
|
||||
popd > /dev/null
|
||||
|
||||
pushd build
|
||||
if [ ! -d newlib ]; then
|
||||
mkdir newlib
|
||||
else
|
||||
rm -r newlib
|
||||
mkdir newlib
|
||||
fi
|
||||
pushd $DIR/tarballs/newlib-1.19.0
|
||||
find -type f -exec sed 's|--cygnus||g;s|cygnus||g' -i {} + || bail
|
||||
popd
|
||||
pushd $DIR/tarballs/newlib-1.19.0/newlib/libc/sys
|
||||
autoconf || bail
|
||||
pushd toaru
|
||||
touch INSTALL NEWS README AUTHORS ChangeLog COPYING || bail
|
||||
autoreconf || bail
|
||||
yasm -f elf -o crt0.o crt0.s || bail
|
||||
yasm -f elf -o crti.o crti.s || bail
|
||||
yasm -f elf -o crtn.o crtn.s || bail
|
||||
cp crt0.o ../
|
||||
cp crt0.o /tmp/__toaru_crt0.o
|
||||
cp crti.o ../
|
||||
cp crti.o /tmp/__toaru_crti.o
|
||||
cp crtn.o ../
|
||||
cp crtn.o /tmp/__toaru_crtn.o
|
||||
popd
|
||||
popd
|
||||
pushd newlib
|
||||
mkdir -p $TARGET/newlib/libc/sys
|
||||
cp /tmp/__toaru_crt0.o $TARGET/newlib/libc/sys/crt0.o
|
||||
rm /tmp/__toaru_crt0.o
|
||||
cp /tmp/__toaru_crti.o $TARGET/newlib/libc/sys/crti.o
|
||||
rm /tmp/__toaru_crti.o
|
||||
cp /tmp/__toaru_crtn.o $TARGET/newlib/libc/sys/crtn.o
|
||||
rm /tmp/__toaru_crtn.o
|
||||
echo "" > $DIR/tarballs/newlib-1.19.0/newlib/libc/stdlib/malign.c
|
||||
$DIR/tarballs/newlib-1.19.0/configure --target=$TARGET --prefix=$PREFIX || bail
|
||||
make || bail
|
||||
make install || bail
|
||||
cp -r $DIR/patches/newlib/include/* $PREFIX/$TARGET/include/
|
||||
cp $TARGET/newlib/libc/sys/crt*.o $PREFIX/$TARGET/lib/
|
||||
popd
|
||||
popd
|
@ -1,30 +0,0 @@
|
||||
#!/bin/bash
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
. $DIR/config.sh
|
||||
. $DIR/util.sh
|
||||
. $DIR/activate.sh
|
||||
|
||||
VIRTPREFIX=/usr
|
||||
REALPREFIX=$DIR/../hdd
|
||||
|
||||
pushd tarballs > /dev/null
|
||||
rm -rf "vim73"
|
||||
deco "vim" "vim-7.3.tar.bz2"
|
||||
patc "vim" "vim73"
|
||||
popd > /dev/null
|
||||
|
||||
pushd build
|
||||
|
||||
pushd $DIR/tarballs/vim73
|
||||
make distclean
|
||||
ac_cv_sizeof_int=4 vim_cv_getcwd_broken=no vim_cv_memmove_handles_overlap=yes vim_cv_stat_ignores_slash=no vim_cv_tgetent=zero vim_cv_terminfo=yes vim_cv_toupper_broken=no vim_cv_tty_group=world ./configure --host=$TARGET --target=$TARGET --prefix=$VIRTPREFIX --with-tlib=ncurses --enable-gui=no --disable-gtktest --disable-xim --with-features=normal --disable-gpm --without-x --disable-netbeans --enable-multibyte
|
||||
make || bail
|
||||
make DESTDIR=$REALPREFIX install || bail
|
||||
popd
|
||||
|
||||
pushd $REALPREFIX$VIRTPREFIX/bin || bail
|
||||
$TARGET-strip *
|
||||
popd
|
||||
|
||||
popd
|
Loading…
Reference in New Issue
Block a user