From: Sam Ravnborg <sam@ravnborg.org>
To: Mathieu Desnoyers <compudj@krystal.dyndns.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>,
linux-kernel@vger.kernel.org,
Jeremy Fitzhardinge <jeremy@goop.org>,
Ingo Molnar <mingo@elte.hu>, David Miller <davem@davemloft.net>,
PaulMackerraspaulus@samba.org
Subject: Re: [PATCH] Fix Immediate Values x86_64 support old gcc (v2)
Date: Thu, 22 May 2008 00:38:42 +0200 [thread overview]
Message-ID: <20080521223842.GE15136@uranus.ravnborg.org> (raw)
In-Reply-To: <20080521215756.GA9869@Krystal>
On Wed, May 21, 2008 at 05:57:56PM -0400, Mathieu Desnoyers wrote:
> * Sam Ravnborg (sam@ravnborg.org) wrote:
>
> > Same with USE_IMMEDIATE - as USE_IMMEDIATE is only used in a x86 Makefile.
> > Or did I miss sothing?
> >
>
> Given that I want to change every use of CONFIG_IMMEDIATE into
> USE_IMMEDIATE, both in architecture specific and independant C files and
> also in arch spec. and indep. Makefiles, I will have to define
> USE_IMMEDIATE on other arch too.
>
> Here is the updated patch. It applies on top of the sched-devel.git
> tree.
>
> Fix Immediate Values x86_64 support old gcc
>
> GCC < 4, on x86_64, does not accept symbol+offset operands for "i" constraints
> asm statements. Fallback on generic immediate values if this compiler is
> detected.
>
> Changelog :
> - USE_IMMEDIATE must now be used in lieue of CONFIG_IMMEDIATE in Makefiles and
> in C code.
> - Every architecture implementing immediate values must declare USE_IMMEDIATE
> in their Makefile.
>
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
> CC: Sam Ravnborg <sam@ravnborg.org>
> CC: "H. Peter Anvin" <hpa@zytor.com>
> CC: Jeremy Fitzhardinge <jeremy@goop.org>
> CC: Ingo Molnar <mingo@elte.hu>
> CC: David Miller <davem@davemloft.net>
> CC: Paul Mackerras paulus@samba.org
> ---
> Makefile | 5 +++++
> arch/powerpc/Makefile | 2 ++
> arch/powerpc/kernel/Makefile | 2 +-
> arch/x86/Makefile | 5 +++++
> arch/x86/kernel/Makefile | 2 +-
> arch/x86/kernel/traps_32.c | 4 ++--
> include/linux/immediate.h | 2 +-
> include/linux/module.h | 4 ++--
> kernel/Makefile | 2 +-
> kernel/module.c | 8 ++++----
> 10 files changed, 24 insertions(+), 12 deletions(-)
>
> Index: linux-2.6-sched-devel/arch/x86/Makefile
> ===================================================================
> --- linux-2.6-sched-devel.orig/arch/x86/Makefile 2008-05-21 09:04:52.000000000 -0400
> +++ linux-2.6-sched-devel/arch/x86/Makefile 2008-05-21 14:18:16.000000000 -0400
> @@ -43,6 +43,7 @@
>
> # temporary until string.h is fixed
> KBUILD_CFLAGS += -ffreestanding
> + export USE_IMMEDIATE := $(CONFIG_IMMEDIATE)
tabs has a special sematic purpose in makefiles so do not
use tabs for indent.
> else
> BITS := 64
> UTS_MACHINE := x86_64
> @@ -78,6 +79,10 @@
> "$(CC)" -fstack-protector-all )
>
> KBUILD_CFLAGS += $(stackp-y)
> +
> + # x86_64 gcc 3.x has problems with passing symbol+offset in
> + # asm "i" constraint.
> + export USE_IMMEDIATE := $(call cc-ifversion, -ge, 0400, $(CONFIG_IMMEDIATE))
tabs -> spaces again.
Other than that I like this patch much better.
Thanks,
Sam
next prev parent reply other threads:[~2008-05-21 22:38 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-14 9:54 x86-64 build problem with tip Jeremy Fitzhardinge
2008-05-16 12:48 ` [PATCH] Fix immediate asm constraint for gcc 3 x86_64 Mathieu Desnoyers
2008-05-16 21:32 ` H. Peter Anvin
2008-05-21 13:31 ` Mathieu Desnoyers
[not found] ` <48344239.9070003@zytor.com>
[not found] ` <20080521160217.GA26974@Krystal>
2008-05-21 17:01 ` [PATCH] Fix Immediate Values x86_64 support old gcc Mathieu Desnoyers
2008-05-21 20:37 ` Sam Ravnborg
2008-05-21 21:28 ` Mathieu Desnoyers
2008-05-21 21:46 ` Sam Ravnborg
2008-05-21 21:57 ` [PATCH] Fix Immediate Values x86_64 support old gcc (v2) Mathieu Desnoyers
2008-05-21 22:38 ` Sam Ravnborg [this message]
2008-05-21 23:24 ` [PATCH] Fix Immediate Values x86_64 support old gcc (v3) Mathieu Desnoyers
2008-05-22 2:03 ` Mathieu Desnoyers
2008-05-25 7:21 ` Sam Ravnborg
2008-05-27 13:12 ` [PATCH ftrace.git sched-fixes.git] " Mathieu Desnoyers
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=20080521223842.GE15136@uranus.ravnborg.org \
--to=sam@ravnborg.org \
--cc=PaulMackerraspaulus@samba.org \
--cc=compudj@krystal.dyndns.org \
--cc=davem@davemloft.net \
--cc=hpa@zytor.com \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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
all inboxes | Powered by JetHome®