diff options
| author | Tom Rini <trini@konsulko.com> | 2020-07-05 18:03:32 -0400 |
|---|---|---|
| committer | Tom Rini <trini@konsulko.com> | 2020-07-05 18:03:32 -0400 |
| commit | df3d0a3f95dd9109b889c5411204f133451b7a7e (patch) | |
| tree | 7d54c64d08db45d62e941e3697e1c691dec7ebba /scripts/Kconfig.include | |
| parent | 785195941b0746ac987a0ca501dae3e570b9f042 (diff) | |
| parent | c57383b0c22bd313c9511eeb2fd6702adbcfe030 (diff) | |
Merge branch '2020-07-01-kconfig-etc-updates' into next
- Resync Kconfiglib with the v14.1.0 release.
- Re-sync our <linux/compiler*h> files with v5.7-rc5 from upstream.
- Fully resync checkpatch.pl with v5.7 release.
To safely to all of the above, we have a few bugfixes about functions
that need a 'static inline' but weren't. We also stop setting
CROSS_COMPILE in arch/*/config.mk. Finally, with the above changes
boards can now opt-in to optimizing inlining and we do this for the
socfpga stratix10 platform for space savings.
Diffstat (limited to 'scripts/Kconfig.include')
| -rw-r--r-- | scripts/Kconfig.include | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/scripts/Kconfig.include b/scripts/Kconfig.include new file mode 100644 index 0000000000..dad5583451 --- /dev/null +++ b/scripts/Kconfig.include @@ -0,0 +1,30 @@ +# Kconfig helper macros + +# Convenient variables +comma := , +quote := " +squote := ' +empty := +space := $(empty) $(empty) +dollar := $ +right_paren := ) +left_paren := ( + +# $(if-success,<command>,<then>,<else>) +# Return <then> if <command> exits with 0, <else> otherwise. +if-success = $(shell,{ $(1); } >/dev/null 2>&1 && echo "$(2)" || echo "$(3)") + +# $(success,<command>) +# Return y if <command> exits with 0, n otherwise +success = $(if-success,$(1),y,n) + +# $(cc-option,<flag>) +# Return y if the compiler supports <flag>, n otherwise +cc-option = $(success,$(CC) -Werror $(1) -E -x c /dev/null -o /dev/null) + +# $(ld-option,<flag>) +# Return y if the linker supports <flag>, n otherwise +ld-option = $(success,$(LD) -v $(1)) + +# gcc version including patch level +gcc-version := $(shell,$(srctree)/scripts/gcc-version.sh -p $(CC) | sed 's/^0*//') |
