tech-toolchain archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: failure to link programs when compiled with -msoft-float
(Cc'ed to tech-toolchain)
lidl%pix.net@localhost wrote:
> I've been working on getting the mvme68k port to cross-build
> from my sun4u build host. I think the following problem is
> generic to the m68k toolchain that NetBSD uses.
>
> I've worked through various issues, and with a recent pullup of
> a fix from the gcc people, the compiler no longer errors out
> when compiling various bits of libc (in particular the strtod.c file)
> with -msoft-float specified.
>
> So, my build (with -msoft-float turned on) now stops when it
> attempts to link the first userland binary. (Which is either
> bin/cat or gnu/usr.bin/bc, depending on whether I use -j 2,
> or no -j flag at all.) The error at the failure is the same:
>
> # compile bc/util.o
> /nbsd/mvme68k/tools/bin/m68k--netbsdelf-gcc -O2 -pipe -m68040 -msoft-float
> -Werror -D_POSIX_SOURCE -funsigned-char -I. -I/nbsd/src/gnu/usr.bin/bc
> -I/nbsd/src/gnu/dist/bc/bc -I/nbsd/src/gnu/dist/bc/h -nostdinc -isystem
> /nbsd/mvme68k/nbuild/usr/include -c /nbsd/src/gnu/dist/bc/bc/util.c
> # link bc/bc
> /nbsd/mvme68k/tools/bin/m68k--netbsdelf-gcc -Wl,-nostdlib -o bc
> -Wl,-rpath-link,/nbsd/mvme68k/nbuild/lib:/nbsd/mvme68k/nbuild/usr/lib
> -L/nbsd/mvme68k/nbuild/lib -B/nbsd/mvme68k/nbuild/usr/lib/
> -B/nbsd/mvme68k/nbuild/usr/lib/ bc.o execute.o global.o load.o main.o
> number.o scan.o storage.o util.o -ll -ledit -ltermcap
> -L/nbsd/mvme68k/nbuild/usr/lib -L/nbsd/mvme68k/nbuild/usr/lib
> /nbsd/mvme68k/nbuild/lib/libc.so: undefined reference to `__eqdf2'
> /nbsd/mvme68k/nbuild/lib/libc.so: undefined reference to `__fixsfsi'
> /nbsd/mvme68k/nbuild/lib/libc.so: undefined reference to `__gtdf2'
> /nbsd/mvme68k/nbuild/lib/libc.so: undefined reference to `__ltdf2'
> /nbsd/mvme68k/nbuild/lib/libc.so: undefined reference to `__lesf2'
> /nbsd/mvme68k/nbuild/lib/libc.so: undefined reference to `__mulxf3'
> /nbsd/mvme68k/nbuild/lib/libc.so: undefined reference to `__gtsf2'
> /nbsd/mvme68k/nbuild/lib/libc.so: undefined reference to `__ledf2'
> /nbsd/mvme68k/nbuild/lib/libc.so: undefined reference to `__floatsisf'
> /nbsd/mvme68k/nbuild/lib/libc.so: undefined reference to `__ltsf2'
> /nbsd/mvme68k/nbuild/lib/libc.so: undefined reference to `__nedf2'
> /nbsd/mvme68k/nbuild/lib/libc.so: undefined reference to `__gesf2'
> /nbsd/mvme68k/nbuild/lib/libc.so: undefined reference to `__gedf2'
> collect2: ld returned 1 exit status
>
> *** Failed target: bc
> *** Failed command: /nbsd/mvme68k/tools/bin/m68k--netbsdelf-gcc -Wl,-nostdlib
> -o bc -Wl,-rpath-link,/nbsd/mvme68k/nbuild/lib:/nbsd/mvme68k/nbuild/usr/lib
> -L/nbsd/mvme68k/nbuild/lib -B/nbsd/mvme68k/nbuild/usr/lib/
> -B/nbsd/mvme68k/nbuild/usr/lib/ bc.o execute.o global.o load.o main.o
> number.o scan.o storage.o util.o -ll -ledit -ltermcap
> -L/nbsd/mvme68k/nbuild/usr/lib -L/nbsd/mvme68k/nbuild/usr/lib
> *** Error code 1
>
> Stop.
> nbmake: stopped in /nbsd/src/gnu/usr.bin/bc
>
> I found the following interesting looking patch in the gcc archives,
> which looks like it addresses this exact problem. Comments?
>
> http://gcc.gnu.org/ml/gcc-patches/2007-07/msg02078.html
>
> -Kurt
These functions are in libgcc and compiled only in
softfloat configuration case, it seems.
Maybe we also have to prepare softfloat version of
src/gnu/lib/libgcc4/arch/m68k.mk to include these
functions into libgcc (arch/m68000.mk already has them),
and choose appropriate one by ${MKSOFTFLOAT} in Makefiles
in src/gnu/lib/libgcc4/libgcc* dirs.
---
Izumi Tsutsui
Home |
Main Index |
Thread Index |
Old Index