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: Hi Stuart, can you help me personnally with crossgcc?





Jean-Sebastien Trottier wrote:

> Sorry to bother you, I was browsing the crossgcc archives and found one
> of your posts...
>
> You stated that you got gcc 2.95.3 to cross compile from linux to a sun
> target... is that right?
>
> Can you tell me the exact procedure you took to do so? or script?
> I'm having a lot of problems...
>
> I don't want to spam so I'll stop here... thanks in advance



I think this is the right script.  If you have any problems, let me know.

I started by copying the contents of /usr/lib and /usr/include from a sun
box into a network accessible directory.  I then fixed all the links that
got messed up coping the files over and deleted any that were obviously
unneeded (erring on the side of leaving them in).  The directories that
I used were /tools/sw_build/native_SunOS/lib and
/tools/sw_build/native_SunOS/include respectively.  Then I ran the
following script:

# start script

#!/bin/sh

# Stop if errors occur along the way.
set -e

export DATE=20010720

export TARGET=sparc-sun-solaris2.7
export PREFIX=/tools/sw_build/host_Linux/$TARGET/Build-$DATE
export MACHINE=SunOS

export BINUTILS=binutils-2.10.1
export GCC=gcc-2.95.3
cd /tools/src/build/host_Linux/$TARGET

mkdir -p build_$BINUTILS
cd build_$BINUTILS
../$BINUTILS/configure --target=$TARGET --prefix=$PREFIX --disable-shared
-v |
tee config.log
make all install | tee make.log
cd ..

export PATH=$PATH:${PREFIX}/bin

mkdir -p build_$GCC
cd build_$GCC
../$GCC/configure --target=$TARGET --prefix=$PREFIX --disable-shared
--with-headers=/tools/sw_build/native_$MACHINE/include
--with-libs=/tools/sw_build/native_$MACHINE/lib --with-gnu-ld
--with-gnu-as  -v  | tee config.log
make all install | tee make.log
cd ..

# end script

Hope this is useful.  The directory structure I used is more messy than it
needs to be (political reasons) but that's the basic procedure.

I think that this should work.  I have since moved on to getting 3.0 to
work (successfully!!!) but it is more difficult because I hacked up the
source tree to fix a configure bug.


Good luck!

Stuart Kenny
Solidum Systems




------
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]