How To: Using latest GCC for cross compiling

Sysprogs forums Forums VisualGDB How To: Using latest GCC for cross compiling

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #957
    jmorrill
    Participant

    I saw some people here wanted to use the latest gcc for C++ 11/14. Here’s what I’m doing:

    1.) In VisualGDB, setup your project like you would if you were going to cross compile for RP or Beagle Bone
    2.) Download the Linaro tool chain here: http://www.linaro.org/downloads/ linaro-toolchain-binaries 4.9 (little-endian)
    3.) Install Linaro in C:SysGCClinaro
    4.) Edit your debug/release.mak files to look like this (verify the Linaro installed to correct path):

    #Toolchain
    CC := C:/SysGCC/linaro/bin/arm-linux-gnueabihf-gcc.exe
    CXX := C:/SysGCC/linaro/bin/arm-linux-gnueabihf-g++.exe
    LD := $(CXX)
    AR := C:/SysGCC/linaro/bin/arm-linux-gnueabihf-ar.exe
    OBJCOPY := C:/SysGCC/linaro/bin/arm-linux-gnueabihf-objcopy.exe

    Of course make sure to use the -std=c++1y or -std=c++11 flags to use the C++ features in GCC.

    Intellisense is kind of broken here because VS defines _cplusplus as 199711L. Please note I have not done RP, but this does work on BeagleBone and ODroid.

    Hope this helps

    -Jer

    #3508
    support
    Keymaster

    Hi,

    Thanks for sharing this. You can also select a custom toolchain in the VisualGDB Project Wizard, then VisualGDB will detect your toolchain version correctly and adjust IntelliSense accordingly.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.