From: Olaf Titz <olaf@bigred.inka.de>
To: linux-kernel@vger.kernel.org
Subject: Re: modversion.h improvement suggestion
Date: Mon, 06 May 2002 23:03:34 +0200 [thread overview]
Message-ID: <E174pdv-0001rU-00@bigred.inka.de> (raw)
In-Reply-To: <E174OQu-0007H2-00@smtp.web.de> <8447.1020642180@ocs3.intra.ocs.com.au>
> The build instructions for third party modules should say something
> like
>
> If your kernel was built with CONFIG_MODVERSIONS=y then add these
> flags to the build for this module
>
> -DMODVERSIONS -include kernel_source_tree/linux/modversions.h
or even better, pick up the _complete_ compilation rule from the
kernel Makefile, since this is (unfortunately) by now the only way to
get all compiler options right.
I do it this way (in a configure.in for an external module):
KSRC is the kernel source location.
cp $KSRC/Makefile conftest.make
echo -e "conftest.CC:" >>conftest.make
echo -e "\t@echo \$(CC)" >>conftest.make
echo -e "conftest.CFLAGS:" >>conftest.make
echo -e "\t@echo \$(CFLAGS) \$(MODFLAGS)" >>conftest.make
here=`pwd`
NKCC=`cd $KSRC; $MAKE -s -f $here/conftest.make conftest.CC`
NKCFLAGS=`cd $KSRC; $MAKE -s -f $here/conftest.make conftest.CFLAGS`
i.e. copy the main Makefile, add a few rules to just echo the flags,
and then invoke it in the original place (since it depends on that).
We should really have a more elegant way to extract this info from the
main Makefile.
> In any case, modversions.h will disappear in kbuild 2.5.
which leaves hope this issue will be addressed...
Olaf
next prev parent reply other threads:[~2002-05-06 21:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-05 16:00 modversion.h improvement suggestion Sebastian Huber
2002-05-05 23:43 ` Keith Owens
2002-05-06 21:03 ` Olaf Titz [this message]
2002-05-07 4:55 ` Keith Owens
2002-05-06 15:39 ` Alan Cox
[not found] <Pine.GSO.4.05.10205051818350.20954-100000@mausmaki.cosy.sbg.ac.at>
2002-05-05 16:36 ` Sebastian Huber
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=E174pdv-0001rU-00@bigred.inka.de \
--to=olaf@bigred.inka.de \
--cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.