Trying out -git, sparc sh4 and powerpc didn't build.
Rob Landley
rob at landley.net
Tue Dec 14 03:30:06 UTC 2010
On Monday 13 December 2010 10:58:06 Konrad Eisele wrote:
> Rob Landley wrote:
> > All three of these worked with the previous stable release, but not with
> > current -git. Building against 2.6.36:
> >
> > sparc died with:
> >
> > In file included from libc/sysdeps/linux/sparc/soft-fp/q_div.c:24:
> > libc/sysdeps/linux/sparc/soft-fp/quad.h:63: error: unable to emulate 'TF'
> > In file included from libc/sysdeps/linux/sparc/soft-fp/q_fle.c:24:
> > libc/sysdeps/linux/sparc/soft-fp/quad.h:63: error: unable to emulate 'TF'
> > libc/sysdeps/linux/sparc/soft-fp/q_fle.c: In function '_Q_fle':
> > libc/sysdeps/linux/sparc/soft-fp/q_fle.c:28: warning: unused variable
> > '_fcw' make: *** [libc/sysdeps/linux/sparc/soft-fp/q_fle.os] Error 1
> > make: *** Waiting for unfinished jobs....
> > make: *** [libc/sysdeps/linux/sparc/soft-fp/q_div.os] Error 1
>
> Can you send me gcc's configure line for the sparc toolchain that you use?
All targets build with:
# Are we building C only, or C and C++?
[ -z "$NO_CPLUSPLUS" ] &&
STUFF="--enable-languages=c,c++ --disable-libstdcxx-pch" ||
STUFF="--enable-languages=c"
# Configure gcc
"$CURSRC/configure" --target="$CROSS_TARGET" --prefix="$STAGE_DIR" \
--disable-multilib --disable-nls --enable-c99 --enable-long-long \
--enable-__cxa_atexit $STUFF --program-prefix="$TOOLCHAIN_PREFIX" \
"$@" $GCC_FLAGS &&
And in the case of the simple cross compiler (which is what's failing), the
call to the configure function would be:
AR_FOR_TARGET="${ARCH}-ar" configure_gcc \
--disable-threads --disable-shared --host="$CROSS_HOST"
In sources/targets/sparc/settings we have:
GCC_FLAGS="--enable-sjlj-exceptions"
And then in sources/functions.sh the generic setup gives us:
CROSS_TARGET=${ARCH}-unknown-linux
CROSS_HOST=$(uname -m)-walrus-linux
Which gives us:
AR_FOR_TARGET=sparc-ar ../gcc-core/configure --target=sparc-unknown-linux \
--prefix=/big/long/irrelevant/path --disable-multilib --disable-nls \
--enable-c99 --enable-long-long --enable-__cxa_atexit \
--enable-languages=c,c++ --disable-libstdcxx-pch \
--program=prefix=sparc- --disable-threads --disable-shared \
--host=x86_64-walrus-linux --enable-sjlj-exceptions
(And yes, using the wrong ar breaks some target, I forget which. Wasn't
sparc. I remember the target that broke when using the wrong strip was sh4.)
> Are you using a setup with a gcc/config/sparc/t-* snippet that has FPBIT
> and DPBIT not set?
Possibly? I dunno what FPBIT and DPBIT are.
I'm building stock gcc 4.2.1 with binutils 2.17 (last GPLv2 release of each, I
await either LLVM or PCC maturing to usability with bated breath). I am
applying a few patches but none of them are sparc stuff. (Half of them fix
various issues with arm, one makes libgcc_eh.a build during the --disable-
shared pass, and the rest fix OBVIOUS breakage with sh4, alpha, and mips64 of
the "how did they ever use those targets" variety).
However, sparc previously built and booted to a shell prompt under qemu for
me. (Dynamic linking was broken but static worked just fine.) Not saying it
was correct, I'm just saying it worked for me.
> FPBIT =
> DPBIT =
>
> t-elf for instance defines:
> ...
> FPBIT = fp-bit.c
> DPBIT = dp-bit.c
gcc/config/sparc/t-linux contains no mention of those.
You're saying that to build for linux I need to specify sparc-elf instead of
sparc-unknown-linux the way all the other targets work? (I can patch gcc if
it would help. I'm more or less maintaining a feature-frozen GPLv2 fork of
the thing until LLVM/PCC/tinycc/something matures, since I refuse to get any
GPLv3 on me unless paid to do so. However, the previous release didn't need
this...)
> dp-bit.c: $(srcdir)/config/fp-bit.c
> cat $(srcdir)/config/fp-bit.c > dp-bit.c
>
> fp-bit.c: $(srcdir)/config/fp-bit.c
> echo '#define FLOAT' > fp-bit.c
> cat $(srcdir)/config/fp-bit.c >> fp-bit.c
> ...
>
> if I can reproduce the error here (if you send the gcc configure line) I
> can try to post a patch that handles the error...
> -- Greetings Konrad
Cool. Thanks.
(I can send you a binary version of a cross compiler that build 0.9.31 if
you'd like. I have tarballs up at
http://landley.net/aboriginal/downloads/binaries for all the targets I've
gotten to work so far. It's 32 bit x86 host binaries statically linked
against uClibc and wrapped to be path-agnostic, so you can just drop them into
your home directory or something and add the "bin" subdirectory to your $PATH,
then use the prefixed tool names ala "sparc-cc" and "sparc-ld" and such.)
Rob
--
GPLv3: as worthy a successor as The Phantom Menace, as timely as Duke Nukem
Forever, and as welcome as New Coke.
More information about the uClibc
mailing list