This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.


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

Re: m68k->powerpc build problem


fheitka@ibm.net wrote:

> I compiled and installed binutils-2.9.1.0.16 and egcs-1.1.1 hoping that
> would solve some of the problems I'm having making a m68k->ppc cross
> compiler.  I've noticed that there are references in the  Makefile for
> gcc to the binutils programs.  However there is no reference to the
> powerpc-unknown-linux-gnu-as.   Could that be causing the following error? 
> It appears that the m68k assembler is being called to assemble ppc code. 
> I've looked at the FAQ. The building process seems to want the m68k
> assembler at times and the ppc assembler at times.

 You need the m68k assembler for binaries running in the host.

 You need the ppc assembler for library binaries for the target, like for
making 'libgcc.a' and 'libobjc.a'.

>   AR="powerpc-unknown-linux-gnu-ar" AR_FLAGS="rc" CC="gcc" CFLAGS="-g -O2"
  <snip>
> _muldi3
> Assembler messages:
> Error: unrecognized architecture specification `ppc'

 If you haven't changed the default 'prefix', '/usr/local', your 
'powerpc-unknown-linux-gnu-as' should be installed as:

   /usr/local/powerpc-unknown-linux-gnu/bin/as

All your other binutils for the 'powerpc-unknown-linux-gnu' target
should be there too...

BTW, why didn't you look the search paths for programs and libs using:
   ./xgcc -print-search-dirs
or try to look which 'as' your 'xgcc' finds first using:
   ./xgcc -print-prog-name=as

If you have used GCC earlier, have browsed the GCC-manual (with 'info',
making a DVI file by 'make dvi' and looking it with 'xdvi' or printing it,
making HTML-pages with 'texi2html gcc.texi' and browsing with Netscape, etc.) 
you should know these options for 'debugging the installation'... This really 
is a RTFM-error...

-------------------------- clip ---------------------------------
Options for Debugging Your Program or GNU CC

 .......

-print-file-name=library
  Print the full absolute name of the library file library that would be used 
  when linking--and don't do anything else.  With this option, GNU CC does not 
  compile or link anything; it just prints the file name.

-print-prog-name=program
  Like -print-file-name, but searches for a program such as cpp.

-print-libgcc-file-name
  Same as -print-file-name=libgcc.a.

  This is useful when you use -nostdlib or -nodefaultlibs but you do want to 
  link with libgcc.a.  You can do
    gcc -nostdlib files... `gcc -print-libgcc-file-name`

-print-search-dirs
  Print the name of the configured installation directory and a list of program
  and library directories gcc will search--and don't do anything else.

  This is useful when gcc prints the error message installation problem, cannot
  exec cpp: No such file or directory.  To resolve this you either need to put 
  cpp and the other compiler components where gcc expects to find them, or you 
  can set the environment variable GCC_EXEC_PREFIX to the directory where you 
  installed them.  Don't forget the trailing '/'.  See Environment Variables.
-------------------------- clip ---------------------------------

 Cheers, Kai
_______________________________________________
New CrossGCC FAQ: http://www.objsw.com/CrossGCC
_______________________________________________
To remove yourself from the crossgcc list, send
mail to crossgcc-request@cygnus.com with the
text 'unsubscribe' (without the quotes) in the
body of the message.