🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #41735

Re: Help cross compiling

#41735
From: Mumit Khan
Date: Wed, 21 Feb 1996 00:00
56 lines
2334 bytes
In article <312B5AAE.46EA@relay.nswc.navy.mil>,
David Grizzard  <dgrizza@relay.nswc.navy.mil> wrote:
>
>My situation is this.  I currently am running gcc on an hp9000 and want to
>build gcc to cross compile code for a Linux box.  

I do just that, and it works like a charm for both a.out and ELF targets.
I was a little worried however about installing the x-compiler in the
standard install locations, so I installed it under a different tree. 
Looking back, it should be fine and you wouldn't mess up the hppa configs,
so go for it.

here're my notes from building the ELF compiler (a.out is pretty much the
same):

================

From hpp1.1-hp-hpux9.05 to i486-linux:

1. binutils:
    - 2.6: cross-compile:
    configure --target=i486-linux host=hpp1.1-hp-hpux9.05 \
	--prefix=/usr/local/xcompile/
2. Get /usr/include, /usr/lib
    - unpack Slackware d6/libc.tgz
    - cd usr; tar cf - lib include | (cd $prefix/i486-linux; tar xf - )

3. Get /lib
    - unpack Slackware a5/shlibs.tgz
    - tar cf - lib | (cd $prefix/i486-linux; tar xf - )

4. Get kernel includes
    - slackware k? series. Must also make the asm link
    - $prefix/i486-linux/include/asm-386 -> $prefix/i486-linux/include/asm

5. Get libgcc1.a and float.h for gcc
    - use libgcc.a and float.h from gcc includes

6. make gcc
    configure --target=i486-linux host=hpp1.1-hp-hpux9.05 \
	--prefix=/usr/local/xcompile/ --with-gnu-as --with-gnu-ld

    PROBLEMS making GCC:
    - g77: -DMISSING_FILE_ELEMS is not deduced properly on hppa1.1-hpux9.05
      host because the x-compiler is not used by configure properly.
      g77: float.h is checked in $builddir/include, not $builddir where
      gcc docs ask to put it

================

regards,
mumit -- khan@xraylith.wisc.edu
http://www.xraylith.wisc.edu/~khan/

Cc: gnu.gcc.help,
    David Grizzard  <dgrizza@relay.nswc.navy.mil> 
Technical Details
Message-ID: <4gg39q$urq@news.doit.wisc.edu>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <312B5AAE.46EA@relay.nswc.navy.mil>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,5b7749c52c13792d
X-Google-Attributes: gid11318c,public
From: khan@xraylith.wisc.edu (Mumit Khan)
Subject: Re: Help cross compiling
Date: 1996/02/21
Message-ID: <4gg39q$urq@news.doit.wisc.edu>
X-Deja-AN: 140491851
references: <312B5AAE.46EA@relay.nswc.navy.mil>
organization: Center for X-ray Lithography, UW-Madison
newsgroups: gnu.gcc.help