Adrian Cox wrote: > Adam C Powell IV wrote: > > > Why not just include multiple optimized binaries for different arches in > separate > > dirs, e.g. /usr/lib/atlas-athlon etc., then use a postinst script to scan > > /proc/cpuinfo, move the appropriate libs into /usr/lib, and remove the dirs? > > This would cause problems in mixed-architecture clusters. Currently you > can use the same /usr for a PIII and an Athlon, or for a G3 and G4 > PowerPC. I wouldn't like to break that property, because it's very > useful for machines mounting /usr from a network or cluster filesystem.
Oh yeah, forgot about that. :-) > I'd much rather have a solution which was decided at boot time or > dynamically. For instance, an init script which dynamically changed > links in /etc/alternatives. But I do use the current ability to mount > /etc read-only, so perhaps we could have a new /var/alternatives > directory for alternatives selected at boot time? Hmm, why does it need to "dynamically" change links in /etc/alternatives? I guess the question is better asked this way: do people NFS-mount /etc?! (It's just 3 MB on my system!) If yes, then you're right, we'd need /var/alternatives, as that would have to be a local fs, right? If no, then installing any package involving /etc/alternatives on such a network involves hand-creating the links at *install time* (not boot time or run time) anyway, so what's the difference? Oh yeah, I guess that wouldn't survive a CPU up/downgrade, so you do need to select at boot time. Oh well. > > Does anyone know how Microsoft/Adobe/etc. ships software optimized for the > latest > > chips, which doesn't break on old ones? E.g. the Altivec instructions in > > Photoshop which only are exercized on G4s... > > If you're shipping an application, rather than a library, it's trivial > to decide at runtime which version to load. You can put all the CPU > dependent parts into shared libraries, and load the correct one when you > need to. Aha, and this is a shared library... Well, the static lib would have to be subarch-independent. So I like your /var/alternatives approach, but yes, it would require a policy modification. > This all breaks on a MOSIX cluster with mixed architecture. I guess > they're just too weird to live. That's too funny! Jens M�ller wrote: > ----- Original Message ----- > From: "Adrian Cox" <[EMAIL PROTECTED]> > To: <[email protected]> > Sent: Tuesday, August 01, 2000 5:55 PM > Subject: Re: developer release 3.1.2 > > > I'd much rather have a solution which was decided at boot time or > > dynamically. For instance, an init script which dynamically changed > > links in /etc/alternatives. But I do use the current ability to mount > > /etc read-only, so perhaps we could have a new /var/alternatives > > directory for alternatives selected at boot time? > > > Why not decide at start time? Replace the binary by a script which chooses > the correct binary... For a binary executable, sure, but the context of the discussion is ATLAS, a shared library, for which that would be impossible. -Adam P.

