public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Roland Dreier <rdreier@cisco.com>
Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de,
	"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: Build failure (with insane config)
Date: Mon, 28 Apr 2008 10:08:19 +0200	[thread overview]
Message-ID: <20080428080819.GC1415@elte.hu> (raw)
In-Reply-To: <adahcdm3b63.fsf@cisco.com>


* Roland Dreier <rdreier@cisco.com> wrote:

> For x86-64, arch/x86/lib/Makefile has:
> 
>         lib-y += csum-partial_64.o csum-copy_64.o csum-wrappers_64.o
> 
> so in particular ip_compute_csum() (from csum-partial_64.c) gets put in
> libs, so even though it is exported, it gets thrown away at link time if
> there are no non-modular users.
> 
> However, if someone has an insane config with CONFIG_NET=n and
> CONFIG_VIDEO_BT848=m, then ip_compute_csum() gets discarded but the
> modular code in drivers/media/video/bt8xx/bttv-cards.c calls it and...
> 
>         ERROR: "ip_compute_csum" [drivers/media/video/bt8xx/bttv.ko] undefined!
> 
> I guess one fix is just to put at least csum-partial_64.c in obj-y 
> instead; it does seem broken to have files with EXPORT_SYMBOL() be 
> lib-y, since it is really an invitation for this problem.  Other ideas 
> would be for bttv to depend on or select CONFIG_NET.

well, the TCP/IP checksumming functions are in lib portions on every 
architecture i checked, and the exports are handled by the networking 
code. And the symbol used is named ip_compute_csum(). So i think the 
correct solution is to make CONFIG_VIDEO_BT848 depend on CONFIG_NET ...

especially on embedded there's an advantage in linking out unused core 
kernel functions. But even if we did this change on x86, other 
architectures might (correctly) complain about x86 going it alone. x86 
gets the most use by far, so if we start introducing build assymetries 
like this it will just mess up the build on other architectures.

	Ingo

  reply	other threads:[~2008-04-28  8:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-28  3:34 Build failure (with insane config) Roland Dreier
2008-04-28  8:08 ` Ingo Molnar [this message]
2008-04-28  9:30 ` Adrian Bunk

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=20080428080819.GC1415@elte.hu \
    --to=mingo@elte.hu \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdreier@cisco.com \
    --cc=tglx@linutronix.de \
    /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