Subject: Re: pkg/19789: MACHINE_ARCH is i686, but Makefiles check for i386
To: grant beattie <>
From: Jan Schaumann <>
List: tech-pkg
Date: 01/11/2003 13:12:02
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

grant beattie <> wrote:
> On Sat, Jan 11, 2003 at 08:33:03AM -0800, wrote:
> > I just don't know where the LOWER_ARCH and MACHINE_ARCH are set.
> > 
> > I think the fix is to use
> > 
> > sed -e 's/[456]86/386/'
> I was also thinking about how to handle to Linux stuff.
> Perhaps we should globally squash i[3-6]86 into i386.

Yes, I think so.  At least, I can't think of any reason why or when we'd
do i[456]86 stuff differently form i386.

Since MACHINE_ARCH is determined at compile-time for bmake, we can
choose to either change it right then, or compile in the specific
version and override it in  If nobody can think of a
reason why we'd want to keep it in the binary, I think we should change
it there (as attached).

> Kernel versions could also be truncated eg. 2.4.10 -> 2.4, as binaries
> should be compatible (I'm guessing, someone please correct me I am
> wrong).

I think that binaries are supposed to be compatible, but we still might
want to keep OS_VERSION accurate.  It's conceivable that one kernel
version has some terrible flaw that would prevent a package from being
usable or secure, and I think we rarely check for OS_VERSION anyway, so
that it won't have a big impact one way or the other.


This one's tricky. You have to use imaginary numbers, like eleventeen...

Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=diff

RCS file: /cvsroot/othersrc/bootstrap-pkgsrc/bmake/,v
retrieving revision 1.2
diff -b -u -r1.2
---	2002/11/17 09:17:59	1.2
+++	2003/01/11 18:05:41
@@ -57,6 +57,9 @@
 	MACHINE_ARCH=`uname -p 2>/dev/null`
+	MACHINE_ARCH=`echo $machine | sed -e 's/[456]86/386/'`
+	;;