summaryrefslogtreecommitdiff
path: root/scripts/dummy-tools/gcc
diff options
context:
space:
mode:
authorBorislav Petkov <bp@suse.de>2021-03-18 16:43:11 +0100
committerBorislav Petkov <bp@suse.de>2021-03-18 16:43:11 +0100
commitafb4a37778491eae010a43edebea32ff2d45f01c (patch)
treec40bcc6143e5542134477dd96a108d24b1f9074f /scripts/dummy-tools/gcc
parent229164175ff0c61ff581e6bf37fbfcb608b6e9bb (diff)
parent1e28eed17697bcf343c6743f0028cc3b5dd88bf0 (diff)
Merge tag 'v5.12-rc3' into x86/seves
Pick up dependent SEV-ES urgent changes which went into -rc3 to base new work ontop. Signed-off-by: Borislav Petkov <bp@suse.de>
Diffstat (limited to 'scripts/dummy-tools/gcc')
-rwxr-xr-xscripts/dummy-tools/gcc18
1 files changed, 16 insertions, 2 deletions
diff --git a/scripts/dummy-tools/gcc b/scripts/dummy-tools/gcc
index 5c113cad5601..39e65fee59bd 100755
--- a/scripts/dummy-tools/gcc
+++ b/scripts/dummy-tools/gcc
@@ -57,9 +57,9 @@ if arg_contain --version "$@"; then
fi
if arg_contain -E "$@"; then
- # For scripts/gcc-version.sh; This emulates GCC 20.0.0
+ # For scripts/cc-version.sh; This emulates GCC 20.0.0
if arg_contain - "$@"; then
- sed 's/^__GNUC__$/20/; s/^__GNUC_MINOR__$/0/; s/^__GNUC_PATCHLEVEL__$/0/'
+ sed -n '/^GCC/{s/__GNUC__/20/; s/__GNUC_MINOR__/0/; s/__GNUC_PATCHLEVEL__/0/; p;}'
exit 0
else
echo "no input files" >&2
@@ -73,6 +73,15 @@ if arg_contain -S "$@"; then
echo "%gs"
exit 0
fi
+
+ # For arch/powerpc/tools/gcc-check-mprofile-kernel.sh
+ if arg_contain -m64 "$@" && arg_contain -mlittle-endian "$@" &&
+ arg_contain -mprofile-kernel "$@"; then
+ if ! test -t 0 && ! grep -q notrace; then
+ echo "_mcount"
+ fi
+ exit 0
+ fi
fi
# To set GCC_PLUGINS
@@ -85,3 +94,8 @@ if arg_contain -print-file-name=plugin "$@"; then
echo $plugin_dir
exit 0
fi
+
+# inverted return value
+if arg_contain -D__SIZEOF_INT128__=0 "$@"; then
+ exit 1
+fi