This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Help with Gcc-3.0.3 cross-compile


Thank you all for the great help.

I think this will be the last question, as I think I am getting much closer.

I followed these steps:

I am building inside a RedHat 7.1 root jail.

1-Built and installed binutils 2.11.2 for the host system
(i686-pc-linux-gnu)
2-built and installed gcc-3.1Expiremental for the host system
(i686-pc-linux-gnu)
3-built and installed glibc-2.2.5 for the host system (i686-pc-linux-gnu)
4-Built binutils-2.11.2 for cross-compile --target=ia64-pc-linux-gnu and
installed it in prefix=/home/cross-ia64
5-Built glibc-2.2.5 for cross compile --target=ia64-pc-linux-gnu and
prefix=/home/cross-ia64
6-Attempted to build gcc for --target=ia64-pc-linux-gnu as follows:
Work is done under /cross-compile (cd /cross-compile)

	mkdir gcc-build
	tar -zvxf gcc-3.1-exp.tar.gz	(done earlier actually)
	cd gcc-build
	../gcc-3.1-exp/configure --target=ia64-pc-linux-gnu
--prefix=/home/cross-ia64 --with-libs=/home/ia64-cross/libs
--with-headers=/home/cross-ia64/include -v
	make all

I get the following error:

Start****************************************

Master Tariq@gcc-build#: make
make[1]: Entering directory `/cross-compile/gcc-build/libiberty'
make[2]: Entering directory `/cross-compile/gcc-build/libiberty/testsuite'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/cross-compile/gcc-build/libiberty/testsuite'
make[1]: Leaving directory `/cross-compile/gcc-build/libiberty'
make[1]: Entering directory `/cross-compile/gcc-build/zlib'
true "AR_FLAGS=rc" "CC_FOR_BUILD=gcc" "CFLAGS=-g -O2" "CXXFLAGS=-g -O2"
"CFLAGS_FOR_BUILD=" "CFLAGS_FOR_TARGET=-g -O2" "INSTALL=/bin/sh
/cross-compile/gcc-3.1-beta/install-sh -c" "INSTALL_DATA=/bin/sh
/cross-compile/gcc-3.1-beta/install-sh -c -m 644" "INSTALL_PROGRAM=/bin/sh
/cross-compile/gcc-3.1-beta/install-sh -c " "INSTALL_SCRIPT=/bin/sh
/cross-compile/gcc-3.1-beta/install-sh -c" "LDFLAGS=" "LIBCFLAGS=-g -O2"
"LIBCFLAGS_FOR_TARGET=-g -O2" "MAKE=make"
"MAKEINFO=/cross-compile/gcc-3.1-beta/missing makeinfo  " "PICFLAG="
"PICFLAG_FOR_TARGET=" "SHELL=/bin/sh" "EXPECT=expect" "RUNTEST=runtest"
"RUNTESTFLAGS=" "exec_prefix=/home/cross-ia64/"
"infodir=/home/cross-ia64//info" "libdir=/home/cross-ia64//lib"
"prefix=/home/cross-ia64/" "tooldir=/home/cross-ia64//ia64-pc-linux-gnu"
"AR=ar" "AS=as" "CC=gcc" "CXX=c++" "LD=ld" "LIBCFLAGS=-g -O2" "NM=nm"
"PICFLAG=" "RANLIB=ranlib" "DESTDIR=" DO=all multi-do
make[1]: Leaving directory `/cross-compile/gcc-build/zlib'
make[1]: Entering directory `/cross-compile/gcc-build/gcc'
./gengenrtl -h > tmp-genrtl.h
./gengenrtl: /lib/i686/libc.so.6: version `GCC_3.0' not found (required by
./gengenrtl)
make[1]: *** [s-genrtl] Error 1
make[1]: Leaving directory `/cross-compile/gcc-build/gcc'
make: *** [all-gcc] Error 2
Master Tariq@gcc-build#:


******************************************End

First, are my steps correct and in the correct order?


I would appreciate your help.

--
Tariq

-----Original Message-----
From: Alexandre Oliva [mailto:aoliva@redhat.com]
Sent: Saturday, February 09, 2002 6:27 PM
To: Joe Buck
Cc: wilson@redhat.com; tariq.shureih@intel.com; smc@us.ibm.com;
gcc@gcc.gnu.org
Subject: Re: Help with Gcc-3.0.3 cross-compile


On Feb  9, 2002, Joe Buck <jbuck@synopsys.COM> wrote:

> Jim Wilson writes:
>> This is an assembler error, which means the cross-gcc is probably trying
>> to run the native assembler instead of the cross-assembler. 

> This is such a common error for people trying to do cross-compiles that
> maybe we should think about how to detect the situation automatically,
> perhaps at installation time.  Maybe something as simple as trying to
> build "hello world", looking for cascades of errors from the assembler,
> and if seen spit out some standard blurb.

We already have a program that we link as soon as libgcc is created;
perhaps we could compile and assemble that program before starting to
build libgcc, and print some long error message explaining potential
problems and solutions if the program fails to compile?

Perhaps we could even split the compilation in assembly-generation and
assembling, such as to be able to tell whether the problem is the lack
of target libraries or of an assembler.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer


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