lkml.org 
[lkml]   [2004]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] Allow compiling i386 with an x86-64 compiler
This patch adds -m32 if gcc supports it, thus making it easier to 
compile the i386 architecture with an x86-64 compiler.

Note that it adds the option to CC, since it also affects assembly code
and linking. The extra level of indirection is because $(call
cc-option) itself uses $(CC), so just doing CC += ... would cause $(CC)
to be recursively defined.

-hpa


Signed-Off-By: H. Peter Anvin <hpa@zytor.com>
Index: linux-2.5/arch/i386/Makefile
===================================================================
RCS file: /home/hpa/kernel/bkcvs/linux-2.5/arch/i386/Makefile,v
retrieving revision 1.72
diff -u -r1.72 Makefile
--- linux-2.5/arch/i386/Makefile 27 Oct 2004 17:27:13 -0000 1.72
+++ linux-2.5/arch/i386/Makefile 23 Nov 2004 02:04:09 -0000
@@ -20,6 +20,10 @@
LDFLAGS_vmlinux :=
CHECKFLAGS += -D__i386__

+# This allows compilation with an x86-64 compiler
+CC_M32 := $(call cc-option,-m32)
+CC += $(CC_M32)
+
CFLAGS += -pipe -msoft-float

# prevent gcc from keeping the stack 16 byte aligned
\
 
 \ /
  Last update: 2005-03-22 14:08    [W:0.045 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site