GCC-4.0.2 on Cygwin

Brian Rose lists@brianrose.net
Tue Oct 11 00:15:00 GMT 2005


TZ wrote:

> Well, the problem is with binutils (see bug number 991 from the binutils
> webpage). Solution: Just download one of the latest binutils snapshots.
> 
> Tomaz

binutils-050930 works with gcc-4.0.2. Here is my build script.

#!/bin/sh
# Build an embedded development toolchain
# assume that archives are in source/archive directory
# set prefix to the directory where this script is
# Look for brbuild.log files for the results of individual operations


PREFIX=$HOME/rtems/tools
TARGET=m68k-elf

# The last known configuration known to work
# BINUTILS_VER=2.15
# GCC_VER=3.4.2
BINUTILS_VER=050930
BINUTILS_ARCHIVE=archive/binutils-$BINUTILS_VER.tar.bz2
GCC_VER=4.0.2
GCC_ARCHIVE=archive/gcc-$GCC_VER.tar.bz2

echo Building Binutils and GCC for $TARGET
echo =============================================================
cd source
mkdir build

# ---------------------- Build binutils
echo ==================== BUILDING binutils-$BINUTILS_VER ========
echo Extracting binutils $BINUTILS_VER sources
tar -xjvpf $BINUTILS_ARCHIVE
cd build
mkdir binutils
cd binutils
echo Configuring binutils-$BINUTILS_VER
../../binutils-$BINUTILS_VER/configure --target=$TARGET --prefix=$PREFIX
echo Building binutils-$BINUTILS_VER
make && make install
PATH=$PREFIX/bin:${PATH}
cd ../..

# ---------------------- Build GCC
echo ==================== BUILDING gcc-$GCC_VER ==================
echo Extracting gcc $GCC_VER sources
tar -xjvpf $GCC_ARCHIVE
cd build
mkdir gcc
cd gcc
echo Configuring GCC-$GCC_VER
../../gcc-$GCC_VER/configure --target=$TARGET --prefix=$PREFIX 
--with-as=$PREFIX/bin/$TARGET-as.exe --with-ld=$PREFIX/bin/$TARGET-ld.exe
make all-gcc && make install-gcc
cd ../..







-- 

Brian

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



More information about the crossgcc mailing list