From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Nicolas Pitre <nico@linaro.org>
Cc: Jarod Wilson <jarod@redhat.com>, Michal Marek <mmarek@suse.com>,
linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [regression ?] kbuild: fix building bzImage with CONFIG_TRIM_UNUSED_KSYMS enabled
Date: Fri, 9 Dec 2016 11:43:57 +0900 [thread overview]
Message-ID: <20161209024357.GB4661@jagdpanzerIV.localdomain> (raw)
Hello,
after 53924022d8a ("kbuild: fix building bzImage withCONFIG_TRIM_UNUSED_KSYMS
enabled") all of my build scripts build the kernel without the modules.
shouldn't that 'KBUILD_MODULES := 1' happen before we `export KBUILD_MODULES'?
this silly patch fixes the build for me:
======================================================================
From: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Subject: [PATCH] Kbuild: set KBUILD_MODULES before we export it
Tweak the KBUILD_MODULES flag for TRIM_UNUSED_KSYMS configs
before we `export' it.
Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
---
Makefile | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/Makefile b/Makefile
index 369099d..035206e 100644
--- a/Makefile
+++ b/Makefile
@@ -336,6 +336,13 @@ ifeq ($(MAKECMDGOALS),)
KBUILD_MODULES := 1
endif
+# For the kernel to actually contain only the needed exported symbols,
+# we have to build modules as well to determine what those symbols are.
+# (this can be evaluated only once include/config/auto.conf has been included)
+ifdef CONFIG_TRIM_UNUSED_KSYMS
+ KBUILD_MODULES := 1
+endif
+
export KBUILD_MODULES KBUILD_BUILTIN
export KBUILD_CHECKSRC KBUILD_SRC KBUILD_EXTMOD
@@ -607,13 +614,6 @@ else
include/config/auto.conf: ;
endif # $(dot-config)
-# For the kernel to actually contain only the needed exported symbols,
-# we have to build modules as well to determine what those symbols are.
-# (this can be evaluated only once include/config/auto.conf has been included)
-ifdef CONFIG_TRIM_UNUSED_KSYMS
- KBUILD_MODULES := 1
-endif
-
# The all: target is the default when no target is given on the
# command line.
# This allow a user to issue only 'make' to build a kernel including modules
--
2.10.2
next reply other threads:[~2016-12-09 2:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-09 2:43 Sergey Senozhatsky [this message]
2016-12-09 2:56 ` [regression ?] kbuild: fix building bzImage with CONFIG_TRIM_UNUSED_KSYMS enabled Sergey Senozhatsky
2016-12-09 3:40 ` Nicolas Pitre
2016-12-09 4:58 ` Sergey Senozhatsky
2016-12-09 18:07 ` Nicolas Pitre
2016-12-10 7:23 ` Sergey Senozhatsky
2016-12-10 21:04 ` Nicolas Pitre
2016-12-11 2:19 ` Sergey Senozhatsky
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=20161209024357.GB4661@jagdpanzerIV.localdomain \
--to=sergey.senozhatsky.work@gmail.com \
--cc=jarod@redhat.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mmarek@suse.com \
--cc=nico@linaro.org \
/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).