From: Adrian Bunk <bunk@stusta.de>
To: Andi Kleen <ak@suse.de>, Andrew Morton <akpm@osdl.org>,
Linus Torvalds <torvalds@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: [2.6 patch] Use -ffreestanding?
Date: Wed, 10 Nov 2004 02:45:16 +0100 [thread overview]
Message-ID: <20041110014516.GC4089@stusta.de> (raw)
In-Reply-To: <20041109050107.GA5328@wotan.suse.de>
On Tue, Nov 09, 2004 at 06:01:07AM +0100, Andi Kleen wrote:
> > Why doesn't the kernel use -ffreestanding which should prevent all such
> > problems?
>
> Because we want most of these optimizations. Also with -ffreestanding
Do we really want the compiler to silently replace in-kernel functions
with built-ins?
You can still do an explicit
#define strlen __builtin_strlen
if you want to use a gcc built-in function.
> you would need to supply the out of line string functions anyways
> because gcc wouldn't inline them.
At least with gcc 3.4.2 on i386 adding -ffreestanding and your
(i386-specific) IN_STRING_C hack removed compiles fine.
> -Andi
I'm open for examples why this actually doesn't work, but after my
(limited) testin I'd suggest the patch below for inclusion in the next
-mm.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
--- linux-2.6.10-rc1-mm4-full-ffreestanding/Makefile.old 2004-11-09 22:27:06.000000000 +0100
+++ linux-2.6.10-rc1-mm4-full-ffreestanding/Makefile 2004-11-09 22:27:47.000000000 +0100
@@ -349,7 +349,8 @@
CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE)
CFLAGS := -Wall -Wstrict-prototypes -Wno-trigraphs \
- -fno-strict-aliasing -fno-common
+ -fno-strict-aliasing -fno-common \
+ -ffreestanding
AFLAGS := -D__ASSEMBLY__
export VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION LOCALVERSION KERNELRELEASE \
next prev parent reply other threads:[~2004-11-10 1:46 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-07 14:24 [2.6 patch] kill IN_STRING_C Adrian Bunk
2004-11-08 13:44 ` Andi Kleen
2004-11-08 15:34 ` Adrian Bunk
2004-11-08 16:19 ` Andi Kleen
2004-11-08 16:31 ` Adrian Bunk
2004-11-08 17:51 ` Andi Kleen
2004-11-08 18:34 ` Adrian Bunk
2004-11-08 19:01 ` Andi Kleen
2004-11-08 23:38 ` Use -ffreestanding? Adrian Bunk
2004-11-09 5:01 ` Andi Kleen
2004-11-10 1:45 ` Adrian Bunk [this message]
2004-11-10 1:51 ` [2.6 patch] " Linus Torvalds
2004-11-10 1:57 ` Adrian Bunk
2004-11-10 21:01 ` Bill Davidsen
2004-11-08 18:04 ` [2.6 patch] kill IN_STRING_C Paweł Sikora
2004-11-08 18:31 ` Adrian Bunk
2004-11-08 19:12 ` linux-os
2004-11-08 21:27 ` Adrian Bunk
2004-11-08 22:15 ` linux-os
2004-11-08 22:29 ` Adrian Bunk
2004-11-08 22:57 ` linux-os
2004-11-08 23:08 ` Adrian Bunk
2004-11-09 12:44 ` linux-os
2004-11-09 13:43 ` linux-os
2004-11-08 18:22 ` linux-os
2004-11-08 19:31 ` Ryan Cumming
2004-11-09 13:58 ` Arnd Bergmann
2004-11-10 2:30 ` Adrian Bunk
[not found] ` <200411081942.38954.pluto@pld-linux.org>
[not found] ` <20041108185222.GE15077@stusta.de>
2004-11-08 19:11 ` Paweł Sikora
2004-11-08 21:25 ` Adrian Bunk
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=20041110014516.GC4089@stusta.de \
--to=bunk@stusta.de \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.