public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: support of older compilers
@ 2004-11-04 22:49 Xose Vazquez Perez
  0 siblings, 0 replies; 59+ messages in thread
From: Xose Vazquez Perez @ 2004-11-04 22:49 UTC (permalink / raw)
  To: linux-kernel

Linus Torvalds wrote:

> Your "use new versions of gcc even if it is slower" argument doesn't make 
> any _sense_. If the new versions aren't any better, why would you want to 
> use them?

Maybe because older gccs are not maintained, only 3.3.x 3.4.x and 4.0.0.

_Unless_ you have a long life time distribution (aka SLES, RHEL or clones).

--
TLOZ OOT: worse than drugs.



^ permalink raw reply	[flat|nested] 59+ messages in thread
[parent not found: <2Xj2s-5vj-33@gated-at.bofh.it>]
* Re: support of older compilers
@ 2004-11-06  9:07 Clayton Weaver
  2004-11-09 17:39 ` Nix
  0 siblings, 1 reply; 59+ messages in thread
From: Clayton Weaver @ 2004-11-06  9:07 UTC (permalink / raw)
  To: linux-kernel

>You found a compiler bug, so you reported
>it as a bug against
>glibc?

You don't think it's possible that a glibc bug
could cause unexpected behavior in a gcc that is
using the glibc libraries?

I assure you it is. gcc-2.95.3 failed compiling
file.c from strace-4.4.1 when running with glibc-2.3.2
as it's libc, while it compiles it just fine when
running with glibc-2.2.5 as it's libc. (I included
this information and the compile log in my bug
report to the linux distributor.)

I don't know whether glibc-2.3.2 *really*
had the bug or whether gcc-2.95.3 had some
dodgy workaround for a bug in earlier glibc2
versions that fixing a bug in glibc-2.3.2
then exposed. Or if any of the glibc vendor
patches were involved (something that should
probably be sorted out before deciding to
file the bug report to gcc-bug@, so as not
to unnecessarily waste the time of gcc
maintainers).

Anyway, that's kind of beside the point.
It was merely an example of how a user
might come to decline an "obvious" gcc upgrade.

I guess what I was trying to say is that users
compiling the kernel with older gcc versions is
less a function of user perversity in refusing to
modernize their tools than it is a result of focus.

What problem is the user trying to solve while
using linux? Solving problems usually requires
eliminating variables that may present obstacles
to arriving at a solution, whether that solution
is working production code, some statistical result,
a document that displays correctly, correctly routed
network flows, whatever.

So users arrive at a relatively stable compiler,
they stop upgrading and use that. They find a
kernel that stays up for a week with no oops
reports or other wierdness, they use that. They
will periodically upgrade the compiler, libc,
kernel, etc, when they have a little spare time,
to take advantage of security fixes, new features,
better performance, whatever, *as long as the upgrade
does not become another variable in the problem that
the user is trying to solve*.

If it does turn out to be a variable (unstable
or in some other way unreliable), they toss it
and go back to the old version, because eliminating
variables until they arrive at the solution to their
problem is what they do. Any other method ends up
in combinatorial hell, and they never find a solution
to their problem except by luck.

Many are quite willing to test new versions, report
bugs, send in patches, etc, just to contribute, but
if their main focus is on other problems, they go back
to the  last stable version right away for their
everyday work.

This is not perverse, selfish, or uncooperative
behavior, it's merely normal problem-solving
methodology. On what basis would one expect
anything else from such a large user base?

-- 
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm


^ permalink raw reply	[flat|nested] 59+ messages in thread
* Re: support of older compilers
@ 2004-11-04 19:33 Clayton Weaver
  2004-11-05 15:36 ` Nix
  0 siblings, 1 reply; 59+ messages in thread
From: Clayton Weaver @ 2004-11-04 19:33 UTC (permalink / raw)
  To: linux-kernel

>If people are willing to download and compile
>a new kernel (and migrating from 2.4 to 2.6
>is non-trivial for some systems, like RH9),
>why aren't they willing to also download
>and build a new compiler?

It is not necessarily that they are unwilling,
it is a question of trust (in the output
of the compiler) and of the inconvenience of
multiple concurrent gcc version installations
(paths; hint: this needs to be simpler).

Example:

I've been using gcc-2.95.3 with a security-patched
glibc-2.2.5, and I wanted to upgrade to glibc-2.3.2
(lots of bugs gone and more Posix/SUS compliance
added in the years in between 2.2.5 and 2.3.2).

For that I needed gcc-3.x. So, in succession,
I downloaded and compiled gcc-3.3.2, 3.4.0, and 3.4.1,
against both glibc-2.2.5 and glibc-2.3.2, with the
latest binutils at the time (which works with any
of those compiler and glibc versions).

I found that none of the gcc 3.x versions could
correctly compile a construct like this
(independent of runtime glibc version):

file1.h:

/* header boilerplate to avoid multiple #includes of
   the same file */

#define STR1  "string 1"

file2.c:

#include "file1.h"

const char * str2 = "whatever"STR1"stuff this\n\
string has in it"STR1" and so on ad infinitum\n\
"STR1"yada yada"; 

/* this was actually about 40 lines, maybe more,
   with maybe 10 instances of "../"STR1"..." */

All of the gcc-3.x versions would bail with
an error trying to compile that str2 definition
in file2.c.

They didn't always fail on literal string
concatenation (IIRC some short ones compiled
ok), but they consistently failed to concatenate
literal strings correctly for some source
files that gcc-2.95.3 would compile correctly
every time.

(The glibc trees had distributor patches, so I filed
the bug report via their support, in order for
them to see whether their patches were responsible
for the error, assuming that they would forward
it on if not.)

In sum: for production code it doesn't matter
what all a new C compiler version can do that
the old one could not if it won't compile
quite ordinary standard C correctly.

"So what else is wrong with it that we
aren't seeing?"

It would be good to have bugs fixed in the
new compilers, because they obviously have
some advantages (I noticed that gcc-3.4.x
seemed quite a bit faster than 2.95.3 when
compiling glibc, and it would nice if as
no longer randomly choked on the x86 code
generated after using -fprofile-arcs and
-fbranch-probabilities, something that
occasionally happens with gcc-2.95.3).

But one does occasionally need to get some
other work done besides new compiler
development.

-- 
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm


^ permalink raw reply	[flat|nested] 59+ messages in thread
* support of older compilers
@ 2004-11-03 21:02 Timothy Miller
  2004-11-03 21:13 ` Christoph Hellwig
  2004-11-03 21:17 ` Matti Aarnio
  0 siblings, 2 replies; 59+ messages in thread
From: Timothy Miller @ 2004-11-03 21:02 UTC (permalink / raw)
  To: Linux Kernel Mailing List

I'm just curious about why there seems to be so much work going into 
supporting a wide range of GCC versions.  If people are willing to 
download and compile a new kernel (and migrating from 2.4 to 2.6 is 
non-trivial for some systems, like RH9), why aren't they willing to also 
download and build a new compiler?


^ permalink raw reply	[flat|nested] 59+ messages in thread

end of thread, other threads:[~2004-11-09 17:39 UTC | newest]

Thread overview: 59+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-04 22:49 support of older compilers Xose Vazquez Perez
     [not found] <2Xj2s-5vj-33@gated-at.bofh.it>
2004-11-06 10:15 ` Anton Ertl
  -- strict thread matches above, loose matches on Subject: below --
2004-11-06  9:07 Clayton Weaver
2004-11-09 17:39 ` Nix
2004-11-04 19:33 Clayton Weaver
2004-11-05 15:36 ` Nix
2004-11-03 21:02 Timothy Miller
2004-11-03 21:13 ` Christoph Hellwig
2004-11-03 21:22   ` Chris Wedgwood
2004-11-03 23:06   ` Adam Heath
2004-11-03 23:30     ` Chris Wedgwood
2004-11-04 16:50       ` Adam Heath
2004-11-04 17:00         ` Chris Friesen
2004-11-04 18:17           ` Adam Heath
2004-11-05 20:00             ` Willy Tarreau
2004-11-05 20:28               ` Geert Uytterhoeven
2004-11-05 20:31                 ` Willy Tarreau
2004-11-04 17:04         ` Valdis.Kletnieks
2004-11-04 18:15           ` Adam Heath
2004-11-04 18:31             ` Valdis.Kletnieks
2004-11-04 21:56               ` Adam Heath
2004-11-04 18:54             ` Ian Romanick
2004-11-04 19:48             ` Christoph Hellwig
2004-11-04 20:14               ` Giuseppe Bilotta
2004-11-05 20:04               ` Willy Tarreau
2004-11-04 19:36           ` Ian Hastie
2004-11-04 20:02             ` Ioan Ionita
2004-11-04 20:03             ` Adrian Bunk
2004-11-04 20:08             ` Valdis.Kletnieks
2004-11-04 19:38         ` Linus Torvalds
2004-11-04 21:47           ` Adam Heath
2004-11-04 21:55             ` Linus Torvalds
2004-11-04 23:39               ` Adam Heath
2004-11-04 23:52                 ` Linus Torvalds
2004-11-05  1:41                   ` Andries Brouwer
2004-11-05 15:41                     ` Linus Torvalds
2004-11-05 15:47                       ` Arjan van de Ven
2004-11-05 16:22                         ` linux-os
2004-11-05 19:50                       ` Chris Wedgwood
2004-11-05 20:28                         ` Linus Torvalds
2004-11-05 21:59                           ` Grzegorz Kulewski
2004-11-05 22:08                             ` Linus Torvalds
2004-11-05 22:08                             ` Hua Zhong
2004-11-06  8:38                               ` Willy Tarreau
2004-11-06  9:43                                 ` Hugh Dickins
2004-11-06 11:04                                   ` Willy Tarreau
2004-11-06 12:07                       ` Andries Brouwer
2004-11-06 17:33                         ` Linus Torvalds
2004-11-06 19:36                           ` Adrian Bunk
2004-11-05 20:20                 ` Willy Tarreau
2004-11-05 22:19                   ` Adam Heath
2004-11-04 22:36             ` Martin J. Bligh
2004-11-04 20:48         ` Bill Davidsen
2004-11-04 22:33     ` Martin J. Bligh
2004-11-03 21:17 ` Matti Aarnio
2004-11-03 21:37   ` Giacomo A. Catenazzi
2004-11-03 21:57     ` Valdis.Kletnieks
2004-11-04  2:16       ` Miles Bader
2004-11-03 22:07     ` Chris Wedgwood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox