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]

Re: Updated build-crossgcc.sh available


I am building for the powerpc on a redhat 7.1 linux box using the build script below (using the built in defaults).
when I use
     $ powerpc-motorola-elf-gcc -v --help

I find that it is trying to use the "as" assembler as opposed to powerpc-motorola-elf-as - why?



---------------- build script -------------------------
#! /bin/bash

# set some convenience variables (modify them to suit your taste):

if [ "x$target" = "x" ]
then
   export target=powerpc-motorola-elf
fi

if [ "x$prefix" = "x" ]
then
   export prefix=/usr/local/cross-compilers/powerpc
fi

if [ "x$gcc_version" = "x" ]
then
   export gcc_version=2.95.2-6
fi

if [ "x$binutils_version" = "x" ]
then
   export binutils_version=2.10.1
fi

if [ "x$cygwin_version" = "x" ]
then
   export cygwin_version=1.1.8-2
fi

export  languages="c,c++"
export  curdir=`pwd`
export  tarfiles=tars


##################################################################################
#
#  Don't modify below this point
#
##################################################################################


export  PATH=$prefix/bin:$PATH
set -e

# get the source
if [ ! -d gcc-${gcc_version} ]
then
    tar -xzf $tarfiles/gcc-${gcc_version}*.tar.gz
fi
if [ ! -d cygwin-${cygwin_version} ]
then
    tar -xzf $tarfiles/cygwin-${cygwin_version}*.tar.gz
fi
if [ ! -d binutils-${binutils_version} ]
then
    tar -xzf $tarfiles/binutils-${binutils_version}*.tar.gz
fi

# config.guess is part of the gcc, binutils, and cygwin distributions.
if [ -x $curdir/cygwin-${cygwin_version}/config.guess ]
then

   export  host=`$curdir/cygwin-${cygwin_version}/config.guess`
   export  build=`$curdir/cygwin-${cygwin_version}/config.guess`
else
   export  host=i686-pc-cygwin
   export  build=i686-pc-cygwin
fi

# Create build directories
mkdir -p build-binutils-${target} build-gcc-${target} build-cygwin-${target}

# Build the binary utilities
echo "building binary utilities"
cd $curdir/build-binutils-${target}
../binutils-${binutils_version}/configure --prefix=$prefix --target=$target --host=$host --build=$build \
  --with-included-gettext
make 2>&1 | tee make.log
make install 2>&1 | tee install.log

# Build and install "just the C" portion of gcc
# (feel free to change
# the arguments to --enable-languages to suit your needs):

echo "building gcc - C only"
cd $curdir/build-gcc-${target}
../gcc-${gcc_version}/configure --prefix=$prefix --target=$target --host=$host --build=$build \
  --with-newlib --enable-languages=$languages \
  --with-included-gettext --enable-shared --enable-threads
make LANGUAGES=c all-gcc 2>&1 | tee make.log
make LANGUAGES=c install-gcc 2>&1 | tee install.log

# Clean out the target area just in case (may not needs this):
rm -rf $prefix/$target

# Build and install newlib
echo "building newlib library"
cd $curdir/build-cygwin-${target}
../cygwin-${cygwin_version}/newlib/configure --prefix=$prefix --target=$target --host=$host --build=$build
make 2>&1 | tee make.log
make install 2>&1 | tee install.log

# Make the sys-include link (may not need this, but why not):
(cd $prefix/$target; ln -s include sys-include)

# Build the rest of gcc
echo "building rest of gcc"
cd $curdir/build-gcc-${target}
make 2>&1 | tee make_full.log
make install 2>&1 | tee install_full.log

echo "$0: finished `date`"


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]