From: "hacklu" <embedway.linux@gmail.com>
To: "Américo Wang" <xiyou.wangcong@gmail.com>
Cc: "linux-kernel" <linux-kernel@vger.kernel.org>
Subject: Re: Re: how about KBUILD_MODNAME
Date: Tue, 3 Aug 2010 17:35:40 +0800 [thread overview]
Message-ID: <201008031735377545190@gmail.com> (raw)
In-Reply-To: 201008031511572638256@gmail.com
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="gb2312", Size: 1398 bytes --]
I am compiling the boardcom's driver now.
the driver had defined EXTRA_CFLAGS = -D"KBUILD_STR(s)=\#s" $(basename_flags) $(modname_flags)
in the a.makefile.
and the a.makefile was included by b.makefile.
when in the b.makefile,
there is this command.
$(CC) $(DEPS_OPT) $(CFLAGS) $(EXTRA_CFLAGS) -o $@ -c $< ;)
I had add "echo $(EXTRA_CFLAGS)" before this line;but returns NULL;
so I suspicion the $(EXTRA_CFLAGS) hasn't been work.
I aslo try to add "export EXTRA_CFLAGS" in a.makefile,but it doesn't work either.
the problem has puzzled me for some days.
help me please~~
2010-08-03
hacklu
·¢¼þÈË£º Am¨¦rico Wang
·¢ËÍʱ¼ä£º 2010-08-03 16:32:08
ÊÕ¼þÈË£º hacklu
³ËÍ£º linux-kernel
Ö÷Ì⣺ Re: how about KBUILD_MODNAME
On Tue, Aug 03, 2010 at 03:11:59PM +0800, hacklu wrote:
>
>I don't understand the macro KBUILD_MODNAME .
>when I compile a driver program. It returns me "linux/pci.h:655: error: 'KBUILD_MODNAME' undeclared (first use in this function) "
>
>In the makefile I had used the "-D" options
>
You don't need to care about KBUILD_MODNAME, it is defined
internally by kbuild and passed to your module via "-DKBUILD_MODNAME=XXX"
automatically.
So, it looks like you didn't write your makefile correctly.
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
next prev parent reply other threads:[~2010-08-03 9:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <201008031037022524247@gmail.com>
2010-08-03 7:11 ` how about KBUILD_MODNAME hacklu
2010-08-03 8:36 ` Américo Wang
2010-08-03 9:35 ` hacklu [this message]
2010-08-03 10:00 ` Sam Ravnborg
2010-08-03 10:12 ` Américo Wang
2010-08-03 9:52 ` Boaz Harrosh
2010-08-03 9:56 ` Boaz Harrosh
2010-08-03 10:15 ` Américo Wang
2010-08-03 10:24 ` Boaz Harrosh
2010-08-03 11:02 ` Sam Ravnborg
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=201008031735377545190@gmail.com \
--to=embedway.linux@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=xiyou.wangcong@gmail.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