From: Tony Lindgren <tony@atomide.com>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] trivial fix for i386 cross compile
Date: Mon, 24 Jan 2005 22:31:10 -0800 [thread overview]
Message-ID: <20050125063110.GA22266@atomide.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 666 bytes --]
Hi all,
I used to be be able to cross compile for i386 on my x86_64 machine,
but recently something (gcc/binutils?) changed, and it stopped working.
Following patch makes cross compile work with:
make ARCH=i386 CFLAGS_KERNEL="-m32" AFLAGS_KERNEL="-m32" bzImage
Without the patch I'm getting the following error:
SYSCALL arch/i386/kernel/vsyscall-syms.o
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld:
Relocatable linking with relocations from format elf32-i386
(arch/i386/kernel/vsyscall-sysenter.o) to format elf64-x86-64
(arch/i386/kernel/vsyscall-syms.o) is not supported
collect2: ld returned 1 exit status
Regards,
Tony
[-- Attachment #2: patch-cross-compile-i386 --]
[-- Type: text/plain, Size: 457 bytes --]
--- a/arch/i386/kernel/Makefile 2004-10-28 00:39:50 -07:00
+++ b/arch/i386/kernel/Makefile 2005-01-22 22:57:49 -08:00
@@ -46,7 +46,7 @@
# The DSO images are built using a special linker script.
quiet_cmd_syscall = SYSCALL $@
- cmd_syscall = $(CC) -nostdlib $(SYSCFLAGS_$(@F)) \
+ cmd_syscall = $(CC) -m elf_i386 -nostdlib $(SYSCFLAGS_$(@F)) \
-Wl,-T,$(filter-out FORCE,$^) -o $@
export CPPFLAGS_vsyscall.lds += -P -C -U$(ARCH)
reply other threads:[~2005-01-25 6:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20050125063110.GA22266@atomide.com \
--to=tony@atomide.com \
--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