[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dpkg thinks my pentium is an i486 ?

In an attempt to save the world from disaster, Joost Kooij wrote:
> On Mon, 2 Mar 1998, Marcus Brinkmann wrote:
> > Sorry, I missed the beginning of the thread, but these are the facts:
> > 
> > "uname -a" will report your machine type, the same as in "cat /proc/cpuinfo".
> > 
> > Then, when you compile, you can specify an architecture. This can be i386,
> > i486, i586 for intel. BUT all compiled programs by gcc will run on every
> > architecture. If you compile for i586, you still can run it on i386. The
> > only difference is the order of tha machine instructions. By default, no
> > i486 or i586 specific instructions will be used, it is all about
> > optimization. The programs may differ in speed and memory usage.
> Apparently, if you build a kernel for other than i386 (say, i486), it
> won't run on i386

Yes, but that is because of parts in the kernel that are coded in asm, not
in C. The kernel hackers do real tricky things, and they are i{3,4,5}86
specific. But the code gcc creates (from C input files) is 
(at the moment at least) not specific to i{3,4,5}86 -- all gcc is able to
do is to optimize for one processor.

> > If I missed the topic of the thread, please tell. Maybe I also know the
> > answer of the original question ;)
> Well, I was experimenting with builing packages from source and I noticed
> that they were compiled for i486. The rules file calls 
>  dpkg --print-gnu-build-architecture
> to determine the machine. 

Yes, I think this is because dpkg cannot be sure that
  - gcc in the future still produces binaries that run on i486 when
    i586 is specified
  - gcc is compiling the stuff. Maybe some completely other compiler is
    creating the objects, and maybe that compiler can produce i{3,4,5}86 
    specific code. (i.e. code that doesn't run on i386 when optimised
    for i586).
So, with these considerations, I agree that dpkg should (on the intel)
always return "i386". I believe that the reason for dpkg to return "i486"
is that at the moment at least, there are still no compatibility problems
(code optimised for i486 will run on any intel >= i386). So "we" were free
to choose between i{3,4,5}86 as the machine dpkg returns. Appartenly
i486 was chosen.

Oh, and of cource dpkg should never make the machine type depend on
the specific architecture you have: if you have a i386, dpkg-buildpackage
should build exactly the same package as dpkg-buildpackage on my i586.
(whatever processor a maintainer has does not influence the type of
processor the package will eventually be run on. So the whole "intel"
architecture should have one type of processor-optimisation).

> I wondered why it sees my i586 as a i486.

Well, because not everybody has a i586. The i486 was chosen as the
porcessor to best represent the intel architecture (note that this was
done some time ago). And we (every "intel" maintainer) should optimise
his packages for the same architecture.

joost witteveen, joostje@debian.org

The upstream maintainer is allowed to do things different 
than Debian, but only if he has good reasons to do so.

TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .

Reply to: