mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Keith Owens <kaos@ocs.com.au>
To: Tom Rini <trini@kernel.crashing.org>
Cc: kbuild-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: Export objs from an external Makefile?
Date: Fri, 12 Oct 2001 10:14:38 +1000	[thread overview]
Message-ID: <32699.1002845678@ocs3.intra.ocs.com.au> (raw)
In-Reply-To: Your message of "Thu, 11 Oct 2001 16:57:34 MST." <20011011165734.C21564@cpe-24-221-152-185.az.sprintbbd.net>

On Thu, 11 Oct 2001 16:57:34 -0700, 
Tom Rini <trini@kernel.crashing.org> wrote:
>On Fri, Oct 12, 2001 at 09:42:05AM +1000, Keith Owens wrote:
>> On Thu, 11 Oct 2001 09:35:32 -0700, 
>> Tom Rini <trini@kernel.crashing.org> wrote:
>> >Hey all.  How do you do the 'export-objs' bits in a kernel module that's
>> >outside of the kernel?  Thanks..
>> 
>> Compile with -DMODULE -DEXPORT_SYMTAB.  If the kernel has modversions,
>> add -DMODVERSIONS -include $(HPATH)/linux/modversions.h.  The safest
>> way is to compile a module in the kernel that exports the objects then
>> copy the command, substituting the file names.
>
>I think I managed to get things right.  I added -DEXPORT_SYMTAB to the
>default flags and added:
>CFLAGS_EXTRA	+= $(shell if [ -f $(KERNEL_HEADERS)/linux/modversions.h ]; \
>			then echo -include \
>			$(KERNEL_HEADERS)/linux/modversions.h; fi)

You need -DMODVERSIONS as well.

Testing for the presence of modversions.h will not work in kbuild 2.5,
that file is always created with error messages to catch people who
include it "by hand".  OTOH, kbuild 2.5 has support for compiling
outside the standard kernel tree so who cares :)?


  reply	other threads:[~2001-10-12  0:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-11 16:35 Tom Rini
2001-10-11 23:42 ` Keith Owens
2001-10-11 23:57   ` Tom Rini
2001-10-12  0:14     ` Keith Owens [this message]
2001-10-12  0:23       ` Tom Rini

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=32699.1002845678@ocs3.intra.ocs.com.au \
    --to=kaos@ocs.com.au \
    --cc=kbuild-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trini@kernel.crashing.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

all inboxes | Powered by JetHome®