public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "J.A. Magallon" <jamagallon@able.es>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: gcc 3.0.2/kernel details (-O issue)
Date: Thu, 20 Dec 2001 10:22:38 +0100	[thread overview]
Message-ID: <20011220102238.A5957@werewolf.able.es> (raw)
In-Reply-To: <Pine.LNX.4.10.10112192037490.3265-100000@luxik.cdi.cz> <1008792213.806.36.camel@phantasy> <20011220001006.GA18071@arthur.ubicom.tudelft.nl> <9vrmhd$mf9$1@cesium.transmeta.com>
In-Reply-To: <9vrmhd$mf9$1@cesium.transmeta.com>; from hpa@zytor.com on Thu, Dec 20, 2001 at 04:39:25 +0100


On 20011220 H. Peter Anvin wrote:
>Followup to:  <20011220001006.GA18071@arthur.ubicom.tudelft.nl>
>By author:    Erik Mouw <J.A.K.Mouw@its.tudelft.nl>
>In newsgroup: linux.dev.kernel
>> 
>> 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).

By

-- 
J.A. Magallon                           #  Let the source be with you...        
mailto:jamagallon@able.es
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

  reply	other threads:[~2001-12-20  9:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-19 18:55 gcc 3.0.2/kernel details (-O issue) devik
2001-12-19 19:49 ` Chris Meadors
2001-12-19 19:39   ` Martin Devera
2001-12-19 20:03     ` Robert Love
2001-12-20  0:10       ` Erik Mouw
2001-12-20  3:39         ` H. Peter Anvin
2001-12-20  9:22           ` J.A. Magallon [this message]
2001-12-20 12:03             ` H. Peter Anvin
2001-12-20 10:30       ` devik
2001-12-22 20:54       ` Pavel Machek
2001-12-22 23:35         ` devik
2001-12-22 23:54         ` J.A. Magallon

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=20011220102238.A5957@werewolf.able.es \
    --to=jamagallon@able.es \
    --cc=hpa@zytor.com \
    --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