[Clfs-support] Linkage error when making uClibc-0.9.31

Andrew Bradford bradfa at gmail.com
Mon Apr 4 04:19:54 PDT 2011


On Fri, Apr 1, 2011 at 11:18 AM, Angel Ivan Castell Rovira
<al004140 at gmail.com> wrote:
> 2011/4/1 Andrew Bradford <bradfa at gmail.com>
>>
>> I found some patches that might help, one from OpenWRT relating to arm
>> uClibc softfloat on GCC 4.5.1:
>>
>> https://dev.openwrt.org/browser/trunk/toolchain/gcc/patches/4.5.1/810-arm-softfloat-libgcc.patch?rev=22450
>>
>> Another that looks basically the same from a developer on BusyBox but
>> is listed for GCC 4.4.2:
>> http://busybox.net/~aldot/gcc/4.4.2/810-arm-softfloat-libgcc.patch
>
> Both patches seem to be the same. I have tested the one from "openwrt" with
> gcc 4.5.2, and the issues reported yesterday at this forum seems to
> reproduce exactly the same problem.

Ivan,

I've got uClibc to build for armv4t soft float.  The patch I've used
for gcc-4.5.2 looks a lot like the two I pointed out above.  I've put
it at the end of this email and included a link below.  I got it from
the buildroot 2011.02 release.  Apply to gcc before configuring
gcc-static in the gcc-4.5.2 directory (not the gcc-build directory):

patch -Np1 -i /path/to/810-arm-softfloat-libgcc.patch

Patch online here:
http://git.buildroot.net/buildroot/tree/toolchain/gcc/4.5.2/810-arm-softfloat-libgcc.patch

Don't worry about the 4.4.0 version number, it'll apply and work fine.
The patch should fall under GPLv2 (that's what the buildroot page
says), just an FYI if you're distributing your tool chain binaries.

I don't think the patch is needed when building gcc-final.

If you are successful when using this patch, please let me know and
I'll work to include it in the CLFS embedded book.

See if that helps.
-Andrew

*************************************************************

[PATCH] add the correct symbols to libgcc for uclibc arm softfloat

Signed-off-by: Peter Korsgaard <jacmet at sunsite.dk>
---
 gcc/config/arm/linux-elf.h |    2 +-
 gcc/config/arm/t-linux     |    6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

Index: gcc-4.4.0/gcc/config/arm/t-linux
===================================================================
--- gcc-4.4.0.orig/gcc/config/arm/t-linux
+++ gcc-4.4.0/gcc/config/arm/t-linux
@@ -4,7 +4,11 @@

 LIB1ASMSRC = arm/lib1funcs.asm
 LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \
-	_arm_addsubdf3 _arm_addsubsf3
+	_arm_addsubdf3 _arm_addsubsf3 \
+	_arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \
+	_arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \
+	_arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \
+	_arm_fixsfsi _arm_fixunssfsi

 # MULTILIB_OPTIONS = mhard-float/msoft-float
 # MULTILIB_DIRNAMES = hard-float soft-float
Index: gcc-4.4.0/gcc/config/arm/linux-elf.h
===================================================================
--- gcc-4.4.0.orig/gcc/config/arm/linux-elf.h
+++ gcc-4.4.0/gcc/config/arm/linux-elf.h
@@ -60,7 +60,7 @@
    %{shared:-lc} \
    %{!shared:%{profile:-lc_p}%{!profile:-lc}}"

-#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
+#define LIBGCC_SPEC "-lgcc"

 #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"



More information about the Clfs-support mailing list