gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gm2] gm2 building native on ARM - Raspberry Pi - floating point inc


From: Gaius Mulley
Subject: Re: [Gm2] gm2 building native on ARM - Raspberry Pi - floating point incompatibility
Date: Mon, 10 Feb 2014 10:33:21 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)

JD <address@hidden> writes:

> My build on ARM has failed with the error:
>
>     /usr/bin/ld: error: ./libgcc_s.so.1.tmp uses VFP register arguments,
>     libgcc.a(linux-atomic.o) does not
>     /usr/bin/ld: failed to merge target specific data of file libgcc.a
>     (linux-atomic.o)
>
> This was on the command:
>
>     /home/pi/GM2/scratch-area/build-4.7.3/./gcc/xgcc -B/home/pi/GM2/
>     scratch-area/build-4.7.3/./gcc/ -B/home/pi/opt/
>     armv6l-unknown-linux-gnueabihf/bin/  ...
>
> This has about 1800 .o arguments and about 1700 of them errored!
>
> The Raspberry Pi has hardware floating point - the Vector Floating Point
> coprocessor mentioned in the error message.  As far as I can see so does the
> Odroid U3, which you, Gaius, successfully built on.  Do you know why I have 
> the
> VFP register errors?  I also see that yours is ARMv7l, whereas the Pi
> is ARMv6.


Hi John,

I'd try looking at the native gcc configure options, for example on the pi:

$ gcc -v

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.6/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Debian 4.6.3-8+rpi1' 
--with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs 
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr 
--program-suffix=-4.6 --enable-shared --enable-linker-build-id 
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext 
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu 
--enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object 
--enable-plugin --enable-objc-gc --disable-sjlj-exceptions --with-arch=armv6 
--with-fpu=vfp --with-float=hard --enable-checking=release 
--build=arm-linux-gnueabihf --host=arm-linux-gnueabihf 
--target=arm-linux-gnueabihf
gcc version 4.6.3 (Debian 4.6.3-8+rpi1) 


what was strange with the odroid was that I used the same build script
which I use to build on the x86_64 platform.  But the odroid is running
Ubuntu and its native gcc was 4.8.1 and was configured:

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.8/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
4.8.1-10ubuntu9' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs
--enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.8 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib
--enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--enable-gnu-unique-object --disable-libitm --disable-libquadmath
--enable-plugin --with-system-zlib --disable-browser-plugin
--enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-armhf/jre
--enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-armhf
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-armhf
--with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-multiarch --enable-multilib
--disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3-d16
--with-float=hard --with-mode=thumb --disable-werror
--enable-checking=release --build=arm-linux-gnueabihf
--host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
Thread model: posix
gcc version 4.8.1 (Ubuntu/Linaro 4.8.1-10ubuntu9)

> I've found a few suggestions for putting in extra gcc parameters:  
> -mfloat-abi=
> softfp, or
> -mfloat-abi=hard, or -marm -mthumb-interwork.  Where can I put these?  Do I
> need to edit the Makefile and push them into $FLAGS_FOR_TARGET? 

no they should be set at 'configure' time.  Which will map them into the
generated Makefile's in the build directory

> The configure log contains a 'uname -m' of armv6l.
>
> On the way to this point I had cases where file items were not in the expected
> places:  
>
>   * /usr/include/arm-linux-gnueabihf contained the asm, bits, gnu, sys
>     directories.  I copied them to /usr/include

ouch :-)  I'd try not to pollute the main distro (if at all possible).  

>   * similarly, /usr/lib/arm-linux-gnueabihf/ had the 3 crt?.o files;  I linked
>     them to ~/GM2/scratch-area/build-4.7.3/./gcc

ok

> In those cases I just re-ran make; I didn't re-configure.  I was using the
> tarball of 24/12014.

ah you should re-configure if you change the base distribution or if you
download a new tarball

regards,
Gaius



reply via email to

[Prev in Thread] Current Thread [Next in Thread]