Message ID | 20230329133712.475448-1-andrei.gherzan@canonical.com |
---|---|
State | New |
Headers | show |
Series | [K/linux] UBUNTU: [Packaging] Copy expoline.o only when the relevant config is enabled | expand |
On 29/03/2023 15:37, Andrei Gherzan wrote: > BugLink: https://bugs.launchpad.net/bugs/2013209 > > The Jammy kernel enabled CONFIG_EXPOLINE_EXTERN for s390x. While this > works as expected on Jammy, it won't work on some derivatives of it: for > example focal:hwe-5.15. 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 config check when packaging of the expoline.o. > > Signed-off-by: Andrei Gherzan <andrei.gherzan@canonical.com> > --- > 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 8e053f832b06..4fd528b0d7fd 100644 > --- a/debian/rules.d/2-binary-arch.mk > +++ b/debian/rules.d/2-binary-arch.mk > @@ -335,8 +335,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 grep -q CONFIG_EXPOLINE_EXTERN=y $(builddir)/build-$*/.config; 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 > > I don't think it's necessary to specify linux in the title. [K] would suffice. Also why no [SRU]? Other than that, the patch looks good. Thanks for the fix. Acked-by: Roxana Nicolescu <roxana.nicolescu@canonical.com> Roxana
On 23/03/29 02:37PM, Andrei Gherzan wrote: > BugLink: https://bugs.launchpad.net/bugs/2013209 > > The Jammy kernel enabled CONFIG_EXPOLINE_EXTERN for s390x. While this > works as expected on Jammy, it won't work on some derivatives of it: for > example focal:hwe-5.15. 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 config check when packaging of the expoline.o. > > Signed-off-by: Andrei Gherzan <andrei.gherzan@canonical.com> > --- > 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 8e053f832b06..4fd528b0d7fd 100644 > --- a/debian/rules.d/2-binary-arch.mk > +++ b/debian/rules.d/2-binary-arch.mk > @@ -335,8 +335,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 grep -q CONFIG_EXPOLINE_EXTERN=y $(builddir)/build-$*/.config; 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 > -- > 2.34.1 > I will send another version of this after testing a check on the existence of the object files as opposed to having the check based on the associated kconfig.
diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk index 8e053f832b06..4fd528b0d7fd 100644 --- a/debian/rules.d/2-binary-arch.mk +++ b/debian/rules.d/2-binary-arch.mk @@ -335,8 +335,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 grep -q CONFIG_EXPOLINE_EXTERN=y $(builddir)/build-$*/.config; 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
BugLink: https://bugs.launchpad.net/bugs/2013209 The Jammy kernel enabled CONFIG_EXPOLINE_EXTERN for s390x. While this works as expected on Jammy, it won't work on some derivatives of it: for example focal:hwe-5.15. 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 config check when packaging of the expoline.o. Signed-off-by: Andrei Gherzan <andrei.gherzan@canonical.com> --- debian/rules.d/2-binary-arch.mk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)