Am Donnerstag, den 08.03.2007, 12:43 +1000 schrieb Greg Ungerer:
> Hi Josef,
> 
> Wolf, Josef wrote:
> > I have a problem with HW/SW floating-point mismatches when I try to
> > compile uClinux-dist-20051014 with arm-linux-tools-20061213.  The
> > problem
> > appears when compilation of the user directory (starting with boa)
> > starts
> > 
> >   [ ... ]
> >   ucfront-gcc arm-linux-gcc  -Os                     -g
> > -fomit-frame-pointer -fno-common -fno-builtin -Wall   -DEMBED -D__PIC__
> > -fpic -msingle-pic-base -Dlinux -D__linux__ -Dunix -D__uClinux__
> > -malignment-traps  -DSYSLOGS_AT_EMERG -DBOA_TIME_LOG   -c -o util.o
> > util.c
> >   ucfront-gcc arm-linux-gcc  -Wl,-elf2flt -D__PIC__ -fpic
> > -msingle-pic-base -o boa alias.o auth.o boa.o cgi.o cgi_header.o
> > config.o get.o hash.o globals.o log.o nls.o pipe.o queue.o read.o
> > request.o response.o signals.o timestamp.o util.o -lcrypt
> >  
> > /m/a/tmp/uclinux/install/arm-linux-tools-20061213/local/bin/../lib/gcc/a
> > rm-linux/3.4.4/../../../../arm-linux/bin/ld.real: ERROR: alias.o uses
> > hardware FP, whereas boa.gdb uses software FP
> >  
> > /m/a/tmp/uclinux/install/arm-linux-tools-20061213/local/bin/../lib/gcc/a
> > rm-linux/3.4.4/../../../../arm-linux/bin/ld.real: failed to merge target
> > specific data of file alias.o
> >   [ ... ]
> > 
> > To solve this, I put CFLAGS += -msoft-float in
> > vendors/config/armnommu/config.arch.  Then the error changes into:
> > 
> >   [ ... ]
> >   ucfront-gcc arm-linux-gcc  -Os                     -g
> > -fomit-frame-pointer -fno-common -fno-builtin -Wall   -DEMBED -D__PIC__
> > -fpic -msingle-pic-base -Dlinux -D__linux__ -Dunix -D__uClinux__
> > -msoft-float -malignment-traps  -DSYSLOGS_AT_EMERG -DBOA_TIME_LOG   -c
> > -o util.o util.c
> >   ucfront-gcc arm-linux-gcc  -Wl,-elf2flt -D__PIC__ -fpic
> > -msingle-pic-base -o boa alias.o auth.o boa.o cgi.o cgi_header.o
> > config.o get.o hash.o globals.o log.o nls.o pipe.o queue.o read.o
> > request.o response.o signals.o timestamp.o util.o -lcrypt
> 
> This final link line will need a "-msoft-float" as well.
> Otherwise it will try to link against the wrong libgcc.a
> 
> 
> > /m/a/tmp/uclinux/install/arm-linux-tools-20061213/local/bin/../lib/gcc/a
> > rm-linux/3.4.4/../../../../arm-linux/bin/ld.real: ERROR:
> > /m/a/tmp/uclinux/install/arm-linux-tools-20061213/local/bin/../lib/gcc/a
> > rm-linux/3.4.4/libgcc.a(_udivsi3.o) uses hardware FP, whereas boa.gdb
> > uses software FP
> >  
> > /m/a/tmp/uclinux/install/arm-linux-tools-20061213/local/bin/../lib/gcc/a
> > rm-linux/3.4.4/../../../../arm-linux/bin/ld.real: failed to merge target
> > specific data of file
> > /m/a/tmp/uclinux/install/arm-linux-tools-20061213/local/bin/../lib/gcc/a
> > rm-linux/3.4.4/libgcc.a(_udivsi3.o)
> >   [ ... ]
> > 
> > indicating that boa is linked against a library with HW-FP.  I have
> > checked documentation of gcc and ld, but I can't find how to tell the
> > linker to link against a library with SW-FP.  The linker don't seem
> > to like -msoft-float.
> > 
> > Can anybody tell me how to tell the linker against libraries with SW-FP?
> 
> If you are direct using the linker you would want "-EB". But if you are
> linking through gcc then you just use "-msoft-float".
> 
> Regards
> Greg

-EB ??? I thought that is for big endian linking, isn't it?
I believe that the linker doesn't have any option for hard/soft FP, it's
the compilers task to create the right object files, and the linker just
has to be feeded with the right combination of object files and
libraries.

Regards,
Erwin


_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to