Subject: bin/23211: usr.bin/hexdump doesn't crossbuild
To: None <gnats-bugs@gnats.netbsd.org>
From: None <dmcmahill@netbsd.org>
List: netbsd-bugs
Date: 10/20/2003 19:49:13
>Number:         23211
>Category:       bin
>Synopsis:       usr.bin/hexdump doesn't crossbuild
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 20 23:50:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Dan McMahill
>Release:        NetBSD 20031020
>Organization:
NetBSD
>Environment:
	
	
	Solaris-2.6 with gcc-2.95.1
System: NetBSD bondage 1.6.1 NetBSD 1.6.1 (BONDAGE) #0: Mon Apr 21 18:28:45 EDT 2003 dan@bondage:/export/disk1/src/src-netbsd-1-6-1/sys/arch/alpha/compile/BONDAGE alpha
Architecture: alpha
Machine: alpha
>Description:

when trying to crossbuild netbsd from solaris-2.6 with gcc-2.95.1, I gots lots of complaints
on usr.bin/hexdump while the tools are builng build about __P not being defined.

	
>How-To-Repeat:
	
	 env HOST_CC=gcc ./build.sh -m sparc64 -T /export/home1/software/build/tools -D /export/home1/software/build/destdir.sparc64 -R /export/home1/software/build/release/sparc64 -u release

wait for hexdump, then lose.

>Fix:
pull in config.h to the .c files.  Seems to work for me, but this isn't my work 
area.

cvs server: Diffing usr.bin/hexdump
Index: usr.bin/hexdump/conv.c
===================================================================
RCS file: /cvsroot/src/usr.bin/hexdump/conv.c,v
retrieving revision 1.9
diff -u -2 -r1.9 conv.c
--- usr.bin/hexdump/conv.c	2003/08/07 11:14:02	1.9
+++ usr.bin/hexdump/conv.c	2003/10/20 23:40:25
@@ -39,4 +39,8 @@
 #endif /* not lint */
 
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <sys/types.h>
 
Index: usr.bin/hexdump/display.c
===================================================================
RCS file: /cvsroot/src/usr.bin/hexdump/display.c,v
retrieving revision 1.16
diff -u -2 -r1.16 display.c
--- usr.bin/hexdump/display.c	2003/09/12 12:59:34	1.16
+++ usr.bin/hexdump/display.c	2003/10/20 23:40:25
@@ -39,4 +39,8 @@
 #endif /* not lint */
 
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <sys/param.h>
 #include <sys/stat.h>
Index: usr.bin/hexdump/hexdump.c
===================================================================
RCS file: /cvsroot/src/usr.bin/hexdump/hexdump.c,v
retrieving revision 1.10
diff -u -2 -r1.10 hexdump.c
--- usr.bin/hexdump/hexdump.c	2003/08/07 11:14:03	1.10
+++ usr.bin/hexdump/hexdump.c	2003/10/20 23:40:25
@@ -44,4 +44,8 @@
 #endif /* not lint */
 
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <sys/types.h>
 
Index: usr.bin/hexdump/hexsyntax.c
===================================================================
RCS file: /cvsroot/src/usr.bin/hexdump/hexsyntax.c,v
retrieving revision 1.10
diff -u -2 -r1.10 hexsyntax.c
--- usr.bin/hexdump/hexsyntax.c	2003/08/07 11:14:05	1.10
+++ usr.bin/hexdump/hexsyntax.c	2003/10/20 23:40:25
@@ -39,4 +39,8 @@
 #endif /* not lint */
 
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <sys/types.h>
 
Index: usr.bin/hexdump/odsyntax.c
===================================================================
RCS file: /cvsroot/src/usr.bin/hexdump/odsyntax.c,v
retrieving revision 1.18
diff -u -2 -r1.18 odsyntax.c
--- usr.bin/hexdump/odsyntax.c	2003/08/07 11:14:05	1.18
+++ usr.bin/hexdump/odsyntax.c	2003/10/20 23:40:25
@@ -39,4 +39,8 @@
 #endif /* not lint */
 
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <sys/types.h>
 
Index: usr.bin/hexdump/parse.c
===================================================================
RCS file: /cvsroot/src/usr.bin/hexdump/parse.c,v
retrieving revision 1.15
diff -u -2 -r1.15 parse.c
--- usr.bin/hexdump/parse.c	2003/08/07 11:14:05	1.15
+++ usr.bin/hexdump/parse.c	2003/10/20 23:40:25
@@ -39,4 +39,8 @@
 #endif /* not lint */
 
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <sys/types.h>
 #include <sys/file.h>
	
>Release-Note:
>Audit-Trail:
>Unformatted: