* [PATCH] x86_64: fix linking on 32-bit system
@ 2006-08-20 14:31 Paolo 'Blaisorblade' Giarrusso
2006-08-20 18:30 ` Andi Kleen
0 siblings, 1 reply; 2+ messages in thread
From: Paolo 'Blaisorblade' Giarrusso @ 2006-08-20 14:31 UTC (permalink / raw)
To: Andrew Morton, Andi Kleen; +Cc: linux-kernel
From: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
When compiling a 64-bit kernel on an Ubuntu 6.06 32bit system (whose GCC is also
a cross-compiler for x86_64) I've seen that head.o is compiled as a 64-bit file
(while it should not) and ld complaining about this during linking:
ld: warning: i386:x86-64 architecture of input file
`arch/x86_64/boot/compressed/head.o' is incompatible with i386 output
I've verified that removing -m64 from compilation flags to turn
"-m64 -traditional -m32" into "-traditional -m32" fixes the issue.
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
---
arch/x86_64/boot/compressed/Makefile | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/arch/x86_64/boot/compressed/Makefile b/arch/x86_64/boot/compressed/Makefile
index f89d96f..c6bfd23 100644
--- a/arch/x86_64/boot/compressed/Makefile
+++ b/arch/x86_64/boot/compressed/Makefile
@@ -7,7 +7,9 @@ # Note all the files here are compiled/l
#
targets := vmlinux vmlinux.bin vmlinux.bin.gz head.o misc.o piggy.o
-EXTRA_AFLAGS := -traditional -m32
+EXTRA_AFLAGS := -traditional
+#Gcc on Ubuntu 6.06 does not cope well with -m64 -m32 - it uses -m64.
+AFLAGS := $(subst -m64,-m32,$(AFLAGS))
# cannot use EXTRA_CFLAGS because base CFLAGS contains -mkernel which conflicts with
# -m32
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] x86_64: fix linking on 32-bit system
2006-08-20 14:31 [PATCH] x86_64: fix linking on 32-bit system Paolo 'Blaisorblade' Giarrusso
@ 2006-08-20 18:30 ` Andi Kleen
0 siblings, 0 replies; 2+ messages in thread
From: Andi Kleen @ 2006-08-20 18:30 UTC (permalink / raw)
To: Paolo 'Blaisorblade' Giarrusso; +Cc: Andrew Morton, linux-kernel
On Sunday 20 August 2006 16:31, Paolo 'Blaisorblade' Giarrusso wrote:
> From: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
>
> When compiling a 64-bit kernel on an Ubuntu 6.06 32bit system (whose GCC is also
> a cross-compiler for x86_64) I've seen that head.o is compiled as a 64-bit file
> (while it should not) and ld complaining about this during linking:
>
> ld: warning: i386:x86-64 architecture of input file
> `arch/x86_64/boot/compressed/head.o' is incompatible with i386 output
>
> I've verified that removing -m64 from compilation flags to turn
> "-m64 -traditional -m32" into "-traditional -m32" fixes the issue.
Applied thanks, but I removed the comment because it's on more
than just Ubuntu 32bit.
AFAIK the warning is harmless, but you're the first to submit a real
patch to fix it.
-Andi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-08-20 18:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-20 14:31 [PATCH] x86_64: fix linking on 32-bit system Paolo 'Blaisorblade' Giarrusso
2006-08-20 18:30 ` Andi Kleen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox