]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
UBUNTU: [Packaging] include the retpoline extractor in the headers
authorAndy Whitcroft <apw@canonical.com>
Tue, 3 Apr 2018 16:52:00 +0000 (18:52 +0200)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Thu, 5 Apr 2018 08:43:33 +0000 (10:43 +0200)
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 <apw@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
debian/rules
debian/rules.d/2-binary-arch.mk
scripts/Makefile.build

index 61680be586f0c11ae0800efeae5a9d502af53579..7519bc4a9d327f4e4e2531ed038ad50ff12ab1c3 100755 (executable)
@@ -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
index 6a570ab22f2437b6043694fe37de036f829f9739..9920df16f4d4cc7cba65aeab0a0ddc9df5f446fd 100644 (file)
@@ -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
index 9684c1091e62c3cf5ee80e001adbf8ae46151d69..d74c3f9f1fa89bacff3037b988713c2895a9c57b 100644 (file)
@@ -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