Subject: Re: bin/30379
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: Rui Paulo <rpaulo@netbsd-pt.org>
List: netbsd-bugs
Date: 05/30/2005 20:18:01
The following reply was made to PR bin/30379; it has been noted by GNATS.

From: Rui Paulo <rpaulo@netbsd-pt.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/30379
Date: Mon, 30 May 2005 21:15:49 +0100

 file(1) is not recognizing binary files correctly because you built your
 userland on a little-endian machine. There should be a way to solve this
 problem as _every_ port is affected if the endianess of the build host
 is different (the releng machine is little-endian).
 
 As a workaround, besides reinstalling file on the host, you could use
 file -C.
 
 I first saw this on port-sparc64 mailing list.
 
 Who can we solve this problem ? 
 Possible solutions:
 	1) add an rc.d script so that it generates the magic file on
 	every startup;
 	2) add a flag to file(1) so that you can choose between little
 	or big endian;
 	3) make the file(1) magic file endian-independant.
 
 Personally, I think 3) is kind of impossible, so I'd for 2).
 
 --
 Rui Paulo <rpaulo@netbsd-pt.org>