diff options
author | Bruce Ashfield <bruce.ashfield@windriver.com> | 2018-03-06 13:11:17 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-03-08 15:28:04 -0800 |
commit | 128dd9ec601fab4d213ffe703a79b0e8814ad907 (patch) | |
tree | 1fd23341f22f0c719e68fbff27a695e7eb976ed0 | |
parent | 0fa0baed74dfc1d0b4245fd7c552a55c12ce6b23 (diff) | |
download | poky-128dd9ec601fab4d213ffe703a79b0e8814ad907.tar.gz |
kernel: make copying of crtsavres.o conditional
As of the 4.13 kernel, there are configuration + linker combinations
that do not need (or build) crtsavres.o for ppc64 targets. The commit
of interest is:
commit efe0160cfd40a99c052a00e174787c1f4158a9cd
Author: Nicholas Piggin <npiggin@gmail.com>
Date: Fri May 12 01:56:52 2017 +1000
powerpc/64: Linker on-demand sfpr functions for modules
For final link, the powerpc64 linker generates fpr save/restore
functions on-demand, placing them in the .sfpr section. Starting with
binutils 2.25, these can be provided for non-final links with
--save-restore-funcs. Use that where possible for module links.
This saves about 200 bytes per module (~60kB) on powernv defconfig
build.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
As such, our arch test for crtsavres.o is not enough, we add a secondary
existence check before trying the copy.
[YOCTO #12576]
(From OE-Core rev: af58819253a2d4526dc8871a17e1492bd1d92951)
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/kernel.bbclass | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass index 321c0a47bb..9bc0e41251 100644 --- a/meta/classes/kernel.bbclass +++ b/meta/classes/kernel.bbclass | |||
@@ -466,8 +466,10 @@ do_shared_workdir () { | |||
466 | # arch/powerpc/lib/crtsavres.o which is present in | 466 | # arch/powerpc/lib/crtsavres.o which is present in |
467 | # KBUILD_LDFLAGS_MODULE, making it required to build external modules. | 467 | # KBUILD_LDFLAGS_MODULE, making it required to build external modules. |
468 | if [ ${ARCH} = "powerpc" ]; then | 468 | if [ ${ARCH} = "powerpc" ]; then |
469 | mkdir -p $kerneldir/arch/powerpc/lib/ | 469 | if [ -e arch/powerpc/lib/crtsavres.o ]; then |
470 | cp arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o | 470 | mkdir -p $kerneldir/arch/powerpc/lib/ |
471 | cp arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o | ||
472 | fi | ||
471 | fi | 473 | fi |
472 | 474 | ||
473 | if [ -d include/generated ]; then | 475 | if [ -d include/generated ]; then |