Subject: Buildung Tools on SGI IRIX
To: None <tech-toolchain@NetBSD.org>
From: Jochen Kunz <jkunz@unixag-kl.fh-kl.de>
List: tech-toolchain
Date: 10/27/2003 20:41:38
Hi.

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/buildmake.sh.in as IRIX has no (real) vfork:
< : ${HOST_CFLAGS="@CPPFLAGS@ @CFLAGS@"}
---
> : ${HOST_CFLAGS="@CPPFLAGS@ @CFLAGS@ -Dvfork=fork"}
5. Change build.sh 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
-DHAVE_NBTOOL_CONFIG_H=1  -D_FILE_OFFSET_BITS=64 -D_NETBSD_SOURCE
-D__DBINTERFACE_PRIVATE -c -o getopt_long.lo.o
/bigtmp/src/NetBSD/src-current/src/lib/libc/stdlib/getopt_long.c
/bigtmp/src/NetBSD/src-current/src/lib/libc/stdlib/getopt_long.c: In
function `getopt_long':
/bigtmp/src/NetBSD/src-current/src/lib/libc/stdlib/getopt_long.c:401:
invalid use of undefined type `struct option'
/bigtmp/src/NetBSD/src-current/src/lib/libc/stdlib/getopt_long.c:401:
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.
-- 


tschüß,
       Jochen

Homepage: http://www.unixag-kl.fh-kl.de/~jkunz/