xen, xen-tools: apply workaround for gnu linker error to fix x86 build
PATCH 1/1 xen, xen-tools: apply workaround for gnu linker error to fix x86 build
Upstream patch applied to each Xen and Xen tools recipe to fix the build of the hypervisor and shim with GNU linker 2.37.
Signed-off-by Christopher Clark <[email protected]>
--- ...-around-build-issue-with-GNU-ld-2.37.patch | 36 +++++++++++++++++++ recipes-extended/xen/xen-tools_4.14.bb | 1 + recipes-extended/xen/xen-tools_4.15.bb | 1 + recipes-extended/xen/xen-tools_git.bb | 1 + recipes-extended/xen/xen_4.14.bb | 1 + recipes-extended/xen/xen_4.15.bb | 1 + recipes-extended/xen/xen_git.bb | 1 + 7 files changed, 42 insertions(+) create mode 100644 recipes-extended/xen/files/0001-x86-work-around-build-issue-with-GNU-ld-2.37.patch
recipes-extended/xen/files/0001-x86-work-around-build-issue-with-GNU-ld-2.37.patch new file +36 -0
@@ -0,0 +1,36 @@ +From 58ad654ebce7ccb272a3f4f3482c03aaad850d31 Mon Sep 17 00:00:00 2001 +From: Jan Beulich <[email protected]> +Date: Thu, 22 Jul 2021 11:20:38 +0200 +Subject: [PATCH] x86: work around build issue with GNU ld 2.37 + +I suspect it is commit 40726f16a8d7 ("ld script expression parsing") +which broke the hypervisor build, by no longer accepting section names +with a dash in them inside ADDR() (and perhaps other script directives +expecting just a section name, not an expression): .note.gnu.build-id +is such a section. + +Quoting all section names passed to ADDR() via DECL_SECTION() works +around the regression. + +Signed-off-by: Jan Beulich <[email protected]> +Acked-by: Andrew Cooper <[email protected]> +--- + xen/arch/x86/xen.lds.S | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S +index 9c6c1c8005..955d5cf4a0 100644 +--- a/xen/arch/x86/xen.lds.S ++++ b/xen/arch/x86/xen.lds.S +@@ -18,7 +18,7 @@ ENTRY(efi_start) + #else /* !EFI */ + + #define FORMAT "elf64-x86-64" +-#define DECL_SECTION(x) x : AT(ADDR(x) - __XEN_VIRT_START) ++#define DECL_SECTION(x) x : AT(ADDR(#x) - __XEN_VIRT_START) + + ENTRY(start_pa) + +-- +2.25.1 +
recipes-extended/xen/xen-tools_4.14.bb +1 -0
@@ -9,6 +9,7 @@ SRC_URI = " \ file://0001-firmware-provide-a-stand-alone-set-of-headers-Xen-4.14.patch \ file://0001-tools-firmware-Build-firmware-as-ffreestanding-Xen-4.14.patch \ file://0001-libs-foreignmemory-Fix-osdep_xenforeignmemory_map-pr.patch \ + file://0001-x86-work-around-build-issue-with-GNU-ld-2.37.patch \ " LIC_FILES_CHKSUM ?= "file://COPYING;md5=419739e325a50f3d7b4501338e44a4e5"
recipes-extended/xen/xen-tools_4.15.bb +1 -0
@@ -7,6 +7,7 @@ SRC_URI = " \ git://xenbits.xen.org/xen.git;branch=${XEN_BRANCH} \ file://0001-python-pygrub-pass-DISTUTILS-xen-4.15.patch \ file://0001-libs-foreignmemory-Fix-osdep_xenforeignmemory_map-pr.patch \ + file://0001-x86-work-around-build-issue-with-GNU-ld-2.37.patch \ " LIC_FILES_CHKSUM ?= "file://COPYING;md5=419739e325a50f3d7b4501338e44a4e5"
recipes-extended/xen/xen-tools_git.bb +1 -0
@@ -7,6 +7,7 @@ SRC_URI = " \ git://xenbits.xen.org/xen.git;branch=${XEN_BRANCH} \ file://0001-python-pygrub-pass-DISTUTILS-xen-4.15.patch \ file://0001-libs-foreignmemory-Fix-osdep_xenforeignmemory_map-pr.patch \ + file://0001-x86-work-around-build-issue-with-GNU-ld-2.37.patch \ " LIC_FILES_CHKSUM ?= "file://COPYING;md5=419739e325a50f3d7b4501338e44a4e5"
recipes-extended/xen/xen_4.14.bb +1 -0
@@ -7,6 +7,7 @@ SRC_URI = " \ git://xenbits.xen.org/xen.git;branch=${XEN_BRANCH} \ file://xen-arm64-implement-atomic-fetch-add.patch \ file://0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-location.patch \ + file://0001-x86-work-around-build-issue-with-GNU-ld-2.37.patch \ " LIC_FILES_CHKSUM ?= "file://COPYING;md5=419739e325a50f3d7b4501338e44a4e5"
recipes-extended/xen/xen_4.15.bb +1 -0
@@ -8,6 +8,7 @@ SRC_URI = " \ file://xen-arm64-implement-atomic-fetch-add.patch \ file://0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-location.patch \ file://0001-x86-make-hypervisor-build-with-gcc11.patch \ + file://0001-x86-work-around-build-issue-with-GNU-ld-2.37.patch \ " LIC_FILES_CHKSUM ?= "file://COPYING;md5=419739e325a50f3d7b4501338e44a4e5"
recipes-extended/xen/xen_git.bb +1 -0
@@ -8,6 +8,7 @@ SRC_URI = " \ file://xen-arm64-implement-atomic-fetch-add.patch \ file://0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-location.patch \ file://0001-x86-make-hypervisor-build-with-gcc11.patch \ + file://0001-x86-work-around-build-issue-with-GNU-ld-2.37.patch \ " LIC_FILES_CHKSUM ?= "file://COPYING;md5=419739e325a50f3d7b4501338e44a4e5"
Signature · 1 line
2.25.1
merged!
Bruce
In message: [meta-virtualization][PATCH] xen, xen-tools: apply workaround for gnu linker error to fix x86 build
Quoted 132 lines · on 23/08/2021 Christopher Clark wrote:
Upstream patch applied to each Xen and Xen tools recipe to fix the build of the hypervisor and shim with GNU linker 2.37.
Signed-off-by Christopher Clark <[email protected]>--- ...-around-build-issue-with-GNU-ld-2.37.patch | 36 +++++++++++++++++++ recipes-extended/xen/xen-tools_4.14.bb | 1 + recipes-extended/xen/xen-tools_4.15.bb | 1 + recipes-extended/xen/xen-tools_git.bb | 1 + recipes-extended/xen/xen_4.14.bb | 1 + recipes-extended/xen/xen_4.15.bb | 1 + recipes-extended/xen/xen_git.bb | 1 + 7 files changed, 42 insertions(+) create mode 100644 recipes-extended/xen/files/0001-x86-work-around-build-issue-with-GNU-ld-2.37.patchrecipes-extended/xen/files/0001-x86-work-around-build-issue-with-GNU-ld-2.37.patch new file +36
-0@@ -0,0 +1,36 @@ +From 58ad654ebce7ccb272a3f4f3482c03aaad850d31 Mon Sep 17 00:00:00 2001 +From: Jan Beulich <[email protected]> +Date: Thu, 22 Jul 2021 11:20:38 +0200 +Subject: [PATCH] x86: work around build issue with GNU ld 2.37 + +I suspect it is commit 40726f16a8d7 ("ld script expression parsing") +which broke the hypervisor build, by no longer accepting section names +with a dash in them inside ADDR() (and perhaps other script directives +expecting just a section name, not an expression): .note.gnu.build-id +is such a section. + +Quoting all section names passed to ADDR() via DECL_SECTION() works +around the regression. + +Signed-off-by: Jan Beulich <[email protected]> +Acked-by: Andrew Cooper <[email protected]> +--- + xen/arch/x86/xen.lds.S | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S +index 9c6c1c8005..955d5cf4a0 100644 +--- a/xen/arch/x86/xen.lds.S ++++ b/xen/arch/x86/xen.lds.S +@@ -18,7 +18,7 @@ ENTRY(efi_start) + #else /* !EFI */ + + #define FORMAT "elf64-x86-64" +-#define DECL_SECTION(x) x : AT(ADDR(x) - __XEN_VIRT_START) ++#define DECL_SECTION(x) x : AT(ADDR(#x) - __XEN_VIRT_START) + + ENTRY(start_pa) + +-- +2.25.1 +recipes-extended/xen/xen-tools_4.14.bb +1
-0@@ -9,6 +9,7 @@ SRC_URI = " \ file://0001-firmware-provide-a-stand-alone-set-of-headers-Xen-4.14.patch \ file://0001-tools-firmware-Build-firmware-as-ffreestanding-Xen-4.14.patch \ file://0001-libs-foreignmemory-Fix-osdep_xenforeignmemory_map-pr.patch \ + file://0001-x86-work-around-build-issue-with-GNU-ld-2.37.patch \ " LIC_FILES_CHKSUM ?= "file://COPYING;md5=419739e325a50f3d7b4501338e44a4e5"recipes-extended/xen/xen-tools_4.15.bb +1
-0@@ -7,6 +7,7 @@ SRC_URI = " \ git://xenbits.xen.org/xen.git;branch=${XEN_BRANCH} \ file://0001-python-pygrub-pass-DISTUTILS-xen-4.15.patch \ file://0001-libs-foreignmemory-Fix-osdep_xenforeignmemory_map-pr.patch \ + file://0001-x86-work-around-build-issue-with-GNU-ld-2.37.patch \ " LIC_FILES_CHKSUM ?= "file://COPYING;md5=419739e325a50f3d7b4501338e44a4e5"recipes-extended/xen/xen-tools_git.bb +1
-0@@ -7,6 +7,7 @@ SRC_URI = " \ git://xenbits.xen.org/xen.git;branch=${XEN_BRANCH} \ file://0001-python-pygrub-pass-DISTUTILS-xen-4.15.patch \ file://0001-libs-foreignmemory-Fix-osdep_xenforeignmemory_map-pr.patch \ + file://0001-x86-work-around-build-issue-with-GNU-ld-2.37.patch \ " LIC_FILES_CHKSUM ?= "file://COPYING;md5=419739e325a50f3d7b4501338e44a4e5"recipes-extended/xen/xen_4.14.bb +1
-0@@ -7,6 +7,7 @@ SRC_URI = " \ git://xenbits.xen.org/xen.git;branch=${XEN_BRANCH} \ file://xen-arm64-implement-atomic-fetch-add.patch \ file://0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-location.patch \ + file://0001-x86-work-around-build-issue-with-GNU-ld-2.37.patch \ " LIC_FILES_CHKSUM ?= "file://COPYING;md5=419739e325a50f3d7b4501338e44a4e5"recipes-extended/xen/xen_4.15.bb +1
-0@@ -8,6 +8,7 @@ SRC_URI = " \ file://xen-arm64-implement-atomic-fetch-add.patch \ file://0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-location.patch \ file://0001-x86-make-hypervisor-build-with-gcc11.patch \ + file://0001-x86-work-around-build-issue-with-GNU-ld-2.37.patch \ " LIC_FILES_CHKSUM ?= "file://COPYING;md5=419739e325a50f3d7b4501338e44a4e5"recipes-extended/xen/xen_git.bb +1
-0@@ -8,6 +8,7 @@ SRC_URI = " \ file://xen-arm64-implement-atomic-fetch-add.patch \ file://0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-location.patch \ file://0001-x86-make-hypervisor-build-with-gcc11.patch \ + file://0001-x86-work-around-build-issue-with-GNU-ld-2.37.patch \ " LIC_FILES_CHKSUM ?= "file://COPYING;md5=419739e325a50f3d7b4501338e44a4e5"Signature · 1 line
2.25.1