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]

make cross fails (gcc-2.95.2)


Greetings,

I've been trying to build a cross compiler for a
mips-elf target.

I've looked at the following documents:
   http://www.objsw.com/CrossGCC/FAQ-4.html
   http://gcc.gnu.org/install/configure.html


The following are what i'm working with:

% gcc -v
Reading specs from
/usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2
release)

% ./config.guess 
i686-pc-linux-gnu


target=mips-elf
prefix=/opt/patrick/tc

% ../gcc-2.95.2/configure --target=$target
--prefix=$prefix --with-newlib
--enable-languages=c,c++,java -v




The binutils-2.10.1 builds successfully.



The ``make cross'' dies during:

/bin/sh ../../../gcc-2.95.2/libio/gen-params
LIB_VERSION=2.8.0  >tmp-params.h
/tmp/ccy5cgj8.s: Assembler messages:
/tmp/ccy5cgj8.s:113: Error: Subtraction of two symbols
in different sections ".rodata" {.rodata section} -
"$LFB3" {.gnu.linkonce.t.__tf7filebuf section} at file
address 0000000000000040.
gen-params: could not compile dummy.C with
/opt/patrick/tc/src/build-gcc/gcc/xgcc
-B/opt/patrick/tc/src/build-gcc/gcc/
-B/opt/patrick/tc/mips-elf/bin/ -I.
-I../../../gcc-2.95.2/libio -nostdinc++ -nostdinc++ -g
-O2



I don't know any assembly so I can't make much out of
the .s file.  I have re-produced the .s file by
running the above $(CXX) with the addition of `-S -o
/tmp/dummy.s'.


I notice that the actual command run by gen-params is
`$(CXX) -O -c dummy.C' which produces a slightly
different .s file (obviously, however, diff shows
changes past line 117).


Attached is the generated .s file produced by me
mimicking gen-params script.


I end up with a similar result if i try to build the
cross compiler on the following host:

% ./config.guess 
mips-sgi-irix5.3



Also Note: I had to edit the generated
$(build-gcc)/gcc/config.h file to add:

#define ASM_FINAL_SPEC ""


[btw: Is there a way to have the configure script
figure this out on its own?]


Otherwise the `make cross' fails early in the game
while looking to run mips-tfile.  :-\



Any suggestions hints, etc would be appreciated.  And
I do mean *any* :-)


Thanks in advance,

patrick
p.s., if not too much trouble please cc: me on the
reply.  THanks.

=====
Reality is an illusion that occurs due to lack of alcohol.
   -- Anonymous

__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/

dummy2.s


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