mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-29 01:02:08 +00:00
d3b08e5f3f
CONFIG_GCOV is special and only in UML since it builds the
kernel with a "userspace" option. This is fine, but the stub
is even more special and not really a full userspace process,
so it then fails to link as reported.
Remove the GCOV options from the stub build.
For good measure, also remove the GPROF options, even though
they don't seem to cause build failures now.
To be able to do this, export the specific options (GCOV_OPT
and GPROF_OPT) but rename them so there's less chance of any
conflicts.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202410242238.SXhs2kQ4-lkp@intel.com/
Fixes: 32e8eaf263
("um: use execveat to create userspace MMs")
Link: https://patch.msgid.link/20241025102700.9fbb9c34473f.I7f1537fe075638f8da64beb52ef6c9e5adc51bc3@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
18 lines
425 B
Plaintext
18 lines
425 B
Plaintext
#
|
|
# Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
|
|
# Licensed under the GPL
|
|
#
|
|
|
|
export UM_GPROF_OPT += -pg
|
|
|
|
ifdef CONFIG_CC_IS_CLANG
|
|
export UM_GCOV_OPT += -fprofile-instr-generate -fcoverage-mapping
|
|
else
|
|
export UM_GCOV_OPT += -fprofile-arcs -ftest-coverage
|
|
endif
|
|
|
|
CFLAGS-$(CONFIG_GCOV) += $(UM_GCOV_OPT)
|
|
CFLAGS-$(CONFIG_GPROF) += $(UM_GPROF_OPT)
|
|
LINK-$(CONFIG_GCOV) += $(UM_GCOV_OPT)
|
|
LINK-$(CONFIG_GPROF) += $(UM_GPROF_OPT)
|