This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
I will try 2.13. Nevertheless here is my script ( don't have my hompage ready yet) Wolfgang ------------ Start of dcript ---------------- #!/bin/sh ########################################################################################### # This is the script file 'build-cross.sh'. # Its job is to build a U**x or Linux-hosted gcc cross compiler targeting a ppc system. # This script can be used to build the binutils, bootstrap-gcc, glibc, and gcc. # Building the glibc needs an installed bootstrap-gcc cross compiler. # # The script is invoked in the following manner: # sh build-xgcc3.sh u binutils # sh build-xgcc3.sh b bootstrap-gcc # sh build-xgcc3.sh l glibc # sh build-xgcc3.sh g gcc # # Typical usage would be to run the script without the 'install' option to compile # the tools, and then log in as 'root' and re-run with the 'install' option enabled # to install the tools into the execution directories. ########################################################################################### # set 'target' CROSSTARGET=powerpc-linux CPU=860 ########################################################################################### ############################### Configuration variables. ################################## ########################################################################################### # Define some variables which control the process. # Modify these to suit your requirements. # prefix for the executables PROGRAM_PREFIX="$CROSSTARGET"- # set 'prefix' to the root of the install directory on your U**X box. # For most Linux systems this should be "/usr". PREFIX=/opt/xgcc3/ppc$CPU # CPU options CPU_OPTS="--with-cpu=$CPU --nfp --without-fp" # Versions to be used BINUTILS_VERSION=2.13.90.0.16 GCC_VERSION=3.2 GLIBC_VERSION=2.2.5 # include path to kernel headers HEADERS=/opt/elinos/cdk/ppc/8xx/libc6/powerpc-linux/include ########################################################################################### ############################ End of Configuration variables. ############################## ########### You will most likely not need to change anything below this line. ############# ########################################################################################### # Function "errexit" errexit () { set +x echo "$0: $1 aborting..." exit ${2:-1} } # Function "_patch"; $2 is directory of patch file, $3 is file name of patch file _patch () { if [ ! -f "$3".done ] then patch $1 < $2$3 if [ ! $? = 0 ] then errexit "Command patch $1 < $2$3 returned exit code: $?." else touch "$3".done fi else echo "$2$3 already applied." fi } # Function "patch_glibc" AssureGlibcPatches () { if [ x"$VERSION" = x2.2.5 ] then cd $SRCDIR echo "Executing patches for cd $SRCDIR." if [ -f sysdeps/powerpc/fclrexcpt.c ] then mv sysdeps/powerpc/fclrexcpt.c sysdeps/powerpc/fpu/ fi if [ -f sysdeps/powerpc/memset.S ] then rm sysdeps/powerpc/memset.S fi _patch -p0 ../ glibc-errlist.c.patch _patch -p0 ../ glibc-ppc-nofpu.patch1 #DEL _patch -p0 ../ glibc-ppc-nofpu.patch2 _patch -p1 ../ glibc-ppc-nofpu.patch3 cd .. else echo "Warning: no patches executed on $SRCDIR" fi } # Function "SetIncPath" SetIncPath () { # Change the include search path to the ELINOS Linux distribution # by SYSGO. This path has the needed ppc kernel headerfiles. C_INCLUDE_PATH=$1 export C_INCLUDE_PATH } # Funktion "makegcc"; $1 is make target $2 is include path makegcc () { # xgcc is built after the first invocation of make, but make will # exit with an error afterwards. set +e; make $1 2>&1 | tee make-1.log if [ ! -f gcc/xgcc ] then errexit "Unable to build gcc/xgcc" fi # For a 2nd invocation of make we must change the include search # path, which will run the make without error. Note that the search # path must not be changed before gcc/xgg is built. set -e; SetIncPath $2; make $1 2>&1 | tee make-2.log } # Stop if errors occur along the way. set -e # Announce ourselves echo "$0: started `date`" # check for BUILTTARGET aliases case $1 in u) BUILTTARGET=binutils ;; b) BUILTTARGET=bootstrap-gcc ;; g) BUILTTARGET=gcc ;; l) BUILTTARGET=glibc ;; *) BUILTTARGET=$1 ;; esac # set build target BODY and version case $BUILTTARGET in binutils) BODY=binutils ;VERSION=$BINUTILS_VERSION ; OPTS=--without-headers ;; bootstrap-gcc) BODY=gcc ; VERSION=$GCC_VERSION ; OPTS=--without-headers ;; gcc) BODY=gcc ; VERSION=$GCC_VERSION ; OPTS=--without-headers ;; glibc) BODY=glibc ; VERSION=$GLIBC_VERSION ; OPTS="--with-headers=$HEADERS --host=$CROSSTARGET";; *) errexit "Unsupported builttarget $BUILTTARGET" ;; esac # Get the target name specified on the command line, and install flag. action=$2 # set 'SRCDIR' SRCDIR="$BODY"-"$VERSION" # set 'builddir' builddir=b."$BUILTTARGET"-"$VERSION" if [ x$BUILTTARGET = xglibc ] then # Assure that glibc patches are applied AssureGlibcPatches fi if [ ! -d $builddir ] then mkdir $builddir fi cd $builddir # Compilation done, install if asked to do so. if [ x"$action" = xinstall ] then echo "$0: installing $BUILTTARGET in $PREFIX." if [ x$BUILTTARGET = xbootstrap-gcc ] then make install-gcc 2>&1 | tee install.log else make install 2>&1 | tee install.log fi else if [ ! x$BUILTTARGET = xbinutils ] then PATH="$PREFIX"/bin:"$PATH" fi if [ x$BUILTTARGET = xbootstrap-gcc ] then if [ ! -f configure.done ] then echo "$0: configure for $BUILTTARGET." ../$SRCDIR/configure --target=$CROSSTARGET $CPU_OPTS $OPTS \ --prefix=$PREFIX \ --program-prefix=$PROGRAM_PREFIX \ --enable-languages=c \ --disable-shared \ --with-newlib \ -v 2>&1 | tee configure.log #DEL --without-headers \ #DEL --infodir=$PREFIX/share/info \ #DEL --mandir=$PREFIX/share/man \ touch configure.done fi echo "$0: compile $BUILTTARGET" makegcc all-gcc $HEADERS else if [ x$BUILTTARGET = xglibc ] then # Use the gcc bootstrap cross compiler to compile glibc CFLAGS="-mcpu=$CPU -O2" export CFLAGS CPPFLAGS="-mcpu=$CPU -O2" export CPPFLAGS CC="$PREFIX"/bin/powerpc-linux-gcc export CC AR="$PREFIX"/bin/powerpc-linux-ar export AR RANLIB="$PREFIX"/bin/powerpc-linux-ranlib export RANLIB fi if [ ! -f configure.done ] then echo "$0: configure for $BUILTTARGET." ../$SRCDIR/configure --target=$CROSSTARGET $CPU_OPTS $OPTS \ --prefix=$PREFIX \ --program-prefix=$PROGRAM_PREFIX \ --enable-languages=c,c++ \ --enable-shared \ --enable-threads=posix \ --enable-add-ons=linuxthreads \ -v 2>&1 | tee configure.log #DEL --without-headers \ #DEL --with-local-prefix=/usr/local \ #DEL --with-gxx-include-dir=$PREFIX/include/g++ \ #DEL --infodir=$PREFIX/share/info \ #DEL --mandir=$PREFIX/share/man \ touch configure.done fi echo "$0: compile $BUILTTARGET" case $BUILTTARGET in binutils) make all 2>&1 | tee make.log;; gcc) makegcc all $PREFIX/include;; glibc) make all 2>&1 | tee make.log;; *) errexit "Unable to build $BUILTTARGET";; esac fi fi # Announce that we're finished. echo "$0: finished `date`" exit $? ---------------- End of script ------------------ Am Freitag, 17. Januar 2003 19:27 schrieben Sie: > According to > http://sources.redhat.com/ml/libc-alpha/2001-07/msg00308.html > glibc doesn't build with autoconf2.53. Please try using > autoconf2.13 instead. > - Dan > > -----Original Message----- > From: Wolfgang Schmieder > To: Dan Kegel > Sent: 16.01.2003 23:05 > Subject: Re: Problems with glibc patch #2 at http://kegel.com/xgcc3 > > Hello Dan, > > thank you for your quick response. Here my autoconf version. > > wschmied@linux:~> autoconf -V > autoconf (GNU Autoconf) 2.53 > Written by David J. MacKenzie and Akim Demaille. > > I will put all my scripts and additional info on a web page. It will > take me > some time. > > Regards > Wolfgang > > Am Freitag, 17. Januar 2003 03:50 schrieb Dan Kegel: > > Wolfgang Schmieder wrote: > > >first of all I want to thank Dan Kegel for his script and patches at > > >http://kegel.com/xgcc3. With his help I was able to build a crossgcc > > >toolchain for ppc860 with the following additional patch from Peter > > >Barada: > > > > Thanks for posting that extra patch. Wonder why I didn't need it... > > > > >The only thing which I don't understand is, that I must not run > > >Dan's glibc patch #2. Otherwise configure exits with the following > > >error: > > > > > >./build-xgcc3-ppc.sh: compile glibc > > >make -r PARALLELMFLAGS="" CVSOPTS="" -C ../glibc-2.2.5 objdir=`pwd` > > all > > > >make[1]: Wechsel in das Verzeichnis »/home/wschmied/gcc/glibc-2.2.5« > > >configure.in:151: warning: AC_CONFIG_SUBDIRS: you should use literals > > >configure.in:584: error: AC_REQUIRE: cannot be used outside of an > > > > m4_defun'd macro > > > > >configure.in:584: AC_CHECK_TOOL_PREFIX is required by... > > >configure.in:584: the top level > > > > You may have to tar up all your scripts, put them on a web page, > > and post the URL... looks like you've modified them a bit. > > > > But I think because the patch modifies configure.in, something > > somewhere must be running autoconf, so maybe you have the > > wrong version of autoconf? The gnu tools are very picky, > > you need 2.13, I suspect, and nothing later. Which version(s) > > do you have installed? > > > > - Dan > > > > > > ------ > > Want more information? See the CrossGCC FAQ, > > http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to > > crossgcc-unsubscribe@sources.redhat.com ------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |