This is the mail archive of the gcc-bugs@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: GCC Cross Compiler Query: please help


mani@cae.wisc.edu wrote:
After building the binutils-2.5.2 library, I configured the cross-compiler version gcc-2.6.3 successfully.

These are very old versions of binutils and gcc by the way. We stopped supporting them many years ago, and there is no guarantee that they will work correctly on current systems.


as: option `-g' is ambiguous
/var/tmp/ccoyaiBE.s:20: Error: unknown pseudo-op: `.ent'
/var/tmp/ccoyaiBE.s:22: Error: unknown pseudo-op: `.frame'

All of these errors means that the cross-gcc is using the wrong assembler. It is trying to use the native assembler instead of the cross-assembler.


The best way to solve this problem is to make sure you use the same --prefix configure option for both binutils and gcc. If you use the same --prefix, and build and install binutils before building gcc, it will work.

If you made the mistake of using a different prefix, then you can get gcc to work by placing a link to the cross-assembler in the gcc build directory, so that gcc will find it. The link should be called as, and needs to be in the same directory as the cc1 executable. You will also need to do the same for ld, except it needs to be called "real-ld", I think. It has changed a few times, but I think real-ld is right for that old version. You may also need to do the same for various other programs from binutils. Note: If you have "." on your path, and it is near the beginning, then you might get build failures because the native gcc accidentally uses the cross assembler. You can fix this by removing "." from your path, or putting it at the end.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com



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