[patch]: native binutils build on arm

Khem Raj kraj at mvista.com
Wed Aug 9 21:48:28 UTC 2006


Hi

While building latest binutils from head natively on uclibc system. The
build error

loatformat.o): In function `floatformat_from_double':
floatformat.c:(.text+0x250): undefined reference to `frexp'
floatformat.c:(.text+0x360): undefined reference to `ldexp'
/build_area/BUILD/arm_iwmmxt_le_uclibc/binutils-2.17.50/objdir/libiberty
/pic/libiberty.a(floatformat.o): In function `floatformat_to_double':
floatformat.c:(.text+0x3e2): undefined reference to `ldexp'
floatformat.c:(.text+0x434): undefined reference to `ldexp'
floatformat.c:(.text+0x4ba): undefined reference to `ldexp'
floatformat.c:(.text+0x584): undefined reference to `ldexp'
collect2: ld returned 1 exit status
make[4]: *** [as-new] Error 1


These symbols are in libm and gas is not being linked with libm here

The following patch fixes the problem for arm. I think this fix might be
needed for all uclibc arches but I haven't tested other arches.

Index: binutils-2.17.50/gas/configure
===================================================================
--- binutils-2.17.50.orig/gas/configure
+++ binutils-2.17.50/gas/configure
@@ -3414,6 +3414,12 @@ linux-gnu*)
  lt_cv_deplibs_check_method=pass_all
  ;;

+linux-uclibc*)
+  need_libm=yes
+  ;;
+
netbsd* | knetbsd*-gnu)
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
    lt_cv_deplibs_check_method='match_pattern
/lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'

Thanks


-- 
Khem Raj
MontaVista Software Inc.
kraj at mvista.com




More information about the uClibc mailing list