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]
Other format: [Raw text]

RE: Problems with different versions of gcc


Hello Daniel,

I had the same problem. And i fixed this by looking where the native gcc-lib
is.
There I made a symlink to the my crosscompiler's directory...

I will give you an example how it is done on my box.

powerpc-eabi and m68k-coff toolchains have been installed with prefix
'/usr/local/' and local-prefix '/usr/local/{target}'

Then I cd'ed to my native compiler's lib directory: /usr/lib/gcc-lib (there
is already a i386-redhat-linux directory under which the directory '2.96'
resides.)

[prompt]$ ln -s ${prefix}/lib/gcc-lib/m68k-coff/ m68k-coff
[prompt]$ ln -s ${prefix}/lib/gcc-lib/powerpc-eabi/ powerpc-eabi

This fixed the 'gcc -b m68k-coff' problem and made it possible to use an old
KDevelop for crosscompilation. I just added the "-b m68k-coff -V 2.95.3"
flags to the compiler flags in the settings-dialog. (don't forget to include
your version with the V flag or weird stuff startst to happen).

I know that my way of making crosstoolchain is a bit different than the way
Bill prescribes, (I mix the toolchain into already existing system
directories) but that's because I made the toolchain at around the time Bill
just put up his new crossgcc FAQ.

So I always installed into /usr/local. Which is fine for me. The binaries
are directly in the /usr/local/bin directory which is already in my path.
Libs are in /usr/local/lib, which is also default in my library path.

You might see this as a 'all the things that people do to feed their
lazyness even further' kind of thing.
;-)

Hope this helped,
Jan


-----Original Message-----
From: Daniel Hallgren [mailto:x_dah@sectra.se]
Sent: woensdag 24 juli 2002 11:18
To: crossgcc
Subject: Problems with different versions of gcc


I have successfully built and installed a m68k-linux crosscompiler using 
Bill Gatliffs script. Everything is working well and I only have one 
problem.

My native compiler (on my i686 machine) is gcc-3.1, which I've used to 
build the crosscompiler. The crosscompiler is built from gcc-2.95.3 and 
installed in /opt/m68k-linux. In order to make gcc search in the right 
dirs I've set the env variable:

GCC_EXEC_PREFIX=/opt/m68k-linux/lib/gcc-lib

as the FAQ says. My cc1, collect2, specs, etc is located in the dir

/opt/m68k-linux/lib/gcc-lib/m68k-linux/2.95.3/

When i invoke gcc to compile a program for m68k-linux, i.e. with

gcc -b m68k-linux -o test test.c

i get the error message:

gcc: installation problem, cannot exec `cc1': No such file or directory

If I rename the dir 2.95.3 to 3.1, it all works fine. How can I make gcc 
understand the crosscompiler is of version 2.95.3 and that it therefor 
needs to search in

/opt/m68k-linux/lib/gcc-lib/m68k-linux/2.95.3/

and not in

/opt/m68k-linux/lib/gcc-lib/m68k-linux/3.1/

without renaming the directory? Anyone has a clue or had the same problem?

 / Daniel Hallgren


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

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


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