Subject: Re: obj.${MACHINE_ARCH} etc
To: None <eeh@netbsd.org>
From: Ben Harris <bjh21@netbsd.org>
List: tech-userlevel
Date: 04/18/2001 17:29:09
On 18 Apr 2001 eeh@netbsd.org wrote:

>
> 		It would seem that the vast majority of Makefiles should be able
> 		to share on ${MACHINE_ARCH}. Would it make sense to have the
> 		default be ${MACHINE_ARCH} and override to ${MACHINE}?
>
> This would break on sparc ports, where MACHINE is either `sparc' or
> `sparc64' depending on the CPU and MACHINE_ARCH is either `sparc' or
> `sparc64' depending on the ABI in use.

Aren't things already broken there, since you're currently using
obj.sparc64 for both values of MACHINE_ARCH?  As far as I can see, this
can only be fixed by changing where make looks for objdirs to include both
the MACHINE and the MACHINE_ARCH in the name.

My proposal would (I think) work reasonably well in the OBJDIRSUFFIX ==
${MACHINE_ARCH} case, but you'd have to be using a separate obj tree, and
run "make obj" between builds with different ABIs (to flip the
obj.sparc64 link over).  You'd still have your current problem in
OBJDIRSUFFIX == ${MACHINE} dirs.

I suppose we could avoid the need for an obj tree by making using a
different name for the MACHINE_ARCH objdirs, say obj.arch.${MACHINE_ARCH}.

> I suppose we could change the 64-bit MACHINE_ARCH to `sparcv9' but
> that would cause certain disruption.

That would also solve the problem, as long as you never build with
MACHINE == sparc, MACHINE_ARCH == sparc64.

-- 
Ben Harris                                                   <bjh21@netbsd.org>
Portmaster, NetBSD/arm26               <URL:http://www.netbsd.org/Ports/arm26/>