This is the mail archive of the
crossgcc@sourceware.org
mailing list for the crossgcc project.
See the CrossGCC FAQ for lots
more information.
crosstool - x86_64 as i686->i686 or x86_64->i686
- From: Keith Kyzivat <kkyzivat at physiometrix dot com>
- To: crossgcc at sourceware dot org
- Date: Mon, 09 Jan 2006 16:35:48 -0500
- Subject: crosstool - x86_64 as i686->i686 or x86_64->i686
Ok, I've been struggling with this one for a few days now, to no avail.
I'm trying to build up a cross-compiler that forces crosstool to compile
as i686 with target of i686.
Versions: gcc 3.3.2, glibc 2.3.3, binutils 2.14, linux 2.6.3, crosstool-0.38
The purpose of this is to have a standardized gcc and glibc in use at my
location, and to build this under my gentoo-linux EM64T rig (amd64 build
of gentoo). Our product was compiled and released using the default gcc
and glibc installed on Mandrake 10 boxes (gcc 3.3.2, glibc 2.3.3), and
thus we've been using a cross-compiler with these versions, so we can
migrate to newer (less broken) distributions.
I've been poking through the crosstool scripts for info on how to "fake
out" the architecture, but haven't found any way yet, it always wants to
tack on x86_64 onto all build commands.
For the machines that are x86_64, I'd be happy to run a native
x86_compiler as opposed to the i686 compiler, but from my
investigations, gcc 3.3.2 will not work for this (gcc 3.3.4+ seems
needed from Dan's post
http://sourceware.org/ml/binutils/2004-01/msg00097.html).
When I try it this way, I get errors involving 64bit assembler mov
operations evalutating as 0 when building glibc stdlib. See bottom for
output.
If all else fails, I'd even be happy with a newer gcc that will allow me
to build as x86_64, host as i686, target as i686.
Any pointers in the right direction would be greatly appreciated.
Thank you,
Keith Kyzivat < kkyzivat [ -at- ] physiometrix [ -dot- ] com >
-------------% crosstool output when doing x86_64 -> i686. gcc 3.3.2,
glibc 2.3.3, binutils 2.14, linux 2.6.3 --------------
i686-unknown-linux-gnu-gcc ../sysdeps/unix/sysv/linux/system.c -c
-std=gnu99 -O -Wall -Winline -Wstrict-prototypes -Wwrite-strings
-mpreferred-stack-boundary=2 -fexceptions -I../include -I.
-I/tmp/toolchains/crosstool-0.38/build/i686-unknown-linux-gnu/gcc-3.3.2-glibc-2.3.3/build-glibc/stdlib
-I.. -I../libio
-I/tmp/toolchains/crosstool-0.38/build/i686-unknown-linux-gnu/gcc-3.3.2-glibc-2.3.3/build-glibc
-I../sysdeps/i386/elf -I../linuxthreads/sysdeps/unix/sysv/linux/i386
-I../linuxthreads/sysdeps/unix/sysv/linux
-I../linuxthreads/sysdeps/pthread -I../sysdeps/pthread
-I../linuxthreads/sysdeps/unix/sysv -I../linuxthreads/sysdeps/unix
-I../linuxthreads/sysdeps/i386/i686 -I../linuxthreads/sysdeps/i386
-I../sysdeps/unix/sysv/linux/i386 -I../sysdeps/unix/sysv/linux
-I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman
-I../sysdeps/unix/inet -I../sysdeps/unix/sysv/i386
-I../sysdeps/unix/sysv -I../sysdeps/unix/i386 -I../sysdeps/unix
-I../sysdeps/posix -I../sysdeps/i386/i686/fpu -I../sysdeps/i386/i686
-I../sysdeps/i386/i486 -I../sysdeps/i386/fpu -I../sysdeps/i386
-I../sysdeps/wordsize-32 -I../sysdeps/ieee754/ldbl-96
-I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32
-I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic
-nostdinc -isystem
/tmp/toolchains/crosstool-0.38/build/i686-unknown-linux-gnu/gcc-3.3.2-glibc-2.3.3/gcc-core-prefix/lib/gcc-lib/i686-unknown-linux-gnu/3.3.2/include
-isystem
/opt/crosstool/gcc-3.3.2-glibc-2.3.3/i686-unknown-linux-gnu/i686-unknown-linux-gnu/include
-D_LIBC_REENTRANT -include ../include/libc-symbols.h -o
/tmp/toolchains/crosstool-0.38/build/i686-unknown-linux-gnu/gcc-3.3.2-glibc-2.3.3/build-glibc/stdlib/system.o
-MD -MP -MF
/tmp/toolchains/crosstool-0.38/build/i686-unknown-linux-gnu/gcc-3.3.2-glibc-2.3.3/build-glibc/stdlib/system.o.dt
/tmp/ccWhKF6Y.s: Assembler messages:
/tmp/ccWhKF6Y.s:272: Error: missing or invalid immediate expression
`0xffffffffff800000' taken as 0
/tmp/ccWhKF6Y.s:272: Error: suffix or operands invalid for `mov'
/tmp/ccWhKF6Y.s:1101: Error: missing or invalid immediate expression
`0xffffffff80000000' taken as 0
/tmp/ccWhKF6Y.s:1101: Error: suffix or operands invalid for `mov'
/tmp/ccWhKF6Y.s:1110: Error: missing or invalid immediate expression
`0xffffffffff800000' taken as 0
/tmp/ccWhKF6Y.s:1110: Error: suffix or operands invalid for `mov'
/tmp/ccWhKF6Y.s:1204: Error: missing or invalid immediate expression
`0xffffffff80000000' taken as 0
/tmp/ccWhKF6Y.s:1204: Error: suffix or operands invalid for `mov'
/tmp/ccWhKF6Y.s:1581: Error: missing or invalid immediate expression
`0xffffffffff800000' taken as 0
/tmp/ccWhKF6Y.s:1581: Error: suffix or operands invalid for `mov'
make[2]: ***
[/tmp/toolchains/crosstool-0.38/build/i686-unknown-linux-gnu/gcc-3.3.2-glibc-2.3.3/build-glibc/stdlib/strtof_l.o]
Error 1
make[2]: *** Waiting for unfinished jobs....
/tmp/ccgAIPoD.s: Assembler messages:
/tmp/ccgAIPoD.s:272: Error: missing or invalid immediate expression
`0xffffffffff800000' taken as 0
/tmp/ccgAIPoD.s:272: Error: suffix or operands invalid for `mov'
/tmp/ccgAIPoD.s:1513: Error: missing or invalid immediate expression
`0xffffffff80000000' taken as 0
/tmp/ccgAIPoD.s:1513: Error: suffix or operands invalid for `mov'
/tmp/ccgAIPoD.s:1522: Error: missing or invalid immediate expression
`0xffffffffff800000' taken as 0
/tmp/ccgAIPoD.s:1522: Error: suffix or operands invalid for `mov'
/tmp/ccgAIPoD.s:1662: Error: missing or invalid immediate expression
`0xffffffff80000000' taken as 0
/tmp/ccgAIPoD.s:1662: Error: suffix or operands invalid for `mov'
/tmp/ccgAIPoD.s:2164: Error: missing or invalid immediate expression
`0xffffffffff800000' taken as 0
/tmp/ccgAIPoD.s:2164: Error: suffix or operands invalid for `mov'
make[2]: ***
[/tmp/toolchains/crosstool-0.38/build/i686-unknown-linux-gnu/gcc-3.3.2-glibc-2.3.3/build-glibc/stdlib/strtof.o]
Error 1
make[1]: *** [stdlib/subdir_lib] Error 2
make[1]: Leaving directory
`/tmp/toolchains/crosstool-0.38/build/i686-unknown-linux-gnu/gcc-3.3.2-glibc-2.3.3/glibc-2.3.3'
make: *** [all] Error 2
-------------% END crosstool output --------------
-------------% my cross-script launcher modelled after demo-i686.sh ------
#!/bin/sh
set -ex
TARBALLS_DIR=/tmp/downloads
RESULT_TOP=/opt/crosstool
export TARBALLS_DIR RESULT_TOP
GCC_LANGUAGES="c,c++"
export GCC_LANGUAGES
PARALLELMFLAGS="-j5"
export PARALLELMFLAGS
#GCC_HOST="i686-unknown-linux-gnu"
#export GCC_HOST
# Really, you should do the mkdir before running this,
# and chown /opt/crosstool to yourself so you don't need to run as root.
mkdir -p $RESULT_TOP
# Build the toolchain. Takes a couple hours and a couple gigabytes.
#
eval `cat i686.dat gcc-3.3.2-glibc-2.3.3.dat` sh all.sh --notest
-------------% END my cross-script launcher modelled after demo-i686.sh
------
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature