public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@colin2.muc.de>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Andi Kleen <ak@muc.de>,
	akpm@osdl.org, linux-kernel@vger.kernel.org, jh@suse.cz
Subject: Re: [PATCH] string fixes for gcc 3.4
Date: 14 Jan 2004 11:02:16 +0100
Date: Wed, 14 Jan 2004 11:02:16 +0100	[thread overview]
Message-ID: <20040114100216.GD19652@colin2.muc.de> (raw)
In-Reply-To: <20040114094305.GQ31589@devserv.devel.redhat.com>

On Wed, Jan 14, 2004 at 04:43:05AM -0500, Jakub Jelinek wrote:
> On Wed, Jan 14, 2004 at 10:15:43AM +0100, Andi Kleen wrote:
> > 
> > gcc 3.4 optimizes sprintf(foo,"%s",string) into strcpy. Unfortunately
> > that isn't seen by the inliner and linux/i386 has no out-of-line strcpy
> > so you end up with a linker error.
> 
> The other alternative is -ffreestanding.  Kernel in its current shape
> certainly is not a hosted environment.

Good point.

> But I agree GCC does a better job with string/memory functions
> than kernel with its inlines.

If anybody wants to try it:
cp include/asm-x86_64/string.h include/asm-i386/string.h 
should do approximately the right thing.

-Andi

      reply	other threads:[~2004-01-14 10:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-14  9:15 [PATCH] string fixes for gcc 3.4 Andi Kleen
2004-01-14  9:43 ` Jakub Jelinek
2004-01-14 10:02   ` Andi Kleen [this message]

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=20040114100216.GD19652@colin2.muc.de \
    --to=ak@colin2.muc.de \
    --cc=ak@muc.de \
    --cc=akpm@osdl.org \
    --cc=jakub@redhat.com \
    --cc=jh@suse.cz \
    --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