mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-23 19:43:33 +00:00
473fc279c8
Align Kconfig and Kbuild logic to Linux 4.20 release with minimal impact
on files outside of this scope.
Our previous Kconfig sync was done by commit 587e4a4296
("kconfig /
kbuild: Re-sync with Linux 4.19").
As part of this re-sync, a few related changes from previous Linux
releases were found to have been missed and merged in, and are not in
the following list.
The imported Linux commits are:
[From prior to v4.19]
b1e0d8b70fa3 kbuild: Fix gcc -x syntax
a4353898980c kconfig: add CC_IS_GCC and GCC_VERSION
469cb7376c06 kconfig: add CC_IS_CLANG and CLANG_VERSION
[From v4.19 to v4.20]
487c7c7702ab kbuild: prefix Makefile.dtbinst path with $(srctree) unconditionally
0d91bf584fe5 kbuild: remove old check for CFLAGS use
25815cf5ffec kbuild: hide most of targets when running config or mixed targets
00d78ab2ba75 kbuild: remove dead code in cmd_files calculation in top Makefile
23066c3f4e21 Compiler Attributes: enable -Wstringop-truncation on W=1 (gcc >= 8)
37c8a5fafa3b kbuild: consolidate Devicetree dtb build rules
80463f1b7bf9 kbuild: add --include-dir flag only for out-of-tree build
77ec0c20c7e0 kbuild: remove VERSION and PATCHLEVEL from $(objtree)/Makefile
74bc0c09b2da kbuild: remove user ID check in scripts/mkmakefile
4fd61277f662 kbuild: do not pass $(objtree) to scripts/mkmakefile
80d0dda3a4e5 kbuild: simplify command line creation in scripts/mkmakefile
fb073a4b473e kbuild: add -Wno-pointer-sign flag unconditionally
9df3e7a7d7d6 kbuild: add -Wno-unused-but-set-variable flag unconditionally
69ea912fda74 kbuild: remove unneeded link_multi_deps
7d0ea2524202 kbuild: use 'else ifeq' for checksrc to improve readability
04c459d20448 kconfig: remove oldnoconfig target
0085b4191f3e kconfig: remove silentoldconfig target
3f80babd9ca4 kbuild: remove unused cc-fullversion variable
2cd3faf87d2d merge_config.sh: Allow to define config prefix
076f421da5d4 kbuild: replace cc-name test with CONFIG_CC_IS_CLANG
6bbe4385d035 kconfig: merge_config: avoid false positive matches from comment lines
[From post v4.20]
885480b08469 Makefile: Move -Wno-unused-but-set-variable out of GCC only block
There are a number of changes related to additional warnings as well as
being able to drop cc-name entirely that have been omitted for now as
additional work is required first.
Cc: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
23 lines
636 B
Bash
Executable file
23 lines
636 B
Bash
Executable file
#!/bin/sh
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
#
|
|
# clang-version [-p] clang-command
|
|
#
|
|
# Prints the compiler version of `clang-command' in a canonical 4-digit form
|
|
# such as `0500' for clang-5.0 etc.
|
|
#
|
|
# With the -p option, prints the patchlevel as well, for example `050001' for
|
|
# clang-5.0.1 etc.
|
|
#
|
|
|
|
compiler="$*"
|
|
|
|
if ! ( $compiler --version | grep -q clang) ; then
|
|
echo 0
|
|
exit 1
|
|
fi
|
|
|
|
MAJOR=$(echo __clang_major__ | $compiler -E -x c - | tail -n 1)
|
|
MINOR=$(echo __clang_minor__ | $compiler -E -x c - | tail -n 1)
|
|
PATCHLEVEL=$(echo __clang_patchlevel__ | $compiler -E -x c - | tail -n 1)
|
|
printf "%d%02d%02d\\n" $MAJOR $MINOR $PATCHLEVEL
|