This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Crosstool 0.28-rc37 and NPTL capable x86 toolchain


I'm attempting to use crosstool 0.28-rc37 to build a host=fedora core 2,
target=i686-unknown-linux-gnu toolchain - for the purposes of building
an x86 target image, using a toolchain divorced from the build system.

(Note: I'm aware that e.g. LFS uses a much more complex process than
simply building a cross-compiler, so as to divorce itself completely
from the host. I'm assuming that since crosstool forces a build of a
cross-compiler, it's equivalent. Still, I guess the built toolchain
still relies on the host system glibc and hence could be affected by
bugs there at runtime, but that's no worse than if I were building cross
to any other target I think?)

Anyway, I need NPTL support for my target. So, I attempted to apply
contrib/crosstool-0.28-rc34-nptl_fixes.patch. I ignored the errors to
all the config files (*.dat and related), manually fixed the reject to
getandpatch.sh, built my own config files and attempted to build.

My config files are:

nvidia-build-i686.sh
============================
#!/bin/sh
set -ex
TARBALLS_DIR=/home/swarren/src/tar
RESULT_TOP=/home/swarren/crosstool-nptl
export TARBALLS_DIR RESULT_TOP
GCC_LANGUAGES="c,c++"
export GCC_LANGUAGES
GLIBC_ADDON_NPTL=1
export GLIBC_ADDON_NPTL
mkdir -p $RESULT_TOP
eval `cat nvidia-i686.dat nvidia-gcc-3.4.3-glibc-2.3.3.dat` sh all.sh
--notest
============================

nvidia-i686.dat
============================
TARGET=i686-unknown-linux-gnu
TARGET_CFLAGS="-O"
============================

nvidia-gcc-3.4.3-glibc-2.3.3.dat
============================
BINUTILS_DIR=binutils-2.15
GCC_DIR=gcc-3.4.3
GLIBC_DIR=glibc-2.3.3
LINUX_DIR=linux-2.6.9
============================

When I run this, I get an error about undefined symbols _Unwind_Resume
and __gcc_personality_v0:

...

i686-unknown-linux-gnu-gcc  -nostdlib -nostartfiles -static -o
/home/swarren/src/crosstool-0.28-rc37-nptl/build/i686-unknown-linux-gnu/
gcc-3.4.3-glibc-2.3.3/build
-glibc/elf/sln
/home/swarren/src/crosstool-0.28-rc37-nptl/build/i686-unknown-linux-gnu/
gcc-3.4.3-glibc-2.3.3/build-glibc/csu/crt1.o
/home/swarren/src/crosstool-
0.28-rc37-nptl/build/i686-unknown-linux-gnu/gcc-3.4.3-glibc-2.3.3/build-
glibc/csu/crti.o `i686-unknown-linux-gnu-gcc
--print-file-name=crtbegin.o` /home/swarren/
src/crosstool-0.28-rc37-nptl/build/i686-unknown-linux-gnu/gcc-3.4.3-glib
c-2.3.3/build-glibc/elf/sln.o
/home/swarren/src/crosstool-0.28-rc37-nptl/build/i686-unkno
wn-linux-gnu/gcc-3.4.3-glibc-2.3.3/build-glibc/libc.a -lgcc
/home/swarren/src/crosstool-0.28-rc37-nptl/build/i686-unknown-linux-gnu/
gcc-3.4.3-glibc-2.3.3/build-gl
ibc/libc.a `i686-unknown-linux-gnu-gcc  --print-file-name=crtend.o`
/home/swarren/src/crosstool-0.28-rc37-nptl/build/i686-unknown-linux-gnu/
gcc-3.4.3-glibc-2.3.3/
build-glibc/csu/crtn.o

/home/swarren/src/crosstool-0.28-rc37-nptl/build/i686-unknown-linux-gnu/
gcc-3.4.3-glibc-2.3.3/build-glibc/libc.a(iofclose.o)(.text+0xd3): In
function `fclose':
: undefined reference to `_Unwind_Resume'

... (more for the same symbol)

/home/swarren/src/crosstool-0.28-rc37-nptl/build/i686-unknown-linux-gnu/
gcc-3.4.3-glibc-2.3.3/build-glibc/libc.a(ioseekoff.o)(.eh_frame+0x12):
undefined reference
 to `__gcc_personality_v0'

collect2: ld returned 1 exit status

So, any ideas what's up?

I notice that the error is building the "sln" executable. Somebody
previously on this list mentioned this problem, I think for a MIPS NPTL
toolchain, but I think they ignored the error, since they could build
the kernel with the new toolchain which was all they wanted (but they
why did they want NPTL in that case - perhaps I misremember?) I'd like
to actually get the resultant GLIBC installed so I can use it for
building user-space code, so I can't just ignore this error!

If/when I get this working, I'd be quite happy to rediff the contrib
NPTL script against rc37 so it applies cleanly - I'd probably split it
up into a separate core patch, and one that does all the .dat files etc.

Thanks for any help.

-- 
Stephen Warren, Software Engineer, NVIDIA, Fort Collins, CO
swarren@nvidia.com        http://www.nvidia.com/
swarren@wwwdotorg.org     http://www.wwwdotorg.org/pgp.html

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]