ACK: [L/linux][K/linux][J/linux][PATCH v2] UBUNTU: [Packaging] Copy expoline.o only when produced by the build
Roxana Nicolescu
roxana.nicolescu at canonical.com
Fri Mar 31 10:39:00 UTC 2023
On 30/03/2023 16:32, Andrei Gherzan wrote:
> BugLink: https://bugs.launchpad.net/bugs/2013209
>
> CONFIG_EXPOLINE_EXTERN has been enabled for s390x [LP:#2013209]. While
> this works as expected on the base kernels, it might not work on some
> derivatives: for example focal:hwe-5.15 (derived from Jammy). On Focal,
> this config can't be enabled due to the GCC version it comes with.
> CONFIG_EXPOLINE_EXTERN requires >= 110200 while Focal comes with 90400.
>
> This change adds a check on the existence of the expoline object file(s)
> that are packaged later. This also makes the code more robust generally.
>
> Signed-off-by: Andrei Gherzan <andrei.gherzan at canonical.com>
> ---
>
> v2:
> * Switched from a check on the kconfig to a check on the output binaries
> * Adapted subject/description as per the above
>
> debian/rules.d/2-binary-arch.mk | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
> index ecc5afbc97ad..6eef2039ec7a 100644
> --- a/debian/rules.d/2-binary-arch.mk
> +++ b/debian/rules.d/2-binary-arch.mk
> @@ -341,8 +341,10 @@ ifeq ($(build_arch),powerpc)
> cp $(builddir)/build-$*/arch/powerpc/lib/*.o $(hdrdir)/arch/powerpc/lib
> endif
> ifeq ($(build_arch),s390)
> - mkdir -p $(hdrdir)/arch/s390/lib/expoline/
> - cp $(builddir)/build-$*/arch/s390/lib/expoline/*.o $(hdrdir)/arch/s390/lib/expoline/
> + if [ -n "$$(find $(builddir)/build-$*/arch/s390/lib/expoline -maxdepth 1 -name '*.o' -print -quit)" ]; then \
> + mkdir -p $(hdrdir)/arch/s390/lib/expoline/; \
> + cp $(builddir)/build-$*/arch/s390/lib/expoline/*.o $(hdrdir)/arch/s390/lib/expoline/; \
> + fi
> endif
> # Copy over scripts/module.lds for building external modules
> cp $(builddir)/build-$*/scripts/module.lds $(hdrdir)/scripts
Acked-by: Roxana Nicolescu <roxana.nicolescu at canonical.com>
More information about the kernel-team
mailing list