From: Qian Cai <cai@lca.pw>
To: yamada.masahiro@socionext.com, michal.lkml@markovi.net
Cc: jpoimboe@redhat.com, mingo@kernel.org, bp@alien8.de,
linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
Qian Cai <cai@lca.pw>
Subject: [PATCH] kbuild: error for CONFIG_ORC_UNWINDER is too much
Date: Mon, 17 Dec 2018 11:17:28 -0500 [thread overview]
Message-ID: <20181217161728.6875-1-cai@lca.pw> (raw)
In-Reply-To: <869bc700-1d6d-b950-76c7-5d0fc589152c@lca.pw>
Since ifdef will be evaluated immediately in the first phrase of the
Makefile read-in, there is no guarantee that the value for
CONFIG_ORC_UNWINDER will be up-to-date until in the second phrase that
this recipe is ran.
include/config/%.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd
$(Q)$(MAKE) -f $(srctree)/Makefile syncconfig
Hence, change error to warning as this is essentially a best guess. The
original bug can be reproduced this way,
* make sure none of libelf-dev, libelf-devel or elfutils-libelf-devel
installed.
# make distclean
* generate a default .config where CONFIG_UNWINDER_ORC is enabled by
default.
# make menuconfig (exit -> save)
# grep CONFIG_UNWINDER_ORC .config
CONFIG_UNWINDER_ORC=y
# make menuconfig (deselect CONFIG_UNWINDER_ORC)
# grep CONFIG_UNWINDER_ORC .config
# CONFIG_UNWINDER_ORC is not set
# make
Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install
libelf-dev, libelf-devel or elfutils-libelf-devel
# grep CONFIG_UNWINDER_ORC include/config/auto.conf
CONFIG_UNWINDER_ORC=y
Fixes: 3dd40cb320f (objtool: Upgrade libelf-devel warning to error for
CONFIG_ORC_UNWINDER)
Signed-off-by: Qian Cai <cai@lca.pw>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 56d5270f22f8..eeb4ec49d393 100644
--- a/Makefile
+++ b/Makefile
@@ -963,7 +963,7 @@ ifdef CONFIG_STACK_VALIDATION
objtool_target := tools/objtool FORCE
else
ifdef CONFIG_UNWINDER_ORC
- $(error "Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel")
+ $(warning "Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel")
else
$(warning "Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel")
endif
--
2.17.2 (Apple Git-113)
next prev parent reply other threads:[~2018-12-17 16:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-17 3:56 include/config/auto.conf not sync up with .config Qian Cai
2018-12-17 16:17 ` Qian Cai [this message]
2018-12-17 17:03 ` [PATCH] kbuild: error for CONFIG_ORC_UNWINDER is too much Josh Poimboeuf
2018-12-17 17:13 ` Qian Cai
2018-12-17 17:49 ` Josh Poimboeuf
2018-12-17 18:11 ` Qian Cai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181217161728.6875-1-cai@lca.pw \
--to=cai@lca.pw \
--cc=bp@alien8.de \
--cc=jpoimboe@redhat.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.lkml@markovi.net \
--cc=mingo@kernel.org \
--cc=yamada.masahiro@socionext.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).