public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Linus Torvalds <torvalds@linux-foundation.org>,
	linux-kbuild <linux-kbuild@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Cc: Tvrtko <tvrtko.ursulin@sophos.com>,
	Andrea Arcangeli <andrea@qumranet.com>,
	"Rafael J. Wysocki" <rjw@sisk.pl>
Subject: [GIT PULL] fix kbuild regression
Date: Sat, 31 May 2008 22:37:51 +0200	[thread overview]
Message-ID: <20080531203751.GA12621@uranus.ravnborg.org> (raw)

Hi Linus.

Please pull from:

   ssh://master.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes.git


	Sam


To get the following fix:

Sam Ravnborg (1):
    kbuild: fix $(src) assignmnet with external modules

    When we introduced support for KBUILD_EXTRA_SYMBOLS
    we started to include the externam module's kbuild
    file when doing the final modpost step.

    As external modules often do:
    ccflags-y := -I$(src)

    We had problems because $(src) was unassinged and
    gcc then used the next parameter for -I resulting in
    strange build failures.

    Fix is to assign $(src) and $(obj) when building
    external modules.

    This fixes: http://bugzilla.kernel.org/show_bug.cgi?id=10798

    Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
    Cc: Tvrtko <tvrtko.ursulin@sophos.com>
    Cc: Andrea Arcangeli <andrea@qumranet.com>
    Cc: "Rafael J. Wysocki" <rjw@sisk.pl>

 scripts/Makefile.modpost |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost
index a098a04..17092d6 100644
--- a/scripts/Makefile.modpost
+++ b/scripts/Makefile.modpost
@@ -43,7 +43,13 @@ _modpost: __modpost
 include include/config/auto.conf
 include scripts/Kbuild.include
 
+# When building external modules load the Kbuild file to retreive EXTRA_SYMBOLS info
 ifneq ($(KBUILD_EXTMOD),)
+
+# set src + obj - they may be used when building the .mod.c file
+obj := $(KBUILD_EXTMOD)
+src := $(obj)
+
 # Include the module's Makefile to find KBUILD_EXTRA_SYMBOLS
 include $(if $(wildcard $(KBUILD_EXTMOD)/Kbuild), \
              $(KBUILD_EXTMOD)/Kbuild, $(KBUILD_EXTMOD)/Makefile)

                 reply	other threads:[~2008-05-31 20:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20080531203751.GA12621@uranus.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=andrea@qumranet.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@sisk.pl \
    --cc=torvalds@linux-foundation.org \
    --cc=tvrtko.ursulin@sophos.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