From: Adrian Bunk <bunk@stusta.de>
To: Dave Airlie <airlied@linux.ie>
Cc: linux-kernel@vger.kernel.org
Subject: Re: kconfig/build question..
Date: Wed, 10 Nov 2004 03:09:51 +0100 [thread overview]
Message-ID: <20041110020951.GE4089@stusta.de> (raw)
In-Reply-To: <Pine.LNX.4.58.0411100110170.1637@skynet>
On Wed, Nov 10, 2004 at 01:16:10AM +0000, Dave Airlie wrote:
>
> I've come across something that I'm not sure Kconfig can do but I'll
> explain what I need and see what others can come up with...
>
> The DRM has a weak dependency on AGP, it does not require AGP for all
> situations but can use it in most...
>
> So what I want to do and what I think Kbuild can't do is:
>
> if CONFIG_AGP=n then CONFIG_DRM can be n,m,y
> if CONFIG_AGP=m then CONFIG_DRM can be m but not y
> if CONFIG_AGP=y then CONFIG_DRM can be m,y
>...
The second case is bad because enabling a module shouldn't change the
static parts of the kernel [1].
Let me suggest a slightly different solution:
I assume a "weak dependency" dependency means you can enable some AGP
specific code in the DRM code?
config DRM_AGP
bool
depends on ((DRM = "m" && AGP) || (DRM = "y" && AGP = "y"))
default y
In the DRM code, you #ifdef CONFIG_DRM_AGP the AGP specific code.
This way, CONFIG_AGP=m and CONFIG_DRM=y is a legal configuration but
doesn't enable the AGP specific code in the DRM code.
> Dave.
cu
Adrian
[1] yes, this isn't always true in the current kernel
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
next prev parent reply other threads:[~2004-11-10 2:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-10 1:16 kconfig/build question Dave Airlie
2004-11-10 2:09 ` Adrian Bunk [this message]
2004-11-10 11:55 ` Roman Zippel
2004-11-11 10:16 ` Dave Airlie
2004-11-12 18:40 ` Adrian Bunk
2004-11-13 6:10 ` Dave Airlie
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=20041110020951.GE4089@stusta.de \
--to=bunk@stusta.de \
--cc=airlied@linux.ie \
--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.