kumquat-buildroot/docs/manual
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
..
adding-board-support.txt
adding-packages-asciidoc.txt
adding-packages-autotools.txt
adding-packages-cargo.txt docs/manual: use SPDX short identifier for license 2018-04-05 21:06:45 +02:00
adding-packages-cmake.txt
adding-packages-conclusion.txt
adding-packages-directory.txt docs/manual: document location of hash files for multi-versions packages 2018-10-20 20:04:06 +02:00
adding-packages-generic.txt package/pkg-generic.mk: add <pkg>_INSTALL_INIT_OPENRC 2019-05-18 23:21:19 +02:00
adding-packages-gettext.txt docs/manual: update gettext details 2017-07-05 01:37:38 +02:00
adding-packages-golang.txt package/pkg-golang: add support for building host packages 2019-03-17 17:21:10 +01:00
adding-packages-hooks.txt manual: patches are not applied for SITE_METHOD = local 2017-07-09 17:25:48 +02:00
adding-packages-kconfig.txt core/pkg-kconfig: allow dependencies before configurators 2018-08-18 23:21:03 +02:00
adding-packages-kernel-module.txt docs/manual: refer to SPDX License List 2017-04-01 15:11:18 +02:00
adding-packages-linux-kernel-spec-infra.txt package/linux-tools: change method for including linux-tool sub-makefiles 2017-07-19 21:16:38 +02:00
adding-packages-luarocks.txt package/luarocks: add buildroot addon 2018-12-31 17:40:58 +01:00
adding-packages-meson.txt infra/pkg-meson: allow packages to pass custom compiler/linker flags 2019-07-01 09:51:16 +02:00
adding-packages-perl.txt scancpan: add PERL_FOO_DISTNAME in perl-foo.mk 2018-10-24 00:22:13 +01:00
adding-packages-python.txt package/pkg-python: <pkg>_SUBDIR cleanup 2019-02-06 17:21:29 +01:00
adding-packages-rebar.txt docs/manual: document <pkg>_KEEP_DEPENDENCIES in rebar-package infra 2018-12-09 17:24:29 +01:00
adding-packages-tips.txt docs/manual: add check-package to "Tips and tricks" 2018-04-02 00:42:59 +02:00
adding-packages-virtual.txt
adding-packages-waf.txt package/pkg-waf: add support for <pkg>_SUBDIR 2019-02-06 17:21:25 +01:00
adding-packages.txt docs/manual: add check-package to "Tips and tricks" 2018-04-02 00:42:59 +02:00
advanced.txt
appendix.txt docs/manual: add appendix about migration from older versions 2017-09-06 22:13:17 +02:00
beyond-buildroot.txt
ccache-support.txt
common-usage.txt support/scripts/graph-depends: use colors instead of colours 2018-04-01 20:01:38 +02:00
configure-other-components.txt
configure.txt docs/manual: drop mention of removed external toolchains 2017-06-20 22:12:54 +02:00
contribute.txt manual/contribute.txt: fix typo 2019-06-10 16:47:59 +02:00
customize-configuration.txt
customize-device-permission-tables.txt
customize-directory-structure.txt docs/manual: add external.desc to list of files needed for BR2_EXTERNAL 2018-11-02 21:30:13 +01:00
customize-outside-br.txt docs/manual: fix BR2_EXTERNAL path typo 2017-10-15 15:47:59 +02:00
customize-packages.txt
customize-patches.txt
customize-post-image.txt
customize-quick-guide.txt
customize-rootfs.txt Makefile: check rootfs overlays with BR2_ROOTFS_MERGED_USR enabled 2019-02-06 17:09:28 +01:00
customize-users-tables.txt
customize.txt
debugging-buildroot.txt
developers.txt docs/manual: fix typo get-developer (-> get-developers) 2019-01-03 22:44:43 +01:00
download-infra.txt
download-location.txt docs/manual: centralize recommendations about BR2_DL_DIR 2017-02-07 14:55:02 +01:00
eclipse-integration.txt
faq-troubleshooting.txt manual: remove references to host/usr paths 2017-07-05 16:06:28 +02:00
getting.txt
how-buildroot-works.txt
introduction.txt
known-issues.txt docs: known issues no longer valid 2017-07-01 12:56:21 +02:00
legal-notice.txt docs/manual: refer to SPDX License List 2017-04-01 15:11:18 +02:00
make-tips.txt docs/manual: document new behaviour of 'make printvars' 2019-03-12 21:59:00 +01:00
makedev-syntax.txt
makeusers-syntax.txt
manual.mk
manual.txt Makefile, manual, website: Bump copyright year 2019-01-06 21:30:34 +01:00
migrating.txt docs/manual: add appendix about $(HOST_DIR)/usr 2017-09-06 22:13:40 +02:00
package-make-target.txt docs/manual: update package-make-target.txt with more targets 2019-01-29 00:32:11 +01:00
patch-policy.txt docs: clarify <packagename>_PATCH behaviour 2017-09-24 14:43:37 +02:00
prerequisite.txt prerequisite.txt: Bump python dependency to 2.7 2019-02-04 13:23:32 +01:00
quickstart.txt
rebuilding-packages.txt
resources.txt
using-buildroot-debugger.txt manual: remove references to host/usr paths 2017-07-05 16:06:28 +02:00
using-buildroot-development.txt docs: use-case for un-ignoring VCS directories and overridden source dir 2019-06-10 16:49:51 +02:00
using-buildroot-toolchain.txt core/sdk: generate the SDK tarball ourselves 2018-08-14 16:03:48 +02:00
writing-rules.txt tools: rename to 'utils' 2017-07-01 18:07:00 +02:00