🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #46609

installing cross-compiler for PowerPC code

#46609
From: Pierre Fournier
Date: Fri, 04 Nov 1994 10:07
122 lines
5590 bytes
I need to install gcc as a cross-compiler for PowerPC code generation,
running on a SUN station.
Thus, I'm trying to install gcc-2.6.0 and binutils-2.5.1 (=> 'gas' as
cross-assembler and 'ld' as cross-linker) but I've got some problems:

1) I'm rather a novice in the UNIX world.
2) I don't know what to specify as the '--target' option for 'configure'.
3) Which libraries do I need, since the target is a standalone system
   with no OS.

Right below are some more information:

- The host system is a 'spark-sun-sunos4.1.3' (given with the configuration
  process format)
- The target will be (still under designing by myself) a PowerPC-603 based
  evaluation card, which I'd like it to run some demonstration and
  benchmark programs (hence the need of a compiler !).


Actually, I almost succeeded in making both the binutils and gcc since
the GNU documentation is quite well done. I list below what I've done
so far :

Installing binutils:
--------------------
   - running 'configure' with the parameter: --target=powerpc-ibm-aix
                                             --target=powerpc-motorola-aix
                                          I need to install gcc as a cross-compiler for PowerPC code generation,
running on a SUN station.
Thus, I'm trying to install gcc-2.6.0 and binutils-2.5.1 (=> 'gas' as
cross-assembler and 'ld' as cross-linker) but I've got some problems:

1) I'm rather a novice in the UNIX world.
2) I don't know what to specify as the '--target' option for 'configure'.
3) Which libraries do I need, since the target is a standalone system
   with no OS.

Right below are some more information:

- The host system is a 'spark-sun-sunos4.1.3' (given with the configuration
  process format)
- The target will be (still under designing by myself) a PowerPC-603 based
  evaluation card, which I'd like it to run some demonstration and
  benchmark programs (hence the need of a compiler !).

Actually, I almost succeeded in making both the binutils and gcc since
the GNU documentation is quite well done. I list below what I've done
so far :

Installing binutils:
--------------------
   - running 'configure' with the parameter: --target=powerpc-ibm-aix
                                             --target=powerpc-motorola-aix
                                             --target=powerpc--aix
                                      or     --target=rs6000-ibm-aix

     ..gives the following message:

         "*** This configuration is not supported in the following
          subdirectories:
               ld  binutils
              (Any other directories should still work fine.)"

     ..and the linker is indeed not compiled with the 'make' command.

   - running 'configure' with the parameter: --target=powerpc
                                             --target=powerpc-motorola-none

     ..gives an error message while proceeding the "Configuring opcodes"
       stage.

   - Finally, I've found that using '--target=powerpc-ibm-netware' works
     almost properly (almost, because it can't find the './config/te-ppcnw.h'
     file that it seems to need, leaving an error message (not fatal
     apparently)). So I've completed the installation with the 'make' and
     'make install' commands.

Installing gcc:
---------------
   - Happy to have found a matching '--target=powerpc-ibm-netware' parameter,
     I used it to configure gcc, but unfortunately (as you guess), it hasn't
     worked.

   - So I tried '--target=powerpc-ibm-aix' (after having renamed the created
     'powerpc-ibm-netware/' directory into 'powerpc-ibm-aix/' (yes, I guess
     it's not the right way to proceed !)). The 'configure' process then
     succeded.

   - Then, I've copied the libgcc.a file (compiled for a PowerPC based rs6000
     system, of course) into my lib/ directory.

   - Following the documentation, I typed 'make LANGUAGES=c' and waited...
     ...until the following error message comes (when attempting to compile
     'cccp' with the 'cc ... cccp ... -lld' command):

     "ld: -lld: No such file or directory
      **** Error code 4
      make: fatal error: Command failed for target cccp"

   - Then I started to cry !!!!


Does anyone have experience of making such a cross-compiler and would be kind
enough for giving to me some tips ?

Any advices are warmly (correct ??) accepted !

Thanks in advance !


Pierre Fournier,
EPFL (Swiss Federal Institute of Technology in Lausanne)

E-mail: fournier@lamisun.epfl.ch


P.S.
____

If you're interested in acting as English teacher, please correct the above
text which, I'm sure, is full of mistakes. I'm a French speaker trying to
improve his (still bad, I know, I know !) English.
Technical Details
Message-ID: <39d14h$hih@disunms.epfl.ch>
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!pipex!oleane!jussieu.fr!univ-lyon1.fr!swidir.switch.ch!epflnews!dinews.epfl.ch!didec21!fournier

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,45c9f9751806dab1,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1994-11-04 02:07:13 PST
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!pipex!oleane!jussieu.fr!univ-lyon1.fr!swidir.switch.ch!epflnews!dinews.epfl.ch!didec21!fournier
From: fournier@didec21.epfl.ch (Pierre Fournier)
Newsgroups: gnu.gcc.help
Subject: installing cross-compiler for PowerPC code
Date: 4 Nov 1994 10:07:13 GMT
Organization: Ecole Polytechnique Federale de Lausanne
Lines: 122
Message-ID: <39d14h$hih@disunms.epfl.ch>
NNTP-Posting-Host: didec21.epfl.ch
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Keywords: cross compiler powerpc
X-Newsreader: TIN [version 1.2 PL2]