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

Angel Ivan Castell Rovira al004140 at gmail.com
Mon Apr 4 06:03:07 PDT 2011


2011/4/4 Andrew Bradford <bradfa at gmail.com>

> 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"
> _______________________________________________
> Clfs-support mailing list
> Clfs-support at lists.cross-lfs.org
> http://lists.cross-lfs.org/listinfo.cgi/clfs-support-cross-lfs.org
>



Hello Mr. Andrew.

Yes! That patch fixes this problem. I just have finished to build the
complete cross-toolchain right now (also the gcc cross-compiler). I have
obtained the same result using the second patch you told to me last Friday:

http://busybox.net/~aldot/gcc/4.4.2/810-arm-softfloat-libgcc.patch

I made the mistake to compare visually both patches, and both of them look
exactly the same, but they are not equal, they have tiny but important
differences... Unfortunately, I tested all the process with ''openwrt'
patch, just the one it doesn't works (murphy's laws...).

So, this issue can be closed as solved. I am really happy to obtain that
working cross-toolchain from scratch.

I deeply appreciate all your useful help.
Thank you very much!! :-)

Best regards,
  -- Ivan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.clfs.org/pipermail/clfs-support-clfs.org/attachments/20110404/48f32452/attachment.html>


More information about the Clfs-support mailing list