Replies: 3 comments
-
Agreed, there's not much on cross-compiling now. The wiki and the cookbook project (https://scons-cookbook.readthedocs.io/en/latest/) are both potential homes for such. There's actually an article on setting up for cross compiling in the latter, but it's light on details. Past SCons contributors recognized that the current scheme of calling individual tool specification modules doesn't extend very smoothly to specifying entire toolchains - definitely a cross-compile concern - and had all kinds of revamp plans, but that generation of developers drifted away from the project before that refactor was completed. For a more interactive discussion, you might consider joining the Discord server. |
Beta Was this translation helpful? Give feedback.
-
In theory, SCons should work well for the use case you describe. Building is controlled by a construction environment, and you can create one of those for each target arch with its own toolchain setup. Keeping the builds separate can be done by setting up variant directories. Of course, the devil is always in the detials... |
Beta Was this translation helpful? Give feedback.
-
At work, we use buildroot to deal with cross-compilation specialities. While buildroot already has MongoDB and SCons packages, and is hence able to handle cross-compilation with SCons, there is no simple example in the cookbook repo. I was able to set up an example locally and will see how it can be made useful for a wider audience. |
Beta Was this translation helpful? Give feedback.
-
While readers might get the idea how to set up a cross toolchain, there's not a single example present in the documentation.
E.g., I need to build a Linux Qt C++ and QML application on an amd64 machine for i386 and arm (aarch64), and would like to know how easy it is to get there with SCons. Currently, we have a layered setup of Make running SCons running Buildroot running bash running QMake and Make. I consider evaluating SCons to replace the last three layers, hoping for build performance gains (e.g. much faster incremental static code analysis which leverages caching and scanning facilities, for which I have a promising prototype).
For start, it would be helpful to see how to build a hello_world example with a pre-built bootlin cross toolchain, given a downloaded toolchain tarball and a main.cpp file.
I might provide it myself if my progress and learning curve is steep enough.
Beta Was this translation helpful? Give feedback.
All reactions