Announcement

Collapse
No announcement yet.

Link-Time Optimization To Speed Up The Linux Kernel

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #11
    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.

    Comment


    • #12
      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.

      Comment


      • #13
        Yeah, and be standardized in C25 in 2025...

        Comment


        • #14
          Originally posted by curaga View Post
          Yeah, and be standardized in C25 in 2025...
          Better late than never?

          Comment


          • #15
            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.)

            Comment


            • #16
              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?

              Comment


              • #17
                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.

                Comment


                • #18
                  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?

                  Comment


                  • #19
                    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.

                    Comment


                    • #20
                      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.

                      Comment

                      Working...
                      X