How can I use a cross compiler with Scons?

You’re almost there. You’re adding your PATH to the SCons construction environment instead of to the ENV key of the construction environment: import os env_options = { “CC” : “nios2-linux-gnu-gcc”, “CXX” : “nios2-linux-gnu-g++”, “LD” : “nios2-linux-gnu-g++”, “AR” : “nios2-linux-gnu-ar”, “STRIP” : “nios2-linux-gnu-strip”, } env = Environment(**env_options) env.Append(ENV = {‘PATH’ : os.environ[‘PATH’]}) Export(‘env’)

What’s the difference of “./configure” option “–build”, “–host” and “–target”?

As noted in this blog post and alluded to in the GCC Configure Terms, –target only applies when you are compiling toolchains. When you are doing normal cross-compilation of a library or binary you use –build=the architecture of the build machine –host=the architecture that you want the file to run on However, when you are … Read more