Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 286237 Details for
Bug 382725
crossdev fails to build powerpc64-unknown-linux-newlib during GCC stage 1
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
free60's build toolchain script
build-xenon-toolchain (text/plain), 7.70 KB, created by
Andrew Udvare
on 2011-09-12 17:33:09 UTC
(
hide
)
Description:
free60's build toolchain script
Filename:
MIME Type:
Creator:
Andrew Udvare
Created:
2011-09-12 17:33:09 UTC
Size:
7.70 KB
patch
obsolete
>#!/bin/bash > ># originally written by Uwe Hermann <uwe@hermann-uwe.de>, released as public domain. ># changed for xenon by Felix Domke <tmbinc@elitedvb.net>, still public domain > >TARGET=xenon >PREFIX=/usr/local/xenon # Install location of your final toolchain >PARALLEL="" # Or: PARALLEL="-j 2" > >BINUTILS_TAR=binutils-2.21.1a >BINUTILS=binutils-2.21.1 >GCC=gcc-4.6.1 >NEWLIB=newlib-1.17.0 >GDB=gdb-6.8 > >BUILD_BINUTILS=true >BUILD_GCC=true >BUILD_NEWLIB=true >BUILD_GCC_SECOND=true > ># path to the logfile >LOGFILE="`pwd`/build.log" > ># variables to check if we are running a debian distribution >LSBRELEASE="`lsb_release -a`" >SEARCH_UBUNTU="Ubuntu" >SEARCH_DEBIAN="Debian" >DEB=false > ># temp variables export >export PATH="$PATH:$PREFIX/bin" >export DEVKITXENON="/usr/local/xenon" >export PATH="$PATH:\$DEVKITXENON/bin:\$DEVKITXENON/usr/bin" > ># function to compile and install libxenon >function libxenon_install >{ > rm -rf free60 &>/dev/null > > #check if git is present to download and install libxenon > git &>/dev/null > RETVAL=$? > > if [ $RETVAL -eq 1 ]; then ># echo -e "Downloading libxenon..." ># git clone git://free60.git.sourceforge.net/gitroot/free60/free60 >> $LOGFILE 2>&1 > echo -e "Building libxenon..." > make -C ../libxenon/ports/xenon libxenon.a >> $LOGFILE 2>&1 || exit 0 > make -C ../libxenon/ports/xenon install >> $LOGFILE 2>&1 || exit 0 > cp ../devkitxenon/app.lds ../devkitxenon/rules $PREFIX/ > # startup crt fix > cp ../libxenon/startup/xenon/crt1.o /usr/local/xenon/xenon/lib/ > cp ../libxenon/ports/xenon/crti.o /usr/local/xenon/xenon/lib/ > cp ../libxenon/ports/xenon/crtn.o /usr/local/xenon/xenon/lib/ > echo > echo -e "libxenon installed successfully" > echo > else > echo > echo -e "git is needed to download libxenon, install it and run this script again with \"libxenon\" as argument" > echo -e "If you are running debian/ubuntu : sudo apt-get install git" > echo > fi >} > >function toolchain_install >{ > # Make working directory > echo -e "Creating final xenon toolchain directory: $PREFIX" > if [ ! -d $PREFIX ]; then > mkdir $PREFIX > chown -R `whoami`:`whoami` $PREFIX > fi; > > # Check if binutils sources are available, download it if needed > if [ ! -f "$BINUTILS.tar.bz2" ]; then > echo -e "Downloading $BINUTILS.tar.bz2" > wget -c http://ftp.gnu.org/gnu/binutils/$BINUTILS_TAR.tar.bz2 || exit 0 > fi; > > # Check if gcc sources are available, download it if needed > if [ ! -f "$GCC.tar.bz2" ]; then > echo -e "Downloading $GCC.tar.bz2" > wget -c ftp://ftp.gnu.org/gnu/gcc/$GCC/$GCC.tar.bz2 || exit 0 > fi; > > # Check if newlib sources are available, download it if needed > if [ ! -f "$NEWLIB.tar.gz" ]; then > echo -e "Downloading $NEWLIB.tar.gz" > wget -c ftp://sources.redhat.com/pub/newlib/$NEWLIB.tar.gz || exit 0 > fi; > > rm -rf build > > mkdir build > > if $BUILD_BINUTILS; then > echo -e "Extracting binutils..." > tar xfj $BINUTILS_TAR.tar.bz2 >> $LOGFILE 2>&1 && cat binutils.diff | patch -p0 >> $LOGFILE 2>&1 || exit 0 > cd build > echo -e "Configuring binutils..." > ../$BINUTILS/configure --target=$TARGET --prefix=$PREFIX --enable-multilib --disable-nls --disable-werror >> $LOGFILE 2>&1 || exit 0 > echo -e "Building binutils, this could take a while..." > make $PARALLEL >> $LOGFILE 2>&1 || exit 0 > make install >> $LOGFILE 2>&1 || exit 0 > cd .. > rm -rf build/*; > echo -e "Done" > fi; > > if $BUILD_GCC; then > echo -e "Extracting gcc..." > tar xfj $GCC.tar.bz2 >> $LOGFILE 2>&1 && cat $GCC.diff | patch -p0 >> $LOGFILE 2>&1 || exit 0 > cd build > echo -e "Configuring gcc..." > ../$GCC/configure --target=$TARGET --prefix=$PREFIX --with-libiconv-prefix=/opt/local -enable-interwork \ > --enable-languages="c" --without-headers --disable-shared \ > --with-newlib --disable-libmudflap --disable-libssp --disable-nls --disable-shared --without-headers \ > --disable-decimal-float --enable-altivec\ > --with-gmp=/opt/local --with-mpfr=/opt/local --with-cpu=cell >> $LOGFILE 2>&1 || exit 0 > echo -e "Building gcc, this could take a while..." > make $PARALLEL all-gcc >> $LOGFILE 2>&1 || exit 0 > make install-gcc >> $LOGFILE 2>&1 || exit 0 > cd .. > rm -rf build/* > echo -e "Done" > fi; > > if $BUILD_NEWLIB; then > echo -e "Extracting newlib..." > tar xfz $NEWLIB.tar.gz >> $LOGFILE 2>&1 && cat newlib.diff | patch -p0 >> $LOGFILE 2>&1 || exit 0 > cd build > echo -e "Configuring newlib..." > ../$NEWLIB/configure --target=$TARGET --prefix=$PREFIX --enable-multilib --disable-nls CFLAGS='-DHAVE_BLKSIZE' --enable-newlib-io-long-long --enable-newlib-io-long-double >> $LOGFILE 2>&1 || exit 0 > echo -e "Building newlib, this could take a while..." > make $PARALLEL >> $LOGFILE 2>&1 || exit 0 > make install >> $LOGFILE 2>&1 || exit 0 > cd .. > #rm -rf build/* > echo -e "Done" > fi > > if $BUILD_GCC_SECOND; then > # Yes, you need to build gcc again! > cd build > echo -e "Configuring gcc - 2nd pass..." > ../$GCC/configure --target=$TARGET --prefix=$PREFIX --with-libiconv-prefix=/opt/local \ > --with-cpu=cell \ > --with-gmp=/opt/local --with-mpfr=/opt/local --disable-decimal-float --disable-libquadmath \ > --enable-languages=c,c++ --disable-libssp --with-newlib --enable-cxx-flags="-G0" \ > --disable-libmudflap --disable-nls --disable-shared --disable-linux-futex --enable-altivec --disable-threads --disable-libgomp \ > >> $LOGFILE 2>&1 || exit 0 > echo -e "Building gcc - 2nd pass, this could take a while..." > make $PARALLEL >> $LOGFILE 2>&1 || exit 0 > make install >> $LOGFILE 2>&1 || exit 0 > cd .. > rm -rf build/* > echo -e "Done" > fi > > rm -rf build > >} > >function cube >{ > rm -rf free60 &>/dev/null > rm cube.elf32 &>/dev/null > > #check if git is present to download and install libxenon > git &>/dev/null > RETVAL=$? > > if [ $RETVAL -eq 1 ]; then > > echo -e "Downloading Cube Sample" > git clone git://free60.git.sourceforge.net/gitroot/free60/free60 >> $LOGFILE 2>&1 > echo -e "Building Cube Sample..." > make -C free60/devkitxenon/examples/xenon/graphics/cube >> $LOGFILE 2>&1 > cp free60/devkitxenon/examples/xenon/graphics/cube/cube.elf32 . > echo > echo -e "cube.elf32 compiled, run it via xell" > echo > > else > echo > echo -e "git is needed to download libxenon, install it and run this script again with \"libxenon\" as argument" > echo -e "If you are running debian/ubuntu : sudo apt-get install git" > echo > fi > exit 0 >} > >function all_done >{ > RED='\e[0;31m' > NC='\e[0m' > > echo > echo -e "All done, your xenon toolchain is located here : $PREFIX" > echo > echo -e "${RED}Please add the following path to your login script (~/.bashrc)" > echo > echo -e "export DEVKITXENON=\"/usr/local/xenon\"" > echo -e "export PATH=\"\$PATH:\$DEVKITXENON/bin:\$DEVKITXENON/usr/bin\"" > echo -e "${NC}" >} > >function check_debian >{ > if `echo $LSBRELEASE | grep "$SEARCH_UBUNTU" >> $LOGFILE 2>&1` > then > DEB=true > fi > > if `echo $LSBRELEASE | grep "$SEARCH_DEBIAN" >> $LOGFILE 2>&1` > then > DEB=true > fi >} > >function check_build-essential >{ > echo -e "Ubuntu or Debian is detected." > dpkg -s build-essential >> $LOGFILE 2>&1 > > if [ $? -eq 1 ]; then > echo -e "The build-essential package was not detected on your system" > echo -e "To build the toolchain you need to download and install the build-essential package." > echo -e "Do you want this script to do it for you ? (y/n)" > read answer >> $LOGFILE 2>&1 > if [ "$answer" == "y" ]; then > echo -e "Please wait while installing build-essential..." > sudo apt-get install build-essential >> $LOGFILE 2>&1 > fi > else > echo -e "The build-essential package was detected on your system" > fi >} > ># start >rm $LOGFILE &>/dev/null > >if [ "$1" == "toolchain" ]; then > check_debian > if $DEB; then > check_build-essential > fi > toolchain_install > libxenon_install > all_done >elif [ "$1" == "libxenon" ]; then > libxenon_install >elif [ "$1" == "cube" ]; then > cube >else > echo -e "Usage:" > echo -e "\"$0 toolchain\" (install toolchain + libxenon)" > echo -e "\"$0 libxenon\" (install or update libxenon)" > echo -e "\"$0 cube\" (compile the cube sample)" > echo > exit 0 >fi; > >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 382725
:
286235
| 286237 |
286239
|
286241
|
286243