Hi Rodolph, Thank you so much!!!
This works like a charm. V8 team should document this somewhere. I also added werror=no to avoid some warnings became errors because using newer toolchain (Linaro 5.2). ./tools/cross_build_gcc.sh $PREFIX arm.release hardfp=on werror=no -j8 Johnny On Mon, Jan 11, 2016 at 9:44 PM, Rodolph Perfetta < [email protected]> wrote: > Hi Johnny, > > When cross compiling for 32-bit arm you need to explicitly prevent the use > of the built-in linker. Simply export > GYPFLAGS="-Dlinux_use_bundled_gold=0" > > You don't need the "-DClang=0" if you define CC, CXX and others. The v8 > code base already has a script to cross compile, in the tools directory. In > your case you would do something like: > > export GYPFLAGS="-Dlinux_use_bundled_gold=0" > export LDFLAGS="-static" # if you need static build > ./tools/cross_build_gcc.sh usr/bin/arm-linux-gnueabihf arm.release > hardfp=on -j8 > > The script will be build with snapshot off by default, edit it to change > this behaviour. > > Cheers, > Rodolph > > On Sat, 2 Jan 2016 at 02:00 Johnny You <[email protected]> wrote: > >> Hi Jakob, >> >> I'm having this problem when cross compiling V8 for arm in Ubuntu 15.10 >> (VirtualBox). >> >> The problem is still exist even after adding GYPFLAGS="-Dclang=0" >> >> The error is still the same: >> >> third_party/llvm-build/Release+Asserts/bin/clang++: 1: >> /Workspace/GoogleSource/v8_lubuntu_eabihfp_exe_32/third_party/llvm-build/Release+Asserts/bin/clang++: >> Syntax error: ")" unexpected >> >> Could you help to find out where went wrong? Thank you. >> >> Below is my build script build.sh: >> >> >> #!/bin/bash >> >> >> ARMPATH=/usr >> >> >> SYSROOTPATH=/Workspace/GoogleSource/sysroot-linaro-glibc-gcc5.2-2015.11- >> arm-linux-gnueabihf >> TCPATH=$ARMPATH >> PREFIX=$ARMPATH/bin/arm-linux-gnueabihf- >> >> >> export CC=${PREFIX}gcc >> export CXX=${PREFIX}g++ >> export AR=${PREFIX}ar >> export RANLIB=${PREFIX}ranlib >> export LINK=$CXX >> export CROSS_COMPILE=${TCPATH} >> >> >> export LD_R_PATH=$SYSROOTPATH/usr/lib:$SYSROOTPATH/lib >> >> export LDSO_PATH=$SYSROOTPATH/lib/ld-2.21.so >> >> >> export GYPFLAGS="-Dclang=0" >> make arm.release GYPFLAGS="-Dclang=0" hardfp=on -j8 >> >> >> >> >> >> >> >> On Friday, May 22, 2015 at 6:57:12 PM UTC+8, Jakob Kummerow wrote: >> >>> The bundled clang is a 64-bit binary. On a 32-bit system, try: >>> >>> $ make ia32.release GYPFLAGS="-Dclang=0" >>> >> On Fri, May 22, 2015 at 12:12 PM, Vipresh Jha <[email protected]> >>> wrote: >>> >> >>>> I am trying to build v8 by following instructions listed on this page >>>> http://code.google.com/p/v8-wiki/wiki/BuildingWithGYP >>>> I also downloaded the code by following instructions on this page >>>> http://code.google.com/p/v8-wiki/wiki/UsingGit >>>> >>>> But when i try to "make" a release build for ia32 i get the the >>>> following error "Syntax error: word unexpected (expecting ")") " . I >>>> googled about this error for two days but with no luck , I also tried >>>> different approaches but none of them work. >>>> Please provide a solution if possiblle. >>>> >>>> Below I am copy pasting the command I issued and its outcome >>>> >>>> ----------------------------------------------- >>>> *Output of "make ia32.release"* >>>> ---------------------------------------------- >>>> vipresh@ubuntu:~/v8$ make ia32.release >>>> PYTHONPATH="/home/vipresh/v8/tools/generate_shim_headers:/home/vipresh/v8/build::/home/vipresh/v8/build/gyp/pylib:" >>>> \ >>>> GYP_GENERATORS=make \ >>>> build/gyp/gyp --generator-output="out" build/all.gyp \ >>>> -Ibuild/standalone.gypi --depth=. \ >>>> -Dv8_target_arch=ia32 \ >>>> \ >>>> \ >>>> -S.ia32.release -Dv8_enable_backtrace=1 >>>> -Darm_fpu=default -Darm_float_abi=default >>>> make[1]: Entering directory `/home/vipresh/v8/out' >>>> CXX(target) >>>> /home/vipresh/v8/out/ia32.release/obj.target/v8_base/src/accessors.o >>>> /home/vipresh/v8/third_party/llvm-build/Release+Asserts/bin/clang++: 2: >>>> /home/vipresh/v8/third_party/llvm-build/Release+Asserts/bin/clang++: Syntax >>>> error: word unexpected (expecting ")") >>>> make[1]: *** >>>> [/home/vipresh/v8/out/ia32.release/obj.target/v8_base/src/accessors.o] >>>> Error 2 >>>> make[1]: Leaving directory `/home/vipresh/v8/out' >>>> make: *** [ia32.release] Error 2 >>>> >>>> ****************************************** >>>> >>>> ---------------------------------------- >>>> *Output of "uname -a" command* >>>> --------------------------------------- >>>> vipresh@ubuntu:~/v8$ uname -a >>>> Linux ubuntu 3.8.0-44-generic #66~precise1-Ubuntu SMP Tue Jul 15 >>>> 04:04:23 UTC 2014 i686 i686 i386 GNU/Linux >>>> >>>> ********************************************* >>>> >>>> ----------------------------- >>>> *Output of "gcc -v" command* >>>> --------------------------------------- >>>> vipresh@ubuntu:~/v8$ gcc -v >>>> Using built-in specs. >>>> COLLECT_GCC=gcc >>>> COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/4.9/lto-wrapper >>>> Target: i686-linux-gnu >>>> Configured with: ../src/configure -v --with-pkgversion='Ubuntu >>>> 4.9.2-0ubuntu1~12.04' >>>> --with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs >>>> --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr >>>> --program-suffix=-4.9 --enable-shared --enable-linker-build-id >>>> --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix >>>> --with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls >>>> --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug >>>> --enable-libstdcxx-time=yes --enable-gnu-unique-object >>>> --disable-vtable-verify --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.9-i386/jre >>>> --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-i386 >>>> --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-i386 >>>> --with-arch-directory=i386 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar >>>> --enable-objc-gc --enable-targets=all --enable-multiarch --disable-werror >>>> --with-arch-32=i686 --with-multilib-list=m32,m64 --enable-multilib >>>> --with-tune=generic --enable-checking=release --build=i686-linux-gnu >>>> --host=i686-linux-gnu --target=i686-linux-gnu >>>> Thread model: posix >>>> gcc version 4.9.2 (Ubuntu 4.9.2-0ubuntu1~12.04) >>>> >>>> *********************************************** >>>> >>>> >>>> ------------------------------------------------------------------------------------------- >>>> *Output of "clang -v"* >>>> >>>> ------------------------------------------------------------------------------- >>>> vipresh@ubuntu:~/v8$ clang -v >>>> Ubuntu clang version 3.0-6ubuntu3 (tags/RELEASE_30/final) (based on >>>> LLVM 3.0) >>>> Target: i386-pc-linux-gnu >>>> Thread model: posix >>>> >>>> *********************************************************** >>>> >>>> If you need any other info please let me know . >>>> >>> -- >>>> -- >>>> 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/d/optout. >>>> >>> -- >> -- >> 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/d/optout. >> > -- > -- > v8-users mailing list > [email protected] > http://groups.google.com/group/v8-users > --- > You received this message because you are subscribed to a topic in the > Google Groups "v8-users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/v8-users/y0T-YP3cUaE/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- -- 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/d/optout.
