Skip to content
Navigation Menu
Toggle navigation
Sign in
In this repository
All GitHub Enterprise
↵
Jump to
↵
No suggested jump to results
In this repository
All GitHub Enterprise
↵
Jump to
↵
In this organization
All GitHub Enterprise
↵
Jump to
↵
In this repository
All GitHub Enterprise
↵
Jump to
↵
Sign in
Reseting focus
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
mariux64
/
linux
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
2
Pull requests
0
Actions
Projects
0
Wiki
Security
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security
Insights
Files
bfb41e4
Documentation
LICENSES
arch
block
certs
crypto
drivers
fs
include
init
io_uring
ipc
kernel
lib
mm
net
rust
samples
scripts
atomic
basic
clang-tools
coccinelle
dtc
dummy-tools
dummy-plugin-dir
gcc
ld
nm
objcopy
pahole
gcc-plugins
gdb
genksyms
kconfig
ksymoops
mod
package
selinux
tracing
.gitignore
Kbuild.include
Kconfig.include
Lindent
Makefile
Makefile.asm-generic
Makefile.build
Makefile.clang
Makefile.clean
Makefile.compiler
Makefile.debug
Makefile.defconf
Makefile.dtbinst
Makefile.extrawarn
Makefile.gcc-plugins
Makefile.headersinst
Makefile.host
Makefile.kasan
Makefile.kcov
Makefile.kcsan
Makefile.kmsan
Makefile.lib
Makefile.modfinal
Makefile.modinst
Makefile.modpost
Makefile.package
Makefile.randstruct
Makefile.ubsan
Makefile.userprogs
Makefile.vmlinux
Makefile.vmlinux_o
as-version.sh
asn1_compiler.c
bloat-o-meter
bootgraph.pl
bpf_doc.py
cc-can-link.sh
cc-version.sh
check-git
check-sysctl-docs
check_extable.sh
checkdeclares.pl
checkincludes.pl
checkkconfigsymbols.py
checkpatch.pl
checkstack.pl
checksyscalls.sh
checkversion.pl
cleanfile
cleanpatch
coccicheck
config
const_structs.checkpatch
decode_stacktrace.sh
decodecode
depmod.sh
dev-needs.sh
diffconfig
documentation-file-ref-check
export_report.pl
extract-ikconfig
extract-module-sig.pl
extract-sys-certs.pl
extract-vmlinux
extract_xc3028.pl
faddr2line
file-size.sh
find-unused-docs.sh
gcc-x86_32-has-stack-protector.sh
gcc-x86_64-has-stack-protector.sh
gen-randstruct-seed.sh
generate_initcall_order.pl
generate_rust_analyzer.py
generate_rust_target.rs
get_abi.pl
get_dvb_firmware
get_feat.pl
get_maintainer.pl
gfp-translate
head-object-list.txt
headerdep.pl
headers_install.sh
insert-sys-cert.c
install.sh
is_rust_module.sh
jobserver-exec
kallsyms.c
kernel-doc
ld-version.sh
leaking_addresses.pl
link-vmlinux.sh
makelst
markup_oops.pl
min-tool-version.sh
misc-check
mkcompile_h
mksysmap
mkuboot.sh
module.lds.S
modules-check.sh
nsdeps
objdiff
objdump-func
orc_hash.sh
pahole-flags.sh
pahole-version.sh
parse-maintainers.pl
patch-kernel
profile2linkerlist.pl
prune-kernel
recordmcount.c
recordmcount.h
recordmcount.pl
relocs_check.sh
remove-stale-files
rust_is_available.sh
rust_is_available_bindgen_libclang.h
setlocalversion
show_delta
sign-file.c
sorttable.c
sorttable.h
spdxcheck-test.sh
spdxcheck.py
spdxexclude
spelling.txt
sphinx-pre-install
split-man.pl
stackdelta
stackusage
subarch.include
syscallhdr.sh
syscallnr.sh
syscalltbl.sh
tags.sh
test_fortify.sh
tools-support-relr.sh
unifdef.c
ver_linux
xen-hypercalls.sh
xz_wrap.sh
security
sound
tools
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
.rustfmt.toml
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README
Breadcrumbs
linux
/
scripts
/
dummy-tools
/
gcc
Blame
Blame
Latest commit
History
History
executable file
·
106 lines (96 loc) · 3.01 KB
Breadcrumbs
linux
/
scripts
/
dummy-tools
/
gcc
Top
File metadata and controls
Code
Blame
executable file
·
106 lines (96 loc) · 3.01 KB
Raw
#!/bin/sh # SPDX-License-Identifier: GPL-2.0-only # # 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. # Hence these dummy toolchains to make all compiler tests pass. # # Usage: # # From the top directory of the source tree, run # # $ make CROSS_COMPILE=scripts/dummy-tools/ oldconfig # # Most of compiler features are tested by cc-option, which simply checks the # exit code of $(CC). This script does nothing and just exits with 0 in most # cases. So, $(cc-option, ...) is evaluated as 'y'. # # This scripts caters to more checks; handle --version and pre-process __GNUC__ # etc. to pretend to be GCC, and also do right things to satisfy some scripts. # Check if the first parameter appears in the rest. Succeeds if found. # This helper is useful if a particular option was passed to this script. # Typically used like this: # arg_contain <word-you-are-searching-for> "$@" arg_contain () { search="$1" shift while [ $# -gt 0 ] do if [ "$search" = "$1" ]; then return 0 fi shift done return 1 } # To set CONFIG_CC_IS_GCC=y if arg_contain --version "$@"; then echo "gcc (scripts/dummy-tools/gcc)" exit 0 fi if arg_contain -E "$@"; then # For scripts/cc-version.sh; This emulates GCC 20.0.0 if arg_contain - "$@"; then sed -n '/^GCC/{s/__GNUC__/20/; s/__GNUC_MINOR__/0/; s/__GNUC_PATCHLEVEL__/0/; p;}; s/__LONG_DOUBLE_128__/1/ p' exit 0 else echo "no input files" >&2 exit 1 fi fi # To set CONFIG_AS_IS_GNU if arg_contain -Wa,--version "$@"; then echo "GNU assembler (scripts/dummy-tools) 2.50" exit 0 fi if arg_contain -S "$@"; then # For scripts/gcc-x86-*-has-stack-protector.sh if arg_contain -fstack-protector "$@"; then if arg_contain -mstack-protector-guard-reg=fs "$@"; then echo "%fs" else echo "%gs" fi exit 0 fi # For arch/powerpc/tools/gcc-check-mprofile-kernel.sh if arg_contain -m64 "$@" && arg_contain -mprofile-kernel "$@"; then if ! test -t 0 && ! grep -q notrace; then echo "_mcount" fi exit 0 fi fi # To set GCC_PLUGINS if arg_contain -print-file-name=plugin "$@"; then # Use $0 to find the in-tree dummy directory echo "$(dirname "$(readlink -f "$0")")/dummy-plugin-dir" exit 0 fi # inverted return value if arg_contain -D__SIZEOF_INT128__=0 "$@"; then exit 1 fi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
You can’t perform that action at this time.