From: Andy Whitcroft Date: Tue, 3 Apr 2018 16:52:00 +0000 (+0200) Subject: UBUNTU: [Packaging] include the retpoline extractor in the headers X-Git-Tag: Ubuntu-4.13.0-39.44~4 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=cbe746278f766b0b31729aff38a22d0a7e31d69b;p=mirror_ubuntu-artful-kernel.git UBUNTU: [Packaging] include the retpoline extractor in the headers BugLink: http://bugs.launchpad.net/bugs/1760876 Out of tree builds utilise the kernel Makefiles and therefore we need to include all direct dependencies of those Makefiles. Now that we call out to the repoline extractor during builds we must carry the extractor with the headers. Move the extractor to the kernel scripts directory and ensure its name is unique. Signed-off-by: Andy Whitcroft Acked-by: Stefan Bader Acked-by: Kleber Sacilotto de Souza Signed-off-by: Kleber Sacilotto de Souza --- diff --git a/debian/rules b/debian/rules index 61680be586f0..7519bc4a9d32 100755 --- a/debian/rules +++ b/debian/rules @@ -119,6 +119,9 @@ clean: debian/control # Install the copyright information. cp $(DEBIAN)/copyright debian/copyright + # Install the retpoline extractor. + cp $(DROOT)/scripts/retpoline-extract-one scripts/ubuntu-retpoline-extract-one + # If we have a reconstruct script use it. [ -f $(DEBIAN)/reconstruct ] && bash $(DEBIAN)/reconstruct @@ -127,7 +130,8 @@ clean: debian/control distclean: clean rm -rf $(DROOT)/control debian/changelog \ - debian/control debian/control.stub debian/copyright + debian/control debian/control.stub debian/copyright \ + scripts/ubuntu-retpoline-extract-one # Builds the image, arch headers and debug packages include $(DROOT)/rules.d/2-binary-arch.mk diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk index 6a570ab22f24..9920df16f4d4 100644 --- a/debian/rules.d/2-binary-arch.mk +++ b/debian/rules.d/2-binary-arch.mk @@ -331,6 +331,8 @@ ifeq ($(build_arch),arm64) mkdir -p $(hdrdir)/arch/arm64/lib cp $(builddir)/build-$*/arch/arm64/kernel/ftrace-mod.o $(hdrdir)/arch/arm64/kernel endif + # Copy over the new retpoline extractor. + cp scripts/ubuntu-retpoline-extract-one $(hdrdir)/scripts # Script to symlink everything up $(SHELL) $(DROOT)/scripts/link-headers "$(hdrdir)" "$(indeppkg)" "$*" # The build symlink diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 9684c1091e62..d74c3f9f1fa8 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -283,7 +283,7 @@ objtool_dep = $(objtool_obj) \ include/config/stack/validation.h) ifdef CONFIG_RETPOLINE -cmd_ubuntu_retpoline = $(CONFIG_SHELL) $(srctree)/debian/scripts/retpoline-extract-one $(@) $(<) "$(filter -m16 %code16gcc.h,$(a_flags))"; +cmd_ubuntu_retpoline = $(CONFIG_SHELL) $(srctree)/scripts/ubuntu-retpoline-extract-one $(@) $(<) "$(filter -m16 %code16gcc.h,$(a_flags))"; else cmd_ubuntu_retpoline = endif