mirror_ubuntu-kernels/tools/testing/selftests/x86
Guillaume Tucker 6a9fdaeb50 selftests, x86: fix how check_cc.sh is being invoked
BugLink: https://bugs.launchpad.net/bugs/1969110

[ Upstream commit ef696f93ed ]

The $(CC) variable used in Makefiles could contain several arguments
such as "ccache gcc".  These need to be passed as a single string to
check_cc.sh, otherwise only the first argument will be used as the
compiler command.  Without quotes, the $(CC) variable is passed as
distinct arguments which causes the script to fail to build trivial
programs.

Fix this by adding quotes around $(CC) when calling check_cc.sh to pass
the whole string as a single argument to the script even if it has
several words such as "ccache gcc".

Link: https://lkml.kernel.org/r/d0d460d7be0107a69e3c52477761a6fe694c1840.1646991629.git.guillaume.tucker@collabora.com
Fixes: e9886ace22 ("selftests, x86: Rework x86 target architecture detection")
Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
Tested-by: "kernelci.org bot" <bot@kernelci.org>
Reviewed-by: Guenter Roeck <groeck@google.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Borislav Petkov <bp@suse.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 5bed6c2c1ffe5cd99bb79eb28c10494578490743)
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
2022-05-20 14:38:08 +02:00
..
.gitignore
amx.c selftests/x86/amx: Update the ARCH_REQ_XCOMP_PERM test 2022-05-05 09:14:19 +02:00
check_cc.sh selftests/x86: Add validity check and allow field splitting 2022-05-20 14:37:57 +02:00
check_initial_reg_state.c
corrupt_xstate_header.c
entry_from_vm86.c
fsgsbase_restore.c
fsgsbase.c
helpers.h
ioperm.c
iopl.c
ldt_gdt.c
Makefile selftests, x86: fix how check_cc.sh is being invoked 2022-05-20 14:38:08 +02:00
mov_ss_trap.c
ptrace_syscall.c
raw_syscall_helper_32.S
sigaltstack.c
sigreturn.c
single_step_syscall.c
syscall_arg_fault.c
syscall_nt.c
syscall_numbering.c
sysret_rip.c
sysret_ss_attrs.c
test_FCMOV.c
test_FCOMI.c
test_FISTTP.c
test_mremap_vdso.c
test_syscall_vdso.c
test_vsyscall.c
thunks_32.S
thunks.S
trivial_32bit_program.c
trivial_64bit_program.c
trivial_program.c
unwind_vdso.c
vdso_restorer.c