From: Sam Ravnborg <sam@ravnborg.org>
To: Christoph Hellwig <hch@infradead.org>,
Jaroslav Kysela <perex@suse.cz>,
LKML <linux-kernel@vger.kernel.org>,
ALSA development <alsa-devel@alsa-project.org>,
kbuild-devel@lists.sourceforge.net,
Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Subject: Re: 2.5 kbuild: use of '-z muldefs' for LD?
Date: Mon, 9 Jun 2003 21:45:10 +0200 [thread overview]
Message-ID: <20030609194510.GA11830@mars.ravnborg.org> (raw)
In-Reply-To: <20030609130438.A6417@infradead.org>
On Mon, Jun 09, 2003 at 01:04:38PM +0100, Christoph Hellwig wrote:
> On Mon, Jun 09, 2003 at 01:56:59PM +0200, Jaroslav Kysela wrote:
> > one object file for more targets. Example:
> >
> > ------
> > snd-ice1712-objs := ice1712.o delta.o hoontech.o ews.o ak4xxx.o
> > snd-ice1724-objs := ice1724.o amp.o revo.o aureon.o ak4xxx.o
> >
> > # Toplevel Module Dependency
> > obj-$(CONFIG_SND_ICE1712) += snd-ice1712.o
> > obj-$(CONFIG_SND_ICE1724) += snd-ice1724.o
> > ------
> >
> > The ak4xxx.o module is shared and has defined a few public functions.
> > Unfortunately, the default build-in.o rule fails when targets are
> > requested to be included into the solid kernel because the public
> > functions are duplicated in snd-ice1712.o and snd-ice17124.o.
> >
> > I can instruct the ld compiler to ignore the multiple definitions using
> > '-z muldefs':
> >
> > EXTRA_LDFLAGS = -z muldefs
> >
> > But it seems like a hack for me.
> > Does anybody have another idea to solve my problem?
>
> Move ak4xxx.o out of the multi-obj rules. Just declare a new helper-
> config option CONFIG_SND_AK4XXX that gets defined by all drivers
> using it and add
>
> obj-$(CONFIG_SND_AK4XXX) += ak4xxx.o
Would it be worthwhile to resolve common functions from a library instead?
On request from Linus I made the lib-y change, and it is getting
a lot easier to create libraries.
So ak4xxx.o would be used to create lib.a in that particular directory.
A limitation would be that libaries would only be valid for current
directory - but that is OK for this situation.
On the other hand there should be very good reasons to clutter up the
build-system with this, so more users than sound is required.
Comments?
[Will there be problems with modules exporting symbols?]
Sam
next prev parent reply other threads:[~2003-06-09 19:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-09 11:56 2.5 kbuild: use of '-z muldefs' for LD? Jaroslav Kysela
2003-06-09 11:56 ` Jaroslav Kysela
2003-06-09 12:04 ` Christoph Hellwig
2003-06-09 14:01 ` Jaroslav Kysela
2003-06-09 14:01 ` Jaroslav Kysela
2003-06-09 14:19 ` Christoph Hellwig
2003-06-09 14:29 ` Peter Samuelson
2003-06-09 19:45 ` Sam Ravnborg [this message]
2003-06-09 20:15 ` Kai Germaschewski
2003-06-09 12:08 ` Christoph Hellwig
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=20030609194510.GA11830@mars.ravnborg.org \
--to=sam@ravnborg.org \
--cc=alsa-devel@alsa-project.org \
--cc=hch@infradead.org \
--cc=kai@tp1.ruhr-uni-bochum.de \
--cc=kbuild-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@suse.cz \
/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.