For the record, the following should be enough: export CXX=/usr/bin/arm-linux-gnueabihf-g++ export LINK=/usr/bin/arm-linux-gnueabihf-g++ make arm.release -j4 armfloatabi=hard armfpu=vfpv3
On Mon, Jul 8, 2013 at 1:52 PM, Benedikt Naessens <[email protected]>wrote: > Rodolphe, > > I made a simple program in C++ and found out that there was a similar > problem: multiplying two float numbers results always in 0.00 > We compiled on the board itself and the little C++ program worked. > > This made us looking a bit further: we found out that there were > incompatibilities in between the cross compiler of CodeBench Lite and the > C++ libraries/compilers installed on our Linaro distro running on our ARM > CortexA9. > > After installing the necessary Linaro cross-compilers: > > - sudo apt-get install gcc-arm-linux-gnueabihf > - sudo apt-get install g++-arm-linux-gnueabihf****** > - sudo apt-get install gdb-arm-linux-gnueabihf > > **and specifying -mfpu=vfp3 -mfloat-abi=hard as compiler flags. We saw > that our C++ application is working well.** > Now for V8, we made a script: > > #!/bin/sh > > CROSS_BASE=/usr > > PREFIX_BIN=$CROSS_BASE/bin/arm-linux-gnueabihf > > export TOOL_PREFIX=$PREFIX_BIN > > export CXX=$TOOL_PREFIX-g++ > > export LINK=$TOOL_PREFIX-g++ > > export AR=$TOOL_PREFIX-ar > > export RANLIB=$TOOL_PREFIX-ranlib > > export CC=$TOOL_PREFIX-gcc > > export LD=$TOOL_PREFIX-g++** ** > > export CCFLAGS="-mfloat-abi=hard -mfpu=vfpv3"**** > export ARM_TARGET_LIB=${CROSS_BASE}/arm-linux-gnueabihf/lib > > We run the script and then: make arm.release -j4 > OUTPUT_DIR=/your/local/output-dir > After deployment and running shell: print(3.3*2.1) works perfectly ! > > So, case closed. Sorry about the mistake and a huge thanks for your help ! > > Op vrijdag 5 juli 2013 20:41:01 UTC+2 schreef Rodolph Perfetta het > volgende: > >> In V8 you can have armfpu set (vfp or neon) and armfloatabi set (softfp >> or hard), I'll be curious to know where you read it was not possible. >> >> Did you manage to write an equivalent piece of C code? That would settle >> the flaot-abi issue. >> >> >> On 5 July 2013 16:07, Benedikt Naessens <[email protected]> wrote: >> >>> The armfpu option is a V8 make option (sorry, I didn't include the whole >>> make instruction, because I feared that it causes my posts to get >>> automatically deleted). >>> >>> print(2.2*1.1) in the V8 shell gives correct results (and of course, >>> doesn't crash). printf(2.1*2) results in an error (crash) >>> >>> When I ask for the gcc version of the codebench, then I get: gcc version >>> 4.7.2 (S0urcery C0deBench Lite 2012.09-104) >>> Unfortunately, the output of the make is usually: >>> CCX(host) .... >>> >>> So, hard to guess which one is used during building. Anyway, after >>> running the 'file' command on the produced files I get ARM files, I get: >>> "ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked >>> (uses shared libs), for GNU/Linux 2.6.16, not stripped" >>> Thus, I assume it uses the cross)compiler >>> >>> At some point during the building, it shows some warnings though: >>> "../src/profile-generator.h:**73:15: note: the mangling of 'va_list' >>> has changed in GCC 4.4" >>> >>> I am not so sure about this message, but according to me, it doesn't >>> mean it is using GCC 4.4, but just refers to the fact that the va_list has >>> changed from GCC 4.4 on (since we are using 4.7.2) >>> >>> >>> >>> Op vrijdag 5 juli 2013 15:34:12 UTC+2 schreef Rodolph Perfetta het >>> volgende: >>> >>>> When you say "I read that if you speciify armfpu option, you need to >>>> use s0ftfp instead of hard", you mean gcc option or V8 make options? >>>> >>>> Also you mentioned print(2.2*1.1) works, does this mean it prints the >>>> right result or just that it doesn't crash? Have you tried writing a small >>>> C program doing the same with printf? >>>> >>>> Finally could you give your compiler version. >>>> >>>> >>>> >>>> On 5 July 2013 13:40, Benedikt Naessens <[email protected]> wrote: >>>> >>>>> Two of my posts get deleted, I don't know which word is causing the >>>>>> problem, so I will use some symbols to avoid that my posts get >>>>>> automatically deleted. >>>>>> >>>>> >>>>> According to the Cod3S0rc3ry website, the L1t3 version doesn't have >>>>> the necessary sources to use the armfl0atabi=hard option. Anyway, I read >>>>> that if you speciify armfpu option, you need to use s0ftfp instead of >>>>> hard. >>>>> Unfortunately, it still is crashing. >>>>> >>>>> Hope no offensive word is causing the deletion of this post :) >>>>> >>>>> -- >>>>> >>>> -- -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
