[PATCH v2 1/5] ARM: Broadcom: Unconditionally build arch/arm/mach-bcm
Russell King - ARM Linux
linux at arm.linux.org.uk
Fri Jul 26 19:42:37 EDT 2013
On Fri, Jul 26, 2013 at 05:11:08PM -0600, Jason Gunthorpe wrote:
> On Fri, Jul 26, 2013 at 11:59:00PM +0200, Domenico Andreoli wrote:
>
> > In mach-bcm we (or I, it's not very clear to me) want to have support for
> > multiple SoCs.
> >
> > In trying the approach
> >
> > machine-$(CONFIG_ARCH_BCM) += bcm
> > machine-$(CONFIG_ARCH_BCM4760) += bcm
> >
> > I got linker complains about multiple symbol definitiion in case both the
> > config options are selected.
>
> You can't repeat the same dir. Maybe this?
>
> bcm-machine-$(CONFIG_ARCH_BCM) := bmc
> bcm-machine-$(CONFIG_ARCH_BCM4760) := bmc
> machine-y += $(bcm-machine-y)
Thank you for making me look at that file and see how people fail to read
my comments about keeping stuff appropriately sorted. Really makes me
wonder why I bother.
Anyway, there's a simpler solutions to this:
machdirs := $(patsubst %,arch/arm/mach-%/,$(sort $(machine-y)))
platdirs := $(patsubst %,arch/arm/plat-%/,$(Sort $(plat-y)))
which will remove all duplicates.
More information about the linux-arm-kernel
mailing list