From: Nicholas Piggin <npiggin@gmail.com>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
linux-arch <linux-arch@vger.kernel.org>,
Michal Marek <mmarek@suse.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Stephen Rothwell <sfr@canb.auug.org.au>,
kbuild test robot <fengguang.wu@intel.com>,
Josh Triplett <josh@joshtriplett.org>
Subject: Re: [PATCH 1/5] kbuild: thin archives final link close --whole-archives option
Date: Wed, 21 Jun 2017 12:47:08 +1000 [thread overview]
Message-ID: <20170621124708.6bce7692@roar.ozlabs.ibm.com> (raw)
In-Reply-To: <CAK7LNAS6zucv54-XwqfTbm=y20eFVQYLwgsVCdtS7mYknsYK+Q@mail.gmail.com>
On Wed, 21 Jun 2017 10:17:11 +0900
Masahiro Yamada <yamada.masahiro@socionext.com> wrote:
> Hi Nicholas,
>
> 2017-06-20 0:52 GMT+09:00 Nicholas Piggin <npiggin@gmail.com>:
> >>
> >> masahiro@pug:~$ xtensa-linux-ld -v
> >> GNU ld (GNU Binutils) 2.24
> >
> > Ah, thank you. It must have been that the 0day build (cc'ed) did
> > not return any error to be from the ld internal error.
> >
> > This has led me to the true cause of the error which is the way
> > external archives are handled. After implementing the fix, I think
> > the lib.a size regression for thin archives should be solved as
> > well.
>
>
> Thanks for figuring this out!
>
>
> > This patch should be added between patches 2 and 3 of this series.
> >
>
> Done.
>
>
> I applied all 6 patches to linux-kbuild/thin-ar.
>
> I fixed up some:
>
> [1] fix a typo "tihs" -> "this"
> [2] reword the document as "The build system has, as of 4.13, switched
> to using..."
> [3] Add "P" to link_vmlinux.sh as well
>
>
> Could you double-check if I did them correctly?
Yes these look good to me, thank you.
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -952,19 +952,20 @@ core-y := $(patsubst %/, %/built-in.o, $(core-y))
> > drivers-y := $(patsubst %/, %/built-in.o, $(drivers-y))
> > net-y := $(patsubst %/, %/built-in.o, $(net-y))
> > libs-y1 := $(patsubst %/, %/lib.a, $(libs-y))
> > -libs-y2 := $(patsubst %/, %/built-in.o, $(libs-y))
> > +libs-y2 := $(filter-out %.a, $(patsubst %/, %/built-in.o, $(libs-y)))
> > libs-y := $(libs-y1) $(libs-y2)
>
>
> After I applied this patch, I noticed one more thing.
>
> With this patch, I think "libs-y" will be unnecessary.
>
> If you ack me to fix-up locally, I will remove:
> libs-y := $(libs-y1) $(libs-y2)
Yes I suppose that can be removed.
I wonder if the names could be a bit more descriptive?
libs-y-liba
libs-y-builtin
?
> > @@ -50,7 +57,7 @@ archive_builtin()
> > if [ -n "${CONFIG_THIN_ARCHIVES}" ]; then
> > info AR built-in.o
> > rm -f built-in.o;
> > - ${AR} rcsT${KBUILD_ARFLAGS} built-in.o \
> > + ${AR} rcsTP${KBUILD_ARFLAGS} built-in.o \
> > ${KBUILD_VMLINUX_INIT} \
> > ${KBUILD_VMLINUX_MAIN}
> > fi
>
> I moved this hunk to 2/6 "thin archives use P option to ar".
Thanks,
Nick
next prev parent reply other threads:[~2017-06-21 2:47 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-09 5:24 [PATCH 0/5] move everyone over to thin archives Nicholas Piggin
2017-06-09 5:24 ` [PATCH 1/5] kbuild: thin archives final link close --whole-archives option Nicholas Piggin
2017-06-19 6:16 ` Masahiro Yamada
2017-06-19 6:51 ` Nicholas Piggin
2017-06-19 8:14 ` Masahiro Yamada
2017-06-19 8:27 ` Nicholas Piggin
2017-06-19 8:35 ` Masahiro Yamada
2017-06-19 15:52 ` Nicholas Piggin
2017-06-19 23:48 ` Josh Triplett
2017-06-21 1:17 ` Masahiro Yamada
2017-06-21 2:47 ` Nicholas Piggin [this message]
2017-06-21 3:29 ` Masahiro Yamada
2017-06-21 4:04 ` Nicholas Piggin
2017-06-21 7:15 ` Arnd Bergmann
2017-06-21 9:16 ` Nicholas Piggin
2017-06-21 10:21 ` Arnd Bergmann
2017-06-21 10:38 ` Nicholas Piggin
2017-06-21 10:49 ` Arnd Bergmann
2017-06-21 10:51 ` Arnd Bergmann
2017-06-21 11:10 ` Nicholas Piggin
2017-06-21 11:32 ` Arnd Bergmann
2017-06-21 12:02 ` Nicholas Piggin
2017-06-21 12:21 ` Arnd Bergmann
2017-06-21 16:19 ` Stephen Boyd
2017-06-21 18:08 ` Nicholas Piggin
2017-06-21 20:55 ` Arnd Bergmann
2017-06-22 6:18 ` Maxime Ripard
2017-06-22 15:50 ` Nicholas Piggin
2017-06-23 5:31 ` Masahiro Yamada
2017-06-23 14:57 ` Maxime Ripard
2017-06-23 15:04 ` Arnd Bergmann
2017-06-25 3:55 ` Masahiro Yamada
2017-06-27 15:42 ` Maxime Ripard
2017-06-21 20:52 ` Arnd Bergmann
2017-06-21 21:30 ` Nicholas Piggin
2017-06-21 21:44 ` Arnd Bergmann
2017-06-22 16:12 ` Nicholas Piggin
2017-06-09 5:24 ` [PATCH 2/5] kbuild: thin archives use P option to ar Nicholas Piggin
2017-06-19 6:17 ` Masahiro Yamada
2017-06-19 6:52 ` Nicholas Piggin
2017-06-09 5:24 ` [PATCH 3/5] sh: thin archives fix linking Nicholas Piggin
2017-06-19 6:19 ` Masahiro Yamada
2017-06-21 22:09 ` Rob Landley
2017-06-09 5:24 ` [PATCH 4/5] x86/um: thin archives build fix Nicholas Piggin
2017-06-19 6:21 ` Masahiro Yamada
2017-06-09 5:24 ` [PATCH 5/5] kbuild: thin archives make default for all archs Nicholas Piggin
2017-06-19 6:22 ` Masahiro Yamada
2017-06-19 6:55 ` Nicholas Piggin
2017-06-17 13:10 ` [PATCH 0/5] move everyone over to thin archives Nicholas Piggin
2017-06-19 6:30 ` Masahiro Yamada
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=20170621124708.6bce7692@roar.ozlabs.ibm.com \
--to=npiggin@gmail.com \
--cc=fengguang.wu@intel.com \
--cc=josh@joshtriplett.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=mmarek@suse.com \
--cc=sfr@canb.auug.org.au \
--cc=torvalds@linux-foundation.org \
--cc=yamada.masahiro@socionext.com \
/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