Answer the question
In order to leave comments, you need to log in
How to set up a Linux environment so that the main compiler is a crosscompiler?
Dear everyone!
Platform on Linux (Ubuntu).
A cross-platform compiler is installed (in its own folder).
Accordingly, if we are compiling code for a native platform, I simply use GCC
If I am compiling for a cross platform, I run the corresponding compiler like /home/work/openwrt/....../.....gcc
As . configure the entire Linux environment to use only the host compiler (default).
The problem is that when trying to compile libraries (for example https://github.com/brgl/libgpiod) an error occurs due to the fact (in my opinion) that the gcc linux compiler is used, and not the openwrt cross compiler in my example.
Answer the question
In order to leave comments, you need to log in
There is a make utility for building. I recommend to study, and strongly!
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question