Masahiro Yamada
83fb6ffcab
UPSTREAM: kbuild: add dummy toolchains to enable all cc-option etc. in Kconfig
...
Staring v4.18, Kconfig evaluates compiler capabilities, and hides CONFIG
options your compiler does not support. This works well if you configure
and build the kernel on the same host machine.
It is inconvenient if you prepare the .config that is carried to a
different build environment (typically this happens when you package
the kernel for distros) because using a different compiler potentially
produces different CONFIG options than the real build environment.
So, you probably want to make as many options visible as possible.
In other words, you need to create a super-set of CONFIG options that
cover any build environment. If some of the CONFIG options turned out
to be unsupported on the build machine, they are automatically disabled
by the nature of Kconfig.
However, it is not feasible to get a full-featured compiler for every
arch.
This issue was discussed here:
https://lkml.org/lkml/2019/12/9/620
Other than distros, savedefconfig is also a problem. Some arch sub-systems
periodically resync defconfig files. If you use a less-capable compiler
for savedefconfig, options that do not meet 'depends on $(cc-option,...)'
will be forcibly disabled. So, 'make defconfig && make savedefconfig'
may silently change the behavior.
This commit adds a set of dummy toolchains that pretend to support any
feature.
Most of compiler features are tested by cc-option, which simply checks
the exit code of $(CC). The dummy tools are shell scripts that always
exit with 0. So, $(cc-option, ...) is evaluated as 'y'.
There are more complicated checks such as:
scripts/gcc-x86_{32,64}-has-stack-protector.sh
scripts/gcc-plugin.sh
scripts/tools-support-relr.sh
scripts/dummy-tools/gcc passes all checks.
From the top directory of the source tree, you can do:
$ make CROSS_COMPILE=scripts/dummy-tools/ oldconfig
Change-Id: Ic0ed9f3c73888a14c38c5ce546bc171b479c35ed
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Philipp Rudo <prudo@linux.ibm.com>
Tested-by: Jeremy Cline <jcline@redhat.com>
2026-05-05 20:02:22 +03:00
..
atomic
basic
coccinelle
scripts: add dummy report mode to add_namespace.cocci
2020-08-11 15:33:35 +02:00
dtc
Merge android11-5.4.180+ ( 598165f) into msm-5.4
2022-04-21 10:51:21 +05:30
dummy-tools
UPSTREAM: kbuild: add dummy toolchains to enable all cc-option etc. in Kconfig
2026-05-05 20:02:22 +03:00
gcc-plugins
Merge tag 'ASB-2025-10-06_11-5.4' of https://android.googlesource.com/kernel/common into android13-5.4-lahaina
2025-10-08 15:17:54 +03:00
gdb
Revert "PM: domains: Fix up terminology with parent/child"
2023-06-16 09:26:26 +00:00
genksyms
genksyms: fix memory leak when the same symbol is read from *.symref file
2025-03-13 12:43:00 +01:00
gki
scripts: gki: Disable DEBUG_FS for user variant builds
2020-07-21 15:30:57 -07:00
kconfig
Merge branch 'android11-5.4-lts' of https://android.googlesource.com/kernel/common into android13-5.4-lahaina
2025-12-11 01:41:51 -08:00
ksymoops
mod
Merge tag 'LA.UM.9.14.r1-25800-LAHAINA.QSSI15.0' of https://git.codelinaro.org/clo/la/kernel/msm-5.4 into android13-5.4-lahaina
2025-02-14 02:42:56 +02:00
package
kbuild: fix broken builds because of GZIP,BZIP2,LZOP variables
2020-09-03 11:27:10 +02:00
selinux
selinux: Chain up tool resolving errors in install_policy.sh
2025-04-10 14:29:39 +02:00
tracing
ftrace/scripts: Update the instructions for ftrace-bisect.sh
2023-02-06 07:52:44 +01:00
.gitignore
adjust_autoksyms.sh
Merge android11-5.4.86+ ( 7d99cf8) into msm-5.4
2021-06-07 15:17:29 +05:30
asn1_compiler.c
ASN.1: Fix check for strdup() success
2023-04-26 11:24:06 +02:00
bin2c.c
bloat-o-meter
scripts: switch explicitly to Python 3
2021-05-22 11:38:30 +02:00
bootgraph.pl
bpf_helpers_doc.py
UPSTREAM: bpf: Fix bpf_redirect_neigh helper api to support supplying nexthop
2026-01-14 18:12:45 -08:00
build-all.py
cc-can-link.sh
check-config-debug-exemptions
check-config-perf-exemptions
check-config.py
check_extable.sh
checkincludes.pl
checkkconfigsymbols.py
checkpatch.pl
Merge android11-5.4.259+ ( 70db018) into msm-5.4
2024-01-31 01:01:26 -08:00
checkstack.pl
checksyscalls.sh
checkversion.pl
clang-version.sh
cleanfile
cleanpatch
coccicheck
config
kbuild: fix argument parsing in scripts/config
2025-06-04 14:32:31 +02:00
conmakehash.c
const_structs.checkpatch
decode_stacktrace.sh
scripts/decode_stacktrace: strip basepath from all paths
2020-07-29 10:18:35 +02:00
decodecode
depmod.sh
depmod: handle the case of /sbin/depmod without /sbin in PATH
2021-01-12 20:16:10 +01:00
diffconfig
scripts: switch explicitly to Python 3
2021-05-22 11:38:30 +02:00
documentation-file-ref-check
export_report.pl
extract-cert.c
Merge tag 'ASB-2023-02-05_11-5.4' of https://android.googlesource.com/kernel/common into android13-5.4-lahaina
2023-02-08 18:28:38 +02:00
extract-ikconfig
extract-module-sig.pl
extract-sys-certs.pl
extract-vmlinux
extract_xc3028.pl
faddr2line
scripts/faddr2line: Fix regression in name resolution on ppc64le
2022-12-08 11:23:02 +01:00
file-size.sh
find-unused-docs.sh
gcc-goto.sh
gcc-ld
gcc-plugin.sh
gcc-version.sh
gcc-x86_32-has-stack-protector.sh
kbuild: Fix '-S -c' in x86 stack protector scripts
2024-08-19 05:33:53 +02:00
gcc-x86_64-has-stack-protector.sh
kbuild: Fix '-S -c' in x86 stack protector scripts
2024-08-19 05:33:53 +02:00
gen_autoksyms.sh
ABI: Update section name in script and internal allowed list
2020-09-30 13:12:21 -07:00
gen_compile_commands.py
gen_ksymdeps.sh
kbuild: Fix 'no symbols' warning when CONFIG_TRIM_UNUSD_KSYMS=y
2021-09-22 12:26:26 +02:00
generate_initcall_order.pl
ANDROID: generate_initcall_order.pl: Use two dash long options for llvm-nm
2021-07-21 20:41:37 -07:00
get_abi.pl
tweewide: Fix most Shebang lines
2021-05-22 11:38:30 +02:00
get_dvb_firmware
get_maintainer.pl
gfp-translate
headerdep.pl
headers_check.pl
headers_install.sh
Merge android-5.4-stable.50 ( a200ad5) into msm-5.4
2020-07-20 19:22:16 -07:00
insert-sys-cert.c
kallsyms.c
ANDROID: kallsyms: increase KSYM_NAME_LEN
2020-08-04 19:33:41 +00:00
Kbuild.include
Merge tag 'ASB-2025-10-06_11-5.4' of https://android.googlesource.com/kernel/common into android13-5.4-lahaina
2025-10-08 15:17:54 +03:00
Kconfig.include
UPSTREAM: kbuild: Add support for 'as-instr' to be used in Kconfig files
2022-11-14 03:04:02 +02:00
kernel-doc
ld-version.sh
leaking_addresses.pl
leaking_addresses: Always print a trailing newline
2021-11-17 09:48:31 +01:00
Lindent
link-vmlinux.sh
BACKPORT: bpf: Resolve BTF IDs in vmlinux image
2026-01-14 18:12:02 -08:00
Makefile
scripts: set proper OpenSSL include dir also for sign-file
2021-02-26 10:10:27 +01:00
Makefile.asm-generic
Makefile.build
kbuild: add infrastructure to build userspace programs
2025-09-28 10:00:32 +02:00
Makefile.clean
kbuild: add infrastructure to build userspace programs
2025-09-28 10:00:32 +02:00
Makefile.dtbinst
Makefile.dtbo
Makefile.extrawarn
kbuild: Move -Wenum-enum-conversion to W=2
2025-03-13 12:43:09 +01:00
Makefile.gcc-plugins
gcc-plugins: Undefine LATENT_ENTROPY_PLUGIN when plugin disabled for a file
2022-08-25 11:18:31 +02:00
Makefile.headersinst
Makefile.host
kbuild: use -MMD instead of -MD to exclude system headers from dependency
2025-07-17 18:24:51 +02:00
Makefile.kasan
Makefile.kcov
Makefile.lib
Merge tag 'ASB-2025-09-05_11-5.4' of https://android.googlesource.com/kernel/common into android13-5.4-lahaina
2025-09-12 18:48:05 +03:00
Makefile.modbuiltin
Makefile.modfinal
Makefile.modinst
Makefile.modpost
This is the 5.4.212 stable release
2022-09-21 12:34:35 +02:00
Makefile.modsign
Makefile.package
kbuild: fix broken builds because of GZIP,BZIP2,LZOP variables
2020-09-03 11:27:10 +02:00
Makefile.ubsan
Makefile.userprogs
kbuild: add infrastructure to build userspace programs
2025-09-28 10:00:32 +02:00
makelst
markup_oops.pl
mkcompile_h
Merge 5.4.287 into android11-5.4-lts
2024-12-16 10:50:16 +00:00
mkmakefile
mksysmap
mksysmap: Fix the mismatch of 'L0' symbols in System.map
2022-09-28 11:03:59 +02:00
mkuboot.sh
module-common.lds
module-lto.lds
ANDROID: kbuild: don't preprocess module-lto.lds
2020-08-19 09:15:50 -07:00
modules-check.sh
namespace.pl
nsdeps
scripts: add dummy report mode to add_namespace.cocci
2020-08-11 15:33:35 +02:00
objdiff
parse-maintainers.pl
patch-kernel
pnmtologo.c
profile2linkerlist.pl
prune-kernel
recordmcount.c
This is the 5.4.244 stable release
2023-06-20 11:07:18 +00:00
recordmcount.h
Linux 5.4.129
2021-06-30 19:19:07 +02:00
recordmcount.pl
recordmcount.pl: fix typo in s390 mcount regex
2022-01-05 12:37:44 +01:00
setlocalversion
ANDROID: setlocalversion: make KMI_GENERATION optional
2021-11-17 22:45:14 +00:00
show_delta
tweewide: Fix most Shebang lines
2021-05-22 11:38:30 +02:00
sign-file.c
sign-file: Fix incorrect return values check
2023-12-20 15:41:17 +01:00
sortextable.c
sortextable.h
spdxcheck-test.sh
spdxcheck.py
spelling.txt
sphinx-pre-install
tweewide: Fix most Shebang lines
2021-05-22 11:38:30 +02:00
split-man.pl
tweewide: Fix most Shebang lines
2021-05-22 11:38:30 +02:00
stackdelta
stackusage
subarch.include
tags.sh
scripts/tags.sh: Resolve gtags empty index generation
2023-07-27 08:37:03 +02:00
tools-support-relr.sh
Makefile: fix GDB warning with CONFIG_RELR
2021-07-14 16:53:12 +02:00
unifdef.c
ver_linux
xen-hypercalls.sh
xz_wrap.sh
kbuild: add variables for compression tools
2020-09-03 11:27:10 +02:00