GCC Crosscompiler Update for Jetson TX2?

My team and I are using the currently supplied GCC 4.8 cross-compiler for download in the download center. However we have run into some issues with the fact that the board itself provides GCC 5.4 on board, making any libraries we have built on target incompatible with the cross-compiler GCC version. There is an obvious workaround to just rebuild everything with one compiler, however this can be time consuming.

I was wondering if there are currently any plans to update the cross-compiler to a newer version of GCC?

As a workaround you might browse here (I’ve used several newer compilers of different major version with success):

What is the syntax for the cross compiler provided by JetPack? Instead of gcc, is there another command?

Such as the one used here http://www.fabriziodini.eu/posts/cross_compile_tutorial/
Specifically the fourth to last code box on that page.

I’m on Fedora right now, so this probably won’t match exactly. However, “gcc” is for native architecture compile. When there is a foreign architecture (in this case “arm64” or “aarch64”), then the architecture is prefixed to the compiler name. In this case it should be:


Tab completion is your friend here…if you type “aarch64”, and then hit the tab key a few times, then if this is in your default path it will tell you where to find the cross tool chain (further down there is mention of needing this prefix for CROSS_COMPILE path).

When cross compiling you would normally use the cross compile name and not just gcc, and you would also name architecture. When building a kernel there are features to make this simpler, but this won’t necessarily exist for other software (the mechanism for naming architecture in a kernel build is to set environment variable “ARCH=arm64” and CROSS_COMPILE is the path leading to the alternate name gcc, e.g., for Fedora “/usr/lib64/ccache/aarch64-linux-gnu-”).

User space software is more complicated than kernel builds because the kernel is bare metal and has no need for linkers and libraries. Once you go to user space builds you need added information for cross linker and cross library paths. Not all of the simple environment settings of a kernel build will necessarily be available for non-kernel software (non-bare-metal software).