Re: i386 -> x86_64 cross compile failure (binutils bug?)

Lee Revell
2005-12-10T05:10:41Z

On Sat, 2005-12-10 at 01:56 -0700, Andi Kleen wrote:
> Lee Revell <rlrevell@joe-job.com> writes:
> > - disable CONFIG_IA32_EMULATION
>
> I just tried it here. Adding -m64 to CFLAGS/AFLAGS on a native
> 64bit biarch toolchain and it compiled without problems. It ends
> up with -m64 -m32 for the 32bit vsyscall files, but that seems
> to DTRT at least in gcc 4.

Nope, passing -m64 -m32 does not seem to DTRT on native 32bit biarch
toolchain:

make -f scripts/Makefile.build obj=arch/x86_64/ia32
gcc -Wp,-MD,arch/x86_64/ia32/.vsyscall-sysenter.o.d -nostdinc
-isystem /usr/lib/gcc/i486-linux-gnu/4.0.2/include -D__KERNEL__
-Iinclude -D__ASSEMBLY__ -m64 -m32 -c -o
arch/x86_64/ia32/vsyscall-sysenter.o
arch/x86_64/ia32/vsyscall-sysenter.S
arch/x86_64/ia32/vsyscall-sysenter.S: Assembler messages:
arch/x86_64/ia32/vsyscall-sysenter.S:14: Error: suffix or operands
invalid for `push'

etc

That command succeeds if I run it by hand only passing -m32.

Lee