Subject: Buildung Tools on SGI IRIX
To: None <>
From: Jochen Kunz <>
List: tech-toolchain
Date: 10/27/2003 20:41:38

I tried to build the hppa cross tools on my SGI Octane running IRIX
6.5.20 today. Things needed to get it started:
1. Install GCC and link /usr/freeware/bin/gcc to /usr/freeware/bin/cc.
2. Install bash and link /usr/freeware/bin/bash to /usr/freeware/bin/sh.
3. Move /usr/freeware/bin to the beginning of $PATH so that nbmake uses
/usr/freeware/bin/sh as shell.
4. Hack tools/make/ as IRIX has no (real) vfork:
> : ${HOST_CFLAGS="@CPPFLAGS@ @CFLAGS@ -Dvfork=fork"}
5. Change to run with /usr/freeware/bin/bash

Then it will get to the point:
cc -O  -I. -I./include -I/bigtmp/src/NetBSD/src-current/src/tools/compat
-D__DBINTERFACE_PRIVATE -c -o getopt_long.lo.o
/bigtmp/src/NetBSD/src-current/src/lib/libc/stdlib/getopt_long.c: In
function `getopt_long':
invalid use of undefined type `struct option'
dereferencing pointer to incomplete type
etc. etc. etc.

This is just a note, I have no motivation and time to investigate this.
Unfortunately all my fast NetBSD machines are 64 bit and X building from
LP64 to LP32 triggers funky gcc bugs. So I am building the new tools on
my good, old RS/6000 43P-100 (100 MHz PPC604) running NetBSD 1.6 now.
It's slow, but works.