Go to file
Peter Seiderer 74e574c8a6 infra/pkg-meson: allow packages to pass custom compiler/linker flags
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>
2019-07-01 09:51:16 +02:00
arch arch: add BR2_ARCH_NEEDS_GCC_AT_LEAST_9 2019-06-22 21:38:23 +02:00
board board/qemu: ensure root is available before mounting it 2019-06-25 22:55:58 +02:00
boot boot/mv-ddr-marvell: fix build with GCC 8 2019-06-23 12:42:25 +02:00
configs configs/arcturus_ucp1020: bump Linux and U-Boot 2019-06-23 17:26:55 +02:00
docs infra/pkg-meson: allow packages to pass custom compiler/linker flags 2019-07-01 09:51:16 +02:00
fs
linux {linux, linux-headers}: bump 4.{4, 9, 14, 19}.x / 5.1.x series 2019-06-27 17:55:25 +02:00
package infra/pkg-meson: allow packages to pass custom compiler/linker flags 2019-07-01 09:51:16 +02:00
support support/testing: openjdk JNI test cases 2019-06-30 17:32:34 +02:00
system
toolchain toolchain-external: add gcc 9 entry 2019-06-22 21:42:03 +02:00
utils utils/test-pkg: clean output dir for successful builds 2019-06-23 21:39:08 +02:00
.defconfig
.flake8
.gitignore
.gitlab-ci.yml package/luasyslog: new package 2019-06-20 18:25:15 +02:00
.gitlab-ci.yml.in
CHANGES
Config.in
Config.in.legacy package/x11r7/xapp_mkfontdir: remove package 2019-06-20 21:39:03 +02:00
COPYING
DEVELOPERS python-inflection: new package 2019-06-30 15:30:52 +02:00
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