[lkml]   [2001]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: gcc 3.0.2/kernel details (-O issue)

    On 20011220 H. Peter Anvin wrote:
    >Followup to: <>
    >By author: Erik Mouw <>
    >In newsgroup:
    >> It doesn't change syntax, but anything lower than -O1 simply doesn't
    >> inline functions with an "inline" attribute. The result is that the
    >> inline functions in header files won't get inlined and the compiler
    >> will complain about missing functions at link time (or module insert
    >> time).
    >> I'm actually surprised that 2.2 can be compiled with -O, AFAIK
    >> linux-2.2 also has a lot of inline functions in headers. I know from
    >> experience that -Os works for 2.4 kernels on ARM, I haven't tested it
    >> with 2.2 or x86.
    >-O is -O1. If you turn on the optimizer at all you get inlining.

    Problem is killing inlined functions. Current kernel relies in the
    real version of the funtion staying there even all its uses have been
    inlined. GCC's before 3 do not do what they are supposed to and do not
    kill the real function. GCC3 kills it in certain cases and build
    crashes. So kernel builds ok with old gcc's because they do not do
    what they are supposed. Hence all the 'extern inline' mesh...
    (plz, correct me if I'm wrong).


    J.A. Magallon # Let the source be with you...
    Mandrake Linux release 8.2 (Cooker) for i586
    Linux werewolf 2.4.17-rc2-beo #2 SMP Wed Dec 19 22:24:29 CET 2001 i686
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:14    [W:0.021 / U:7.196 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site