From: Segher Boessenkool <segher@kernel.crashing.org>
To: David Miller <davem@davemloft.net>
Cc: scottwood@freescale.com, linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] [POWERPC] Fix kernel builds with newer gcc versions and -Os
Date: Sat, 3 May 2008 02:15:07 +0200 [thread overview]
Message-ID: <8da0129209e812a5fca84cb13a3f6468@kernel.crashing.org> (raw)
In-Reply-To: <20080502.150448.32652665.davem@davemloft.net>
>> What in libgcc references libc, and why isn't this a problem for
>> Linux/ARM, Linux/SH, U-boot, and the many other libc-less programs
>> that
>> use libgcc?
>
> The problem only occurs once you reference a function that references
> libc stuff, and those guys are just lucky so far.
The only calls to the C library that GCC ever generates by itself
(for freestanding mode, at least) are calls to memcmp, memcpy, memmove,
memset (and abort, in some circumstances). This is true whether or
not you link to libgcc.
> It's also one less variable to debug if you put the implementation
> in the kernel, or do you like debugging compiler induced problems?
> I don't :-)
On the other hand, if we opt to re-implement, we have to make sure
the in-kernel version of the GCC support routines is correct. We
have to trust the compiler everywhere else already, why not here as
well?
Segher
p.s. I just finished some testing linking a powerpc kernel with
libgcc. All went fine, as expected. I also did a stupid test that
actually needed a libgcc routine (__udivdi3); that went fine as well.
And yeah, I know about the modules issue, but that isn't really very
different from the analogue issue with in-kernel library routines.
next prev parent reply other threads:[~2008-05-03 0:15 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-02 14:21 [PATCH] [POWERPC] Fix kernel builds with newer gcc versions and -Os Kumar Gala
2008-05-02 15:07 ` Scott Wood
2008-05-02 15:26 ` Kumar Gala
2008-05-02 17:34 ` Segher Boessenkool
2008-05-02 21:34 ` Kumar Gala
2008-05-02 21:40 ` Scott Wood
2008-05-02 21:42 ` David Miller
2008-05-02 21:45 ` Scott Wood
2008-05-02 22:04 ` David Miller
2008-05-02 22:16 ` Scott Wood
2008-05-02 22:30 ` David Miller
2008-05-02 22:38 ` Scott Wood
2008-05-02 22:39 ` David Miller
2008-05-03 0:15 ` Segher Boessenkool [this message]
2008-05-02 23:24 ` Benjamin Herrenschmidt
2008-05-02 23:23 ` Benjamin Herrenschmidt
2008-05-08 6:26 ` Paul Mackerras
2008-05-02 17:33 ` Segher Boessenkool
2008-05-02 21:31 ` Kumar Gala
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=8da0129209e812a5fca84cb13a3f6468@kernel.crashing.org \
--to=segher@kernel.crashing.org \
--cc=davem@davemloft.net \
--cc=linuxppc-dev@ozlabs.org \
--cc=scottwood@freescale.com \
/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;
as well as URLs for NNTP newsgroup(s).