public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tim Riker <Tim@Rikers.org>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: non-gcc linux? (was Re: Where did kgcc go in 2.4.0-test10?)
Date: Thu, 02 Nov 2000 11:55:55 -0700	[thread overview]
Message-ID: <3A01B8BB.A17FE178@Rikers.org> (raw)
In-Reply-To: <20001101234058.B1598@werewolf.able.es> <200011012345.PAA20284@pizda.ninka.net> <20001101172100.A5081@fsmlabs.com> <200011020011.QAA20585@pizda.ninka.net> <8tqcng$d8p$1@cesium.transmeta.com>

All,

Alright, I've been lurking long enough on this thread. What say we
consider the option of building the kernel with a compiler other than
gcc? This would imply a slightly different structure to the makefiles
and code.

There are two immediate reasons I can come up with for this:

1. There are architectures where some other compiler may do better
optimizations than gcc. I will cite some examples here, no need to argue
out the point unless you disagree with the POSSIBILITY that this may be
true on at least one architecture. Anyway, possibilities include
Compaq's compiler on alpha, HP's compiler on hppa, Intel's compiler (or
rather plugins to another vendors compiler) on ia64, Metrowerk's
compiler on PPC, etc.

2. There are architectures where gcc is not yet available, but vendor C
compilers are.

I suggest that we avoid gcc extensions as much as possible, barring
performance hits. When there is an ANSI way of doing things we should
choose that route. Where there is not, then isolate the gcc way such
that compiler vendors can either:

1. implement the gcc way and conditional compile that code.

2. implement some other way and easily add that conditional code.

I've been looking into this here at Lineo for some of these vendors.
Here is a brief list of things I've come across:

1. C++ style comments

Occurs in over 4000 lines of source and header files. :-( Should be
converted to ansi c comments? We will probably want to just skirt this
issue for now as the next rev of ANSI C is likely to include ANSI C++
style comments.

2. Inline assembly statements

mostly in arch/ tree. Frequently used in macros as well. Much of this
will incur performance penalties if moved to external assembly files.
Some would require moving supported C code over as well. Hence many of
these will probably translate into conditional compilation based on the
compiler to avoid and performance hit for the mainstream case.

3. Declaring attributes of functions

The __attribute__ options: noreturn, const, format, section,
constructor, destructor, unused, and  weak. weak and section are needed.
The rest can be ignored? These might want to be converted to #defines
such that alternative compilers can implement them differently.

4. Specifying attributes of variables

The __attribute__ options: aligned, packed, section and weak. As above
these will likely be #defines to handle different compiler syntax.

5. Conditionals with omitted operands

The missing operands should just be added into the mainstream source.

6. Referring to a type with typeof

no recommendation yet.

7. Macros with variable numbers of arguments

no recommendation yet.

8. Inquiring on alignment of types or variables (__alignof__)

no recommendation yet.

Well, I got a bit more long winded than I planned, but there it is.
Thoughts?

"H. Peter Anvin" wrote:
> 
> Followup to:  <200011020011.QAA20585@pizda.ninka.net>
> By author:    "David S. Miller" <davem@redhat.com>
> In newsgroup: linux.dev.kernel
> >
> > We already know we are a bunch of pinheads wrt. the userland compiler
> > issue, full stop.  It need not be restated several hundred more times.
> > Believe me, after such a large fiasco, we have listened :-)
> >
> > But, on the other hand, to say that "kgcc" comceptually is something
> > only Red Hat has ever done is a factual error, that is all I am trying
> > to state, nothing more.
> >
> 
> I think at least supporting a "kgcc" compiler makes sense,
> conceptually (although it probably should have been called "kcc", but
> it's too late now.)
> 
> The kernel uses a lot of gcc extensions, and history shows that these
> extensions aren't as stable as the compiler system as a whole.
> 
>         -hpa
-- 
Tim Riker - http://rikers.org/ - short SIGs! <g>
All I need to know I could have learned in Kindergarten
... if I'd just been paying attention.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

  parent reply	other threads:[~2000-11-02 19:02 UTC|newest]

Thread overview: 109+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-01 22:40 Where did kgcc go in 2.4.0-test10 ? J . A . Magallon
2000-11-01 22:53 ` Alan Cox
2000-11-02  1:12   ` Jeff Garzik
2000-11-02  2:47     ` J . A . Magallon
2000-11-02  3:26       ` Jeff Garzik
2000-11-02 11:40         ` Alan Cox
2000-11-01 22:57 ` Kurt Garloff
2000-11-01 22:47   ` David S. Miller
2000-11-01 22:45     ` Gérard Roudier
2000-11-01 23:07     ` Ben Pfaff
2000-11-01 23:12       ` David S. Miller
2000-11-01 23:11     ` Alan Cox
2000-11-01 23:15       ` Jeff Garzik
2000-11-01 23:21     ` Tom Rini
2000-11-01 23:30       ` Alan Cox
2000-11-01 23:36         ` Tom Rini
2000-11-02  0:22         ` Jeff Garzik
2000-11-02  4:50           ` Mike Galbraith
2000-11-02  4:59             ` Jeff Garzik
2000-11-01 23:37     ` Nathan Paul Simons
2000-11-01 23:29       ` David S. Miller
2000-11-01 23:54         ` Cort Dougan
2000-11-01 23:45           ` David S. Miller
2000-11-02  0:00             ` Cort Dougan
2000-11-02  0:54               ` Alan Cox
2000-11-02  0:21             ` Nathan Paul Simons
2000-11-02  0:11               ` David S. Miller
2000-11-02  0:32                 ` H. Peter Anvin
2000-11-02  0:59                   ` Bill Nottingham
2000-11-02 18:55                   ` Tim Riker [this message]
2000-11-02 19:07                     ` non-gcc linux? (was Re: Where did kgcc go in 2.4.0-test10?) Alan Cox
2000-11-02 19:07                       ` Tim Riker
2000-11-02 19:24                         ` Ben Ford
2000-11-02 19:31                           ` Tim Riker
2000-11-02 20:37                             ` Theodore Y. Ts'o
2000-11-02 20:53                               ` Tim Riker
2000-11-02 21:06                                 ` Christoph Hellwig
2000-11-02 21:21                                   ` non-gcc linux? Tim Riker
2000-11-04 11:30                                   ` non-gcc linux? (was Re: Where did kgcc go in 2.4.0-test10?) Kai Henningsen
2000-11-02 22:46                                 ` Theodore Y. Ts'o
2000-11-02 23:16                                   ` Tim Riker
2000-11-03 12:02                                 ` Martin Dalecki
2000-11-02 20:53                         ` Alan Cox
2000-11-02 21:04                           ` Tim Riker
2000-11-02 21:17                             ` Alan Cox
2000-11-02 21:23                               ` Andi Kleen
2000-11-02 21:27                                 ` non-gcc linux? Tim Riker
2000-11-02 21:41                                   ` Andi Kleen
2000-11-02 21:43                                     ` Tim Riker
2000-11-03  7:21                                   ` Gábor Lénárt
2000-11-04 11:39                                     ` Kai Henningsen
2000-11-04 11:37                               ` non-gcc linux? (was Re: Where did kgcc go in 2.4.0-test10?) Kai Henningsen
2000-11-07 16:33                         ` Jes Sorensen
2000-11-07 20:52                           ` Tim Riker
2000-11-07 21:06                             ` Richard B. Johnson
2000-11-07 22:08                               ` David Lang
2000-11-07 21:36                                 ` Richard B. Johnson
2000-11-08  0:04                             ` yodaiken
2000-11-02 19:18                       ` Andi Kleen
2000-11-02 19:17                         ` non-gcc linux? Tim Riker
2000-11-02 19:52                           ` Andrea Arcangeli
2000-11-02 20:00                             ` Tim Riker
2000-11-02 20:29                               ` Andrea Arcangeli
2000-11-02 22:23                               ` D. Hugh Redelmeier
2000-11-02 22:31                                 ` Jeff Garzik
2000-11-03 22:02                                   ` D. Hugh Redelmeier
2000-11-04  5:34                         ` non-gcc linux? (was Re: Where did kgcc go in 2.4.0-test10?) Aaron Sethman
2000-11-04  9:18                           ` non-gcc linux? Tim Riker
2000-11-04 10:58                             ` Alan Cox
2000-11-05 20:52                               ` Tim Riker
2000-11-05 21:06                                 ` Jakub Jelinek
2000-11-05 21:18                                   ` Tim Riker
2000-11-05 22:42                                   ` Marc Lehmann
2000-11-05 23:05                                     ` Tim Riker
2000-11-06  0:05                                       ` Marc Lehmann
2000-11-06  8:53                                       ` Thomas Pornin
2000-11-05 23:26                                     ` Ion Badulescu
2000-11-06  6:34                                       ` Eric W. Biederman
2000-11-05 22:46                                   ` Alan Cox
2000-11-05 22:45                                 ` Alan Cox
2000-11-05 22:52                                   ` Tim Riker
2000-11-04 12:20                             ` Kai Henningsen
2000-11-06 17:14                           ` non-gcc linux? (was Re: Where did kgcc go in 2.4.0-test10?) Ralf Baechle
2000-11-02 20:21                     ` Andi Kleen
2000-11-02 20:27                       ` Christoph Hellwig
2000-11-04 12:24                       ` Kai Henningsen
2000-11-05  3:28                         ` Michael Meissner
2000-11-05 13:03                           ` Kai Henningsen
2000-11-03 11:33                     ` Thomas Pornin
2000-11-04 11:19                     ` Kai Henningsen
2000-11-02  2:42             ` Where did kgcc go in 2.4.0-test10 ? Marc Lehmann
2000-11-02 21:24             ` Gérard Roudier
2000-11-02 22:37               ` David S. Miller
2000-11-02  6:28           ` Jakub Jelinek
2000-11-02  0:11         ` Nathan Paul Simons
2000-11-02  0:06           ` David S. Miller
2000-11-02  0:22           ` Tom Rini
2000-11-02  0:26           ` Jeff Garzik
2000-11-02  0:56           ` Alan Cox
2000-11-02  0:17     ` Miquel van Smoorenburg
2000-11-02  0:30       ` Jeff Garzik
2000-11-02  1:01         ` Miquel van Smoorenburg
2000-11-01 23:04   ` George
2000-11-02  1:08     ` Jan Dvorak
2000-11-01 23:12   ` Alan Cox
     [not found] <fa.g3i0smv.15loso7@ifi.uio.no>
     [not found] ` <fa.cjn9ksv.1a0m82t@ifi.uio.no>
2000-11-04  6:19   ` non-gcc linux? (was Re: Where did kgcc go in 2.4.0-test10?) Russ Allbery
2000-11-04  8:40     ` Michael Meissner
2000-11-04  8:44       ` Russ Allbery
2000-11-06 12:06       ` Horst von Brand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3A01B8BB.A17FE178@Rikers.org \
    --to=tim@rikers.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox