V
V
Vladimir2019-12-21 22:01:33
linux
Vladimir, 2019-12-21 22:01:33

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

3 answer(s)
A
Alexey Cheremisin, 2019-12-21
@leahch

There is a make utility for building. I recommend to study, and strongly!

C
chupasaurus, 2019-12-21
@chupasaurus

man update-alternatives

G
gosha-z, 2019-12-22
@gosha-z

Isn't it easier to pull up libgpiod as a package in openwrt (if it's still not there)?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question