Subject: toolchain/16593: [dM] . early in path breaks cross-build
To: None <>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: netbsd-bugs
Date: 04/30/2002 18:47:42
>Number:         16593
>Category:       toolchain
>Synopsis:       [dM] . early in path breaks cross-build
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 30 15:48:00 PDT 2002
>Originator:     der Mouse
>Release:        NetBSD 1.5ZC
System: NetBSD mouse 1.5ZC NetBSD 1.5ZC (GENERIC) #1: Fri Apr 26 14:11:05 EDT 2002 mouse@Mouse.Rene.HyperChip.COM:/usr/src/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
	With . sufficiently early in the path, is unable to do
	a cross-build, because it runs the newly-built cross-as instead
	of the native as when compiling a host program.  (It probably
	runs the new as earlier than it should for native builds too,
	but I've not tried a build in circumstances where this would
	matter, such as across an incompatible as syntax change.)  This
	is known to happen with -U; I haven't tried it without.  Based
	on my investigation, I suspect it doesn't matter.
	On i386, with a -current source tree in /usr/src,
	mkdir /tmp/macppc-build /tmp/macppc-build/.obj
	cd /usr/src
	env PATH=:$PATH /usr/src/ -d -m macppc -D /tmp/macppc-build -O /tmp/macppc-build/.obj -U
	Similar failures have been seen with -m sun3.
	As a workaround, remove . from your path when cross-building.
	A proper fix would be for the build machinery to either remove
	relative path components or prepend the correct components to
	the path.  (The latter may be difficult on non-NetBSD machines,
	as it could be very hard to figure out what the correct path
	components are.)  Alternatively, it might be enough to have the
	build machinery produce an informative complaint and die
	gracefully instead of producing obscure errors about perfectly
	good assembly files.
 	(Source tree checked out starting sometime around
 	2002-04-29 04:00 UTC.)