public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Keith Owens <kaos@ocs.com.au>
To: Riley Williams <rhw@MemAlpha.CX>
Cc: Russell King <rmk@arm.linux.org.uk>,
	Adam J Richter <adam@yggdrasil.com>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: 2.4.6p6: numerous dep_{bool,tristate} $CONFIG_ARCH_xxx bugs
Date: Sun, 01 Jul 2001 13:00:13 +1000	[thread overview]
Message-ID: <6794.993956413@ocs3.ocs-net> (raw)
In-Reply-To: Your message of "Sat, 30 Jun 2001 21:36:26 +0100." <Pine.LNX.4.33.0106302120560.14977-100000@infradead.org>

On Sat, 30 Jun 2001 21:36:26 +0100 (BST), 
Riley Williams <rhw@MemAlpha.CX> wrote:
> 1. Adam's point is that there are dep_* statements in the config
>    setup that have been used to say that a particular option is
>    dependant upon a particular architecture, but this doesn't work.
>
> 3. MY understanding of the situation is that ALL architecture
>    specific config lines are EXPECTED to be in the arch/*/config.in
>    files, where they will only even be seen when the relevant
>    architecture is being compiled for.
>
>As a result of this, I would summarise this discussion as saying that
>there is a bug in the kernel config scripts in that some options that
>should be located in the architecture-specific config files are in the
>all-architecture config files instead.

(1) and (3) are correct but your conclusion is not.  The problem is

  dep_tristate CONFIG_some_driver $CONFIG_some_arch

where the intention is to allow the driver only if some_arch is set.
When you compile for some_other_arch, CONFIG_some_arch is undefined.
dep_tristate treats undefined variables as "don't care" and we cannot
fix that without changing bash or a major rewrite of the shell scripts.
There are two solutions, either change all such lines to

  if [ "$CONFIG_some_arch" = "y" ];then
    tristate CONFIG_some_driver
  fi

or

  define_bool CONFIG_some_arch n

for all architectures at the start, followed by turning on the one that
is required.

Lots of if statements are messy and they will not prevent somebody
adding new options with exactly the same problem.  Explicitly setting
all but one arch variable to 'n' results in cleaner config scripts and
new arch dependent driver settings will automatically work.


  reply	other threads:[~2001-07-01  3:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-30 14:57 linux-2.4.6-pre6: numerous dep_{bool,tristate} $CONFIG_ARCH_xxx bugs Adam J. Richter
2001-06-30 15:01 ` Russell King
2001-06-30 20:36   ` 2.4.6p6: " Riley Williams
2001-07-01  3:00     ` Keith Owens [this message]
2001-07-01 23:04       ` [PATCH] Re: 2.4.6p6: " Riley Williams
2001-07-02  0:39         ` Keith Owens
2001-07-02  7:16           ` Riley Williams
2001-07-02  7:23             ` Keith Owens
2001-07-02  8:25               ` Riley Williams
2001-07-02  9:41                 ` Russell King
2001-07-02 12:40                   ` Riley Williams
2001-07-02 15:03                     ` Russell King
2001-07-02 16:28                       ` Nicolas Pitre
2001-07-01  2:39   ` linux-2.4.6-pre6: numerous " Keith Owens

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=6794.993956413@ocs3.ocs-net \
    --to=kaos@ocs.com.au \
    --cc=adam@yggdrasil.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rhw@MemAlpha.CX \
    --cc=rmk@arm.linux.org.uk \
    /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