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]

 



Hi Nicholas,

2017-06-23 0:50 GMT+09:00 Nicholas Piggin <npiggin@xxxxxxxxx>:
> On Thu, 22 Jun 2017 08:18:38 +0200
> Maxime Ripard <maxime.ripard@xxxxxxxxxxxxxxxxxx> wrote:
>
>> On Wed, Jun 21, 2017 at 10:55:06PM +0200, Arnd Bergmann wrote:
>> > 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.
>>
>> You can also disable MACH_SUN8I, it should disable a significant
>> number of the clocks driver.
>
>    text    data     bss     dec     hex filename
> 11655078        6018736  418944 18092758        11412d6 vmlinux.inclink
> 11655078        6018736  418944 18092758        11412d6 vmlinux.inclink.clk
> 11650534        6010288  418616 18079438        113dece vmlinux.thinarc
> 11650534        6010288  418616 18079438        113dece vmlinux.thinarc.clk
>
> Same result for me when compiling defconfig minus MACH_SUN8I, comparing
> +/- the clock patch and thin archives. No size savings. As I explained
> already, I really can't see how there could be any saving if the lib.a is
> incrementally linked into built-in.o.

I think defconfig minus MACH_SUN8I
will give no difference to CONFIG_SUNXI_CCU*

As far as I tried,  minus MACH_SUN8I still enabled the following:
CONFIG_SUNXI_CCU=y
CONFIG_SUNXI_CCU_DIV=y
CONFIG_SUNXI_CCU_FRAC=y
CONFIG_SUNXI_CCU_GATE=y
CONFIG_SUNXI_CCU_MUX=y
CONFIG_SUNXI_CCU_MULT=y
CONFIG_SUNXI_CCU_PHASE=y
CONFIG_SUNXI_CCU_NK=y
CONFIG_SUNXI_CCU_NKM=y
CONFIG_SUNXI_CCU_NKMP=y
CONFIG_SUNXI_CCU_NM=y
CONFIG_SUNXI_CCU_MP=y

I think you need to disable some more MACH_SUN*I and
perhaps disable some CONFIG_SUN*I_*_CCU explicitly,
then you will see difference in the result.





-- 
Best Regards
Masahiro Yamada




[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