Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 30

Thread: Link-Time Optimization To Speed Up The Linux Kernel

  1. #11
    Join Date
    Jul 2008
    Location
    Greece
    Posts
    3,778

    Default

    Quote Originally Posted by uid313 View Post
    Isn't GCC-specific behavior bad?
    No. It's designed that way. The GCC-specific code isn't an accident or oversight.

    Shouldn't it be ANSI/ISO-compatible?
    Nope. Linux is specifically targetting GCC as it's compiler.

  2. #12
    Join Date
    Dec 2011
    Posts
    2,006

    Default

    Quote Originally Posted by RealNC View Post
    No. It's designed that way. The GCC-specific code isn't an accident or oversight.
    Maybe those GCC-specific extensions should be sent to ISO for standarization.

  3. #13
    Join Date
    Feb 2008
    Location
    Linuxland
    Posts
    4,989

    Default

    Yeah, and be standardized in C25 in 2025...

  4. #14
    Join Date
    Dec 2011
    Posts
    2,006

    Default

    Quote Originally Posted by curaga View Post
    Yeah, and be standardized in C25 in 2025...
    Better late than never?

  5. #15
    Join Date
    Nov 2007
    Posts
    1,024

    Default

    Quote Originally Posted by uid313 View Post
    i'd like to see someone try compile linux with;
    * gcc
    * microsoft compiler
    * llvm / clang / dragonegg
    * pcc, tcc
    * intel c compiler
    * open64
    hahahahahahahhahahaha good fucking luck, buddy.

    (For more context, Microsoft does not support or enhance their C compiler anymore, which hasn't been able to compile many modern C codebases in ages. It's stuck at the 23-year-old C89 standard and is receiving zero further development support. Microsoft tells anyone who runs into problems to compile as C++ or to go find another compiler vendor. I'd be mildly surprised if Microsoft's compiler can even successfully parse more than 25% of the headers in Linux or even a single source file.)

    Maybe those GCC-specific extensions should be sent to ISO for standarization.
    Many of the extensions are just not really general-C kinds of things. http://gcc.gnu.org/onlinedocs/gcc/C-Extensions.html - if you look through that list, and especially at the ones the Linux kernel depends on, they're not really applicable in the kind of general sense that C prefers. Some of them place extra restrictions on the compiler's code generator which would make them unusable on "small system" C compilers, others are very tightly bound to the linker and require an ELF-like system, some are hardware or platform specific, some are specific to GCC's internals, and yet others are just of dubious nature that may have already been superceded by C11 or C++ equivalents. (Note that many of those extensions actually are just C99 or C11 features, with the "extension" part being that GCC accepts them even when compiling in older standards modes.)

  6. #16
    Join Date
    Dec 2011
    Posts
    2,006

    Default

    Quote Originally Posted by elanthis View Post
    Many of the extensions are just not really general-C kinds of things. http://gcc.gnu.org/onlinedocs/gcc/C-Extensions.html - if you look through that list, and especially at the ones the Linux kernel depends on, they're not really applicable in the kind of general sense that C prefers. Some of them place extra restrictions on the compiler's code generator which would make them unusable on "small system" C compilers, others are very tightly bound to the linker and require an ELF-like system, some are hardware or platform specific, some are specific to GCC's internals, and yet others are just of dubious nature that may have already been superceded by C11 or C++ equivalents. (Note that many of those extensions actually are just C99 or C11 features, with the "extension" part being that GCC accepts them even when compiling in older standards modes.)
    Does the Linux kernel take advantage of C99 and C11?

  7. #17
    Join Date
    Jul 2008
    Location
    Greece
    Posts
    3,778

    Default

    Quote Originally Posted by uid313 View Post
    Does the Linux kernel take advantage of C99 and C11?
    It doesn't care if it's in C89, C99 or C11, as long as it's in GCC.

  8. #18
    Join Date
    Dec 2011
    Posts
    2,006

    Default

    Quote Originally Posted by RealNC View Post
    It doesn't care if it's in C89, C99 or C11, as long as it's in GCC.
    Alright.
    But does it use any of the new C99 or C11 features?

  9. #19
    Join Date
    Jul 2008
    Location
    Greece
    Posts
    3,778

    Default

    Quote Originally Posted by uid313 View Post
    Alright.
    But does it use any of the new C99 or C11 features?
    I've seen 'inline' in there, at least.

  10. #20
    Join Date
    Dec 2011
    Posts
    2,006

    Default

    Quote Originally Posted by RealNC View Post
    I've seen 'inline' in there, at least.
    inline is from C99 or C11 or from where?

    Someone ought to run some automated analyzer tool that finds code that could be improved/refactored/rewritten to take advantage of modern features in C99 and C11.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •