Re: [PATCH 1/5] kbuild: thin archives final link close --whole-archives option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 21, 2017 at 8:08 PM, Nicholas Piggin <npiggin@xxxxxxxxx> wrote:
> On Wed, 21 Jun 2017 09:19:13 -0700
> Stephen Boyd <sboyd@xxxxxxxxxxxxxx> wrote:
>> On 06/21, Arnd Bergmann wrote:
>>
>> Ok. Can you send a revert patch to the list with some information
>> on why we can't do the hack anymore and also Cc lkml/kbuild
>> lists? The commit is in linux-next now as commit 06e226c7fb23
>> (clk: sunxi-ng: Move all clock types to a library, 2017-06-02).
>>
>
> I grabbed this patch and applied it to the kbuid/thin-ac tree. I tested
> with thin archives enabled and disabled with arm defconfig which ends up
> setting CONFIG_SUNXI_CCU=y.
>
> The patch makes no difference to vmlinux size whether using traditional
> incremental link, or thin archives (there is a small difference between
> inclink and thinarc but that's unrelated).
>
> So this thin archives change does not break your patch, it's just that
> it doesn't really do the right thing. I like the general idea, but we
> need to work out how to make it properly supported by the build system.
>
> With the patch applied, this is what the build system currently does:
>
> arm-linux-gnueabihf-ld -EL    -r -o drivers/clk/sunxi-ng/built-in.o drivers/clk/sunxi-ng/ccu-sun5i.o drivers/clk/sunxi-ng/ccu-sun6i-a31.o drivers/clk/sunxi-ng/ccu-sun8i-a23.o drivers/clk/sunxi-ng/ccu-sun8i-a33.o drivers/clk/sunxi-ng/ccu-sun8i-h3.o drivers/clk/sunxi-ng/ccu-sun8i-v3s.o drivers/clk/sunxi-ng/ccu-sun8i-r.o drivers/clk/sunxi-ng/ccu-sun9i-a80.o drivers/clk/sunxi-ng/ccu-sun9i-a80-de.o drivers/clk/sunxi-ng/ccu-sun9i-a80-usb.o drivers/clk/sunxi-ng/lib.a drivers/clk/sunxi-ng/lib-ksyms.o
>
> This incremental link pulls in all your lib.a objects and links them
> into built-in.o. They can no longer be selectively linked.

I think the ARM defconfig actually needs all those objects because it
enables all the high-level drivers. You could try disabling e.g. all except
CONFIG_SUN8I_DE2_CCU if you want the objects to actually becomes
unused.

       Arnd




[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux