FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 05-15-2011, 12:08 PM
Mike Hommey
 
Default Debian x86 32-bits built for i586 !?

Hi,

I just found out that gcc is compiled with --with-arch-32=i586, which
effectively means it builds with -march=i586 by default (and that it
still claims an i486-linux-gnu target).

I'm wondering. Is the project at large aware that we're not building for
i486, but for i586 ? That even the maintainer doesn't know why for
sure[1] and that no changelog entry documents when or why that happened?
(nothing in debian/changelog, and the corresponding svn commit says
"Update to SVN 20100625 (r161383) from the gcc-4_5-branch.")
And that as far as I can see, this hasn't been discussed or documented
in the released notes?

Mike

1. See the following message from bug 609690:

On Tue, Jan 11, 2011 at 05:20:32PM +0100, Matthias Klose wrote:
> On 11.01.2011 16:38, Petr Salinger wrote:
> >Package: gcc-4.4
> >Version: 4.4.5-8
> >
> >Hi,
> >
> >the current gcc-4.4 uses (tested on i386/4.4.5-6 and kfreebsd-i386/4.4.5-8)
> >as a default arch i586.
> >COLLECT_GCC_OPTIONS='-v' '-dD' '-E' '-mtune=generic' '-march=i586'
> >
> >echo "" | gcc-4.4 -dD -x c -E - | grep 86
> >
> >#define __DBL_MAX__ 1.7976931348623157e+308
> >#define __i386 1
> >#define __i386__ 1
> >#define i386 1
> >#define __i586 1
> >#define __i586__ 1
> >
> >It is due to debian/rules2:
> >
> >ifneq (,$(filter $(DEB_TARGET_ARCH), amd64 i386 kfreebsd-i386 kfreebsd-amd64))
> >#CONFARGS += --with-arch-32=i486
> >ifeq ($(distribution),Ubuntu)
> >CONFARGS += --with-arch-32=i686
> >else
> >CONFARGS += --with-arch-32=i586
> >endif
> >endif
> >
> >
> >I believe, that even plain i486 have to be supported,
> >also changelog claims that default should still be i486.
>
> yes, I think I did change that to avoid libgomp failures, which
> requires i586, and not just i486. Not sure what to do about that
> for squeeze.
>
> $ apt-cache rdepends libgomp1 | wc -l
> 77
>
> So all these packages would need setting of the -march flag explicitly.
>
> There are other packages which do require i586, like OpenJDK.
>
>
>


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110515120800.GA10063@glandium.org">http://lists.debian.org/20110515120800.GA10063@glandium.org
 
Old 05-15-2011, 12:28 PM
Henrique de Moraes Holschuh
 
Default Debian x86 32-bits built for i586 !?

On Sun, 15 May 2011, Mike Hommey wrote:
> I just found out that gcc is compiled with --with-arch-32=i586, which
> effectively means it builds with -march=i586 by default (and that it
> still claims an i486-linux-gnu target).
>
> I'm wondering. Is the project at large aware that we're not building for
> i486, but for i586 ? That even the maintainer doesn't know why for

No. And unless we got a bug report form an i486 user, our users
probably didn't notice it either.

What are the *exact* differences between code generated for march=i486
to code generated for march=i586? What CPUs would break?

> > >I believe, that even plain i486 have to be supported,
> > >also changelog claims that default should still be i486.
> >
> > yes, I think I did change that to avoid libgomp failures, which
> > requires i586, and not just i486. Not sure what to do about that
> > for squeeze.
> >
> > $ apt-cache rdepends libgomp1 | wc -l
> > 77
> >
> > So all these packages would need setting of the -march flag explicitly.
> >
> > There are other packages which do require i586, like OpenJDK.

We may well consider switching the i386 port to i586. But lets access
the real impact, first. And whether we still have enough *active* i486
users (or i586-like CPUs that do not support gcc march=i586 if such a
thing could happen) to care.

--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110515122805.GC32677@khazad-dum.debian.net">http://lists.debian.org/20110515122805.GC32677@khazad-dum.debian.net
 
Old 05-15-2011, 01:36 PM
Ben Hutchings
 
Default Debian x86 32-bits built for i586 !?

On Sun, 2011-05-15 at 09:28 -0300, Henrique de Moraes Holschuh wrote:
> On Sun, 15 May 2011, Mike Hommey wrote:
> > I just found out that gcc is compiled with --with-arch-32=i586, which
> > effectively means it builds with -march=i586 by default (and that it
> > still claims an i486-linux-gnu target).
> >
> > I'm wondering. Is the project at large aware that we're not building for
> > i486, but for i586 ? That even the maintainer doesn't know why for
>
> No. And unless we got a bug report form an i486 user, our users
> probably didn't notice it either.
>
> What are the *exact* differences between code generated for march=i486
> to code generated for march=i586? What CPUs would break?
[...]

There are a few new instructions on the Pentium that can be used in ring
3: cmpxchg8 and rdtsc. Linux has separate options for '586' and '586
with TSC', both of which result in -m586, so gcc does not appear to
assume the existence of rdtsc. I would not expect gcc to generate
cmpxchg8 except through an intrinsic, but I could be wrong.

Ben.

--
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.
 
Old 05-15-2011, 02:39 PM
Henrique de Moraes Holschuh
 
Default Debian x86 32-bits built for i586 !?

On Sun, 15 May 2011, Ben Hutchings wrote:
> On Sun, 2011-05-15 at 09:28 -0300, Henrique de Moraes Holschuh wrote:
> > On Sun, 15 May 2011, Mike Hommey wrote:
> > > I just found out that gcc is compiled with --with-arch-32=i586, which
> > > effectively means it builds with -march=i586 by default (and that it
> > > still claims an i486-linux-gnu target).
> > >
> > > I'm wondering. Is the project at large aware that we're not building for
> > > i486, but for i586 ? That even the maintainer doesn't know why for
> >
> > No. And unless we got a bug report form an i486 user, our users
> > probably didn't notice it either.
> >
> > What are the *exact* differences between code generated for march=i486
> > to code generated for march=i586? What CPUs would break?
> [...]
>
> There are a few new instructions on the Pentium that can be used in ring
> 3: cmpxchg8 and rdtsc. Linux has separate options for '586' and '586
> with TSC', both of which result in -m586, so gcc does not appear to
> assume the existence of rdtsc. I would not expect gcc to generate
> cmpxchg8 except through an intrinsic, but I could be wrong.

Assuming we can't just do away with i486 support for now, did anyone track
down exactly what was causing breakages that forced the change from
march=486 to march=586?

--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110515143922.GB11131@khazad-dum.debian.net">http://lists.debian.org/20110515143922.GB11131@khazad-dum.debian.net
 
Old 05-15-2011, 05:47 PM
"brian m. carlson"
 
Default Debian x86 32-bits built for i586 !?

On Sun, May 15, 2011 at 09:28:05AM -0300, Henrique de Moraes Holschuh wrote:
> What are the *exact* differences between code generated for march=i486
> to code generated for march=i586? What CPUs would break?

With -march=i586, code will be generated that runs on a Pentium without
MMX (or later chips) instead of code that runs on any i486 or better.
The extra instructions are CMPXCHG8B, CPUID, RDMSR, WRMSR, RDTSC, and
MOV (when it's used with a control register)[0]. AIUI, some IDT
Winchips do not support these instructions either.

With -march=i486, the code will work on any 32-bit or 64-bit x86
processor other than the i386 itself. We originally switched to
generating code for the i486 because it was needed for certain C++
support in GCC and libstdc++, although that is no longer the case, IIRC.

The -march use, which specifies which instructions may be generated, is
different from -mtune, which specifies for which processor the
instructions are scheduled. -mtune has been set to i686 (since most
32-bit processors these days are i686) and tuning for the i586 is a bad
idea since it was designed for executing 16-bit code efficiently, not
32-bit code. I believe the -mtune value should remain i686.

[0] http://www.singlix.com/trdos/pentium.txt

--
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
 
Old 05-15-2011, 07:05 PM
Julien Cristau
 
Default Debian x86 32-bits built for i586 !?

On Sun, May 15, 2011 at 14:08:00 +0200, Mike Hommey wrote:

> I'm wondering. Is the project at large aware that we're not building for
> i486, but for i586 ? That even the maintainer doesn't know why for
> sure[1] and that no changelog entry documents when or why that happened?
> (nothing in debian/changelog, and the corresponding svn commit says
> "Update to SVN 20100625 (r161383) from the gcc-4_5-branch.")
> And that as far as I can see, this hasn't been discussed or documented
> in the released notes?
>
To the best of my knowledge neither the release managers nor the release
notes editors for squeeze were notified of this change.

Cheers,
Julien


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110515190558.GY2809@radis.liafa.jussieu.fr">http ://lists.debian.org/20110515190558.GY2809@radis.liafa.jussieu.fr
 
Old 05-15-2011, 07:48 PM
Raphael Hertzog
 
Default Debian x86 32-bits built for i586 !?

On Sun, 15 May 2011, Henrique de Moraes Holschuh wrote:
> On Sun, 15 May 2011, Mike Hommey wrote:
> > I'm wondering. Is the project at large aware that we're not building for
> > i486, but for i586 ? That even the maintainer doesn't know why for
>
> No. And unless we got a bug report form an i486 user, our users
> probably didn't notice it either.

I used Debian on some embedded computers based on this processor:
http://www.vortex86sx.com

cat /proc/cpuinfo reports "486"

But I have not tried Squeeze yet. So it's possible that other users have
not found the problem yet.

Cheers,
--
Raphaël Hertzog ◈ Debian Developer

Follow my Debian News ▶ http://RaphaelHertzog.com (English)
▶ http://RaphaelHertzog.fr (Français)


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110515194842.GC32625@rivendell.home.ouaza.com">h ttp://lists.debian.org/20110515194842.GC32625@rivendell.home.ouaza.com
 
Old 05-15-2011, 09:45 PM
David Goodenough
 
Default Debian x86 32-bits built for i586 !?

On Sunday 15 May 2011, Raphael Hertzog wrote:
> On Sun, 15 May 2011, Henrique de Moraes Holschuh wrote:
> > On Sun, 15 May 2011, Mike Hommey wrote:
> > > I'm wondering. Is the project at large aware that we're not building
> > > for i486, but for i586 ? That even the maintainer doesn't know why for
> >
> > No. And unless we got a bug report form an i486 user, our users
> > probably didn't notice it either.
>
> I used Debian on some embedded computers based on this processor:
> http://www.vortex86sx.com
>
> cat /proc/cpuinfo reports "486"
>
> But I have not tried Squeeze yet. So it's possible that other users have
> not found the problem yet.
>
> Cheers,
I also run Debian on embedded computers mainly running SC1100 CPUs and
/proc/cpuinfo reports:-

processor : 0
vendor_id : AuthenticAMD
cpu family : 4
model : 9
model name : 486 DX/4-WB
stepping : 4

The kit may be over 8 years old, but it runs just fine and has been running
Debian stock kernels all its life. I would like to keep it that way.

David


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 201105152245.43104.david.goodenough@btconnect.com" >http://lists.debian.org/201105152245.43104.david.goodenough@btconnect.com
 
Old 05-16-2011, 01:32 AM
Ben Hutchings
 
Default Debian x86 32-bits built for i586 !?

On Sun, 2011-05-15 at 21:48 +0200, Raphael Hertzog wrote:
> On Sun, 15 May 2011, Henrique de Moraes Holschuh wrote:
> > On Sun, 15 May 2011, Mike Hommey wrote:
> > > I'm wondering. Is the project at large aware that we're not building for
> > > i486, but for i586 ? That even the maintainer doesn't know why for
> >
> > No. And unless we got a bug report form an i486 user, our users
> > probably didn't notice it either.
>
> I used Debian on some embedded computers based on this processor:
> http://www.vortex86sx.com
>
> cat /proc/cpuinfo reports "486"
>
> But I have not tried Squeeze yet. So it's possible that other users have
> not found the problem yet.

The kernel in 'lenny' was broken on 486 for 6 months after release
(#515982).

I think any claim that Debian supports 486-class processors is more of
an aspiration. What maintainer has the time to test on such antiques
regularly?

Ben.

--
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.
 
Old 05-16-2011, 01:36 AM
Russ Allbery
 
Default Debian x86 32-bits built for i586 !?

Ben Hutchings <ben@decadent.org.uk> writes:

> I think any claim that Debian supports 486-class processors is more of
> an aspiration. What maintainer has the time to test on such antiques
> regularly?

Yes, this isn't something that we're going to be able to really do without
automated tools that would detect problematic binaries. Without that, the
most that I suspect people will be able to do is fix problems that happen
to be stumbled upon by i486 users.

--
Russ Allbery (rra@debian.org) <http://www.eyrie.org/~eagle/>


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 87boz3l942.fsf@windlord.stanford.edu">http://lists.debian.org/87boz3l942.fsf@windlord.stanford.edu
 

Thread Tools




All times are GMT. The time now is 06:27 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org