74e574c8a6
Meson does not allow to pass CFLAGS/LDFLAGS/CXXFLAGS via the environment or via command-line arguments or options (instead, those flags from the environment are passed to the host compiler, which is seldom what we need). The only way to pas those flags is via the cross-compilation.conf file. Add LIBFOO_CFLAGS, LIBFOO_LDFLAGS and LIBFOO_CXXFLAGS variables to allow packages to provide their own flags, possibly overriding the generic ones entirely, as we allow for other infras. Those per-package flags will then be used to generate the per-package cross-compilation.conf. This means that the meson infra is the first and only infra for which FOO_CFLAGS, FOO_LDFLAGS, and FOO_CXXFLAGS are meaningful, while for the other infras, they are just variables private to the package itself. Instead of naming those variables after the meson infra (e.g. FOO_MESON_CFLAGS), we name them with a generic name, as maybe, just maybe, we could also change the other infras to also recognise those variables. Just like for the HOST_MESON_SED_CFLAGS etc., we need to add auxiliary variables to do convert the shell-formatted argument list into the JSON-formatted list that meson expects. We can't use a pure-make construct because the CFLAGS can contain quoting that needs to be expanded by the shell. Similarly, we need a condition on the strip'ed variable to avoid passing empty arguments. To mimic this feature for packages that are built from the SDK, we also install a templatised version of cross-compilation.conf, with three new placeholders for custom flags. If a user wants to build a package that needs custom flags, they can use that template to generate a per-package cross-compilation.conf. Signed-off-by: Peter Seiderer <ps.report@gmx.net> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> Cc: Adam Duskett <aduskett@gmail.com> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Tested-by: Peter Seiderer <ps.report@gmx.net> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> |
||
---|---|---|
arch | ||
board | ||
boot | ||
configs | ||
docs | ||
fs | ||
linux | ||
package | ||
support | ||
system | ||
toolchain | ||
utils | ||
.defconfig | ||
.flake8 | ||
.gitignore | ||
.gitlab-ci.yml | ||
.gitlab-ci.yml.in | ||
CHANGES | ||
Config.in | ||
Config.in.legacy | ||
COPYING | ||
DEVELOPERS | ||
Makefile | ||
Makefile.legacy | ||
README |
Buildroot is a simple, efficient and easy-to-use tool to generate embedded Linux systems through cross-compilation. The documentation can be found in docs/manual. You can generate a text document with 'make manual-text' and read output/docs/manual/manual.text. Online documentation can be found at http://buildroot.org/docs.html To build and use the buildroot stuff, do the following: 1) run 'make menuconfig' 2) select the target architecture and the packages you wish to compile 3) run 'make' 4) wait while it compiles 5) find the kernel, bootloader, root filesystem, etc. in output/images You do not need to be root to build or run buildroot. Have fun! Buildroot comes with a basic configuration for a number of boards. Run 'make list-defconfigs' to view the list of provided configurations. Please feed suggestions, bug reports, insults, and bribes back to the buildroot mailing list: buildroot@buildroot.org You can also find us on #buildroot on Freenode IRC. If you would like to contribute patches, please read https://buildroot.org/manual.html#submitting-patches