Subject: toolchain/15386: crosscompile breaks due to missing #include "errno.h"
To: None <>
From: None <>
List: netbsd-bugs
Date: 01/27/2002 04:27:25
>Number:         15386
>Category:       toolchain
>Synopsis:       crosscompile breaks due to missing #include "errno.h"
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Jan 26 19:28:01 PST 2002
>Originator:     Reinoud Zandijk
>Release:        NetBSD 1.5ZA - current
a.out -current Shark crosscompiling ELF Acorn32 with -current sources.
An a.out shark crosscompiling for ELF Acorn32 coredumps in the crosscompiled nbmake
for the warning about errno isn't honoured...  This propably gives a linking assumption
that fails and the nbmake coredumps.

Just try to crosscompile with :
./ -a arm -m acorn32 -D /bigstuff/acorn32/snapshot/ -T /bigstuff/acorn32/toolset/ -O /bigstuff/acorn32/obj -R /bigstuff/acorn32/release/

And it will coredump and tell you this architecture isnt ready yet for ELF ...
and thats not true too ...
Apply the following patch to `fix' it ... Jason Thorpe suggested to look
at the #if defined(MAKE_BOOTSTRAP) && !defined(HAVE_STRERROR) line ...
I think it doesn't honour the crosscompiling under NetBSD correctly.

There is also assumptions made about the crosscompile env. that might
not be relevant nor nessisary ... I mean the MAKE_MACHINE nd MAKE_MACHINE_ARCH
that might give conflicts.

There is also no copyright information in that file ;)


Index: util.c
RCS file: /cvsroot/basesrc/usr.bin/make/util.c,v
retrieving revision 1.29
diff -u -p -r1.29 util.c
--- util.c      2002/01/27 01:50:55     1.29
+++ util.c      2002/01/27 03:16:31
@@ -4,6 +4,8 @@
  * Missing stuff from OS's
+#include "errno.h"
 static char rcsid[] = "$NetBSD: util.c,v 1.29 2002/01/27 01:50:55 reinoud Exp $";