Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Sep 2000 22:06:29 -0700 (PDT)
From:      Steve Kargl <sgk@troutmask.apl.washington.edu>
To:        Kris Kennaway <kris@FreeBSD.org>
Cc:        FreeBSD Current <freebsd-current@FreeBSD.org>
Subject:   Re: upgrade libgmp?
Message-ID:  <200009170506.WAA07848@troutmask.apl.washington.edu>
In-Reply-To: <Pine.BSF.4.21.0009162128540.6857-100000@freefall.freebsd.org> from Kris Kennaway at "Sep 16, 2000 09:31:22 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
Kris Kennaway wrote:
> On Sat, 16 Sep 2000, Steve Kargl wrote:
> 
> > I'm not fluent in FSF configure scripts, but it looks like
> > configure tests the compiler for specific features to determine
> > CPU type.  The gross hack would be to add CPU_TYPE="generic"
> > to /etc/defaults/make.conf, and allow users to define CPU_TYPE
> > in /etc/make.conf.  It appears that for example CPU_TYPE="alpha"
> > is insufficient because each cpu type 21064, 21164, 21264 has
> > tuned asm code.  The bmake file would then have a cascade of
> > #ifdef CPU_TYPE to pull in the right code.
> > 
> > Would a CPU_TYPE variable be useful for others parts of "make world"?
> 
> The issue is that you have all sorts of possibilities like i386, i486,
> pentium, pentiumpro, pentiummmx, k6, ... which you need to specify in
> order of preference. If someone would care to submit example code of how
> to handle this nicely from both the user and makefile perspective I'd be
> grateful :-)
> 

I need to review the gmp documents again, but I not sure
the preference order is much of an issue.  By default,
CPU_TYPE="generic" would build the C code, which should work
on all architectures supported by FreeBSD.  If a user explicitly
sets CPU_TYPE in /etc/make.conf, then the ordering would be
CPU_TYPE then generic.  There is not gray area.  For example,
I have an athlon processor, so libgmp.a would have a preferred
order of athlon, generic.

The question that I don't know the answer to is what happens if
someone really screws up and sets CPU_TYPE to 21264 when
he has an i386.  I suspect that this would break make world, so
it will be easily detected.

Another possibility would be to specify the preference order
in a CPU_ORDER variable.  For example, CPU_ORDER="k6,i386,pentium"
and always add "generic" has the last target.  The major problem
with this is that the parsing of CPU_ORDER suggests that you have
to generate Makefile on the fly otherwise Makefile would be a
big bowl of spaghetti.

-- 
Steve


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200009170506.WAA07848>