From: Sam Ravnborg <sam@ravnborg.org>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Sam Ravnborg <sam@saturn.ravnborg.org>,
Sam Ravnborg <sam@ravnborg.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>
Subject: [PATCH 3/5] x86: biarch support for 32 bit builds beautified
Date: Sat, 29 Dec 2007 21:41:14 +0100 [thread overview]
Message-ID: <1198960876-21159-3-git-send-email-sam@ravnborg.org> (raw)
In-Reply-To: <1198960876-21159-2-git-send-email-sam@ravnborg.org>
From: Sam Ravnborg <sam@saturn.ravnborg.org>
There were no reason to mess around with CC, AS and LD.
Fixing this up avoided duplicated option for ld.
A small fixlet were needed in boot/Makefile which assumed
that CC were modified.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
---
arch/x86/Makefile | 11 ++++-------
arch/x86/boot/Makefile | 4 +---
2 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 4124df5..027929e 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -15,18 +15,15 @@ export BITS
ifeq ($(CONFIG_X86_32),y)
BITS := 32
UTS_MACHINE := i386
+ CHECKFLAGS += -D__i386__
- HAS_BIARCH := $(call cc-option-yn, -m32)
- ifeq ($(HAS_BIARCH),y)
- AS := $(AS) --32
- LD := $(LD) -m elf_i386
- CC := $(CC) -m32
- endif
+ biarch := $(call cc-option,-m32)
+ KBUILD_AFLAGS += $(biarch)
+ KBUILD_CFLAGS += $(biarch)
ifdef CONFIG_RELOCATABLE
LDFLAGS_vmlinux := --emit-relocs
endif
- CHECKFLAGS += -D__i386__
KBUILD_CFLAGS += -msoft-float -mregparm=3 -freg-struct-return
diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile
index 7a3116c..dcad650 100644
--- a/arch/x86/boot/Makefile
+++ b/arch/x86/boot/Makefile
@@ -49,10 +49,7 @@ HOSTCFLAGS_build.o := $(LINUXINCLUDE)
# How to compile the 16-bit code. Note we always compile for -march=i386,
# that way we can complain to the user if the CPU is insufficient.
-cflags-$(CONFIG_X86_32) :=
-cflags-$(CONFIG_X86_64) := -m32
KBUILD_CFLAGS := $(LINUXINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \
- $(cflags-y) \
-Wall -Wstrict-prototypes \
-march=i386 -mregparm=3 \
-include $(srctree)/$(src)/code16gcc.h \
@@ -62,6 +59,7 @@ KBUILD_CFLAGS := $(LINUXINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \
$(call cc-option, -fno-unit-at-a-time)) \
$(call cc-option, -fno-stack-protector) \
$(call cc-option, -mpreferred-stack-boundary=2)
+KBUILD_CFLAGS += $(call cc-option,-m32)
KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
$(obj)/zImage: IMAGE_OFFSET := 0x1000
--
1.5.3.7.1112.g9758e
next prev parent reply other threads:[~2007-12-29 20:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-29 20:38 [PATCH 0/5] x86 makefile unification and cleaning Sam Ravnborg
2007-12-29 20:41 ` [PATCH 1/5] x86: unification of arch/x86/Makefiles Sam Ravnborg
2007-12-29 20:41 ` [PATCH 2/5] x86: share more options between 32 and 64 bit build Sam Ravnborg
2007-12-29 20:41 ` Sam Ravnborg [this message]
2007-12-29 20:41 ` [PATCH 4/5] x86: teach vdso to clean Sam Ravnborg
2007-12-29 20:41 ` [PATCH 5/5] " Sam Ravnborg
2007-12-29 20:44 ` [PATCH 0/5] x86 makefile unification and cleaning Sam Ravnborg
2007-12-30 14:45 ` Ingo Molnar
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=1198960876-21159-3-git-send-email-sam@ravnborg.org \
--to=sam@ravnborg.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=sam@saturn.ravnborg.org \
--cc=tglx@linutronix.de \
/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