From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B8E731582EF for ; Sat, 08 Feb 2025 01:47:43 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 98FBA342F93 for ; Sat, 08 Feb 2025 01:47:43 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 949441103CB; Sat, 08 Feb 2025 01:47:42 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 865E31103CB for ; Sat, 08 Feb 2025 01:47:42 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 17AB4342F8C for ; Sat, 08 Feb 2025 01:47:42 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 76EF6268A for ; Sat, 08 Feb 2025 01:47:40 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1738979229.db4070ee49e11b83c6ee1711b84bec5453450b04.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/files/, app-emulation/xen-tools/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-emulation/xen-tools/files/edk2-202202-binutils-2.41-textrels.patch app-emulation/xen-tools/xen-tools-4.18.4_pre1.ebuild app-emulation/xen-tools/xen-tools-4.19.1.ebuild X-VCS-Directories: app-emulation/xen-tools/ app-emulation/xen-tools/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: db4070ee49e11b83c6ee1711b84bec5453450b04 X-VCS-Branch: master Date: Sat, 08 Feb 2025 01:47:40 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 5f0646b7-7c61-4ee0-9622-a75305a125a7 X-Archives-Hash: adf0e8c899b5b7af03e43fb2a19a290e commit: db4070ee49e11b83c6ee1711b84bec5453450b04 Author: Sam James gentoo org> AuthorDate: Sat Feb 8 01:42:58 2025 +0000 Commit: Sam James gentoo org> CommitDate: Sat Feb 8 01:47:09 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=db4070ee app-emulation/xen-tools: fix build issues * Fix build w/ hardened binutils which rejects textrels. They're fine here. * Use gnu17 for some components as incompatible with gnu23. Bug: https://bugs.gentoo.org/913110 Bug: https://bugs.gentoo.org/937610 Signed-off-by: Sam James gentoo.org> .../files/edk2-202202-binutils-2.41-textrels.patch | 21 +++++++++++++++++++++ .../xen-tools/xen-tools-4.18.4_pre1.ebuild | 16 ++++++++++++++++ app-emulation/xen-tools/xen-tools-4.19.1.ebuild | 11 +++++++++++ 3 files changed, 48 insertions(+) diff --git a/app-emulation/xen-tools/files/edk2-202202-binutils-2.41-textrels.patch b/app-emulation/xen-tools/files/edk2-202202-binutils-2.41-textrels.patch new file mode 100644 index 000000000000..22d33c9097aa --- /dev/null +++ b/app-emulation/xen-tools/files/edk2-202202-binutils-2.41-textrels.patch @@ -0,0 +1,21 @@ +https://bugs.gentoo.org/913110 +--- a/BaseTools/Conf/tools_def.template ++++ b/BaseTools/Conf/tools_def.template +@@ -1906,7 +1906,7 @@ DEFINE GCC48_IA32_X64_DLINK_COMMON = -nostdlib -Wl,-n,-q,--gc-sections -z comm + DEFINE GCC48_IA32_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -Wno-address + DEFINE GCC48_X64_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) -m64 -fno-stack-protector "-DEFIAPI=__attribute__((ms_abi))" -maccumulate-outgoing-args -mno-red-zone -Wno-address -mcmodel=small -fpie -fno-asynchronous-unwind-tables -Wno-address + DEFINE GCC48_IA32_X64_ASLDLINK_FLAGS = DEF(GCC48_IA32_X64_DLINK_COMMON) -Wl,--entry,ReferenceAcpiTable -u ReferenceAcpiTable +-DEFINE GCC48_IA32_X64_DLINK_FLAGS = DEF(GCC48_IA32_X64_DLINK_COMMON) -Wl,--entry,$(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT) -Wl,-Map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map,--whole-archive ++DEFINE GCC48_IA32_X64_DLINK_FLAGS = DEF(GCC48_IA32_X64_DLINK_COMMON) -Wl,--entry,$(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT) -Wl,-Map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map,--whole-archive -Wl,-z,notext + DEFINE GCC48_IA32_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x220 DEF(GCC_DLINK2_FLAGS_COMMON) + DEFINE GCC48_X64_DLINK_FLAGS = DEF(GCC48_IA32_X64_DLINK_FLAGS) -Wl,-melf_x86_64,--oformat=elf64-x86-64,-pie + DEFINE GCC48_X64_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x228 DEF(GCC_DLINK2_FLAGS_COMMON) +@@ -1929,7 +1929,7 @@ DEFINE GCC49_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -fno-pic -fno-pi + DEFINE GCC49_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) + DEFINE GCC49_IA32_X64_DLINK_COMMON = -nostdlib -Wl,-n,-q,--gc-sections -z common-page-size=0x40 + DEFINE GCC49_IA32_X64_ASLDLINK_FLAGS = DEF(GCC49_IA32_X64_DLINK_COMMON) -Wl,--defsym=PECOFF_HEADER_SIZE=0 DEF(GCC_DLINK2_FLAGS_COMMON) -Wl,--entry,ReferenceAcpiTable -u ReferenceAcpiTable +-DEFINE GCC49_IA32_X64_DLINK_FLAGS = DEF(GCC49_IA32_X64_DLINK_COMMON) -Wl,--entry,$(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT) -Wl,-Map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map,--whole-archive ++DEFINE GCC49_IA32_X64_DLINK_FLAGS = DEF(GCC49_IA32_X64_DLINK_COMMON) -Wl,--entry,$(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT) -Wl,-Map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map,--whole-archive -Wl,-z,notext + DEFINE GCC49_IA32_DLINK2_FLAGS = DEF(GCC48_IA32_DLINK2_FLAGS) + DEFINE GCC49_X64_DLINK_FLAGS = DEF(GCC49_IA32_X64_DLINK_FLAGS) -Wl,-melf_x86_64,--oformat=elf64-x86-64,-pie + DEFINE GCC49_X64_DLINK2_FLAGS = DEF(GCC48_X64_DLINK2_FLAGS) diff --git a/app-emulation/xen-tools/xen-tools-4.18.4_pre1.ebuild b/app-emulation/xen-tools/xen-tools-4.18.4_pre1.ebuild index 5928ffd9abaa..8292b81c6320 100644 --- a/app-emulation/xen-tools/xen-tools-4.18.4_pre1.ebuild +++ b/app-emulation/xen-tools/xen-tools-4.18.4_pre1.ebuild @@ -394,10 +394,26 @@ src_prepare() { -e 's/, "-Werror"//' \ {} + || die + if use ovmf ; then + # textrels cause failures w/ hardened binutils + pushd tools/firmware/ovmf-dir-remote > /dev/null || die + eapply "${FILESDIR}"/edk2-202202-binutils-2.41-textrels.patch + popd > /dev/null || die + fi + + # Use gnu17 because incompatible w/ C23 + sed -i -e "s:-DZZLEXBUFSIZE=65536:-DZZLEXBUFSIZE=65536 -std=gnu17:" \ + tools/firmware/ovmf-dir-remote/BaseTools/Source/C/VfrCompile/Pccts/*/makefile || die + default } src_configure() { + # Workaround from sys-firmware/edk2 (bug #913110) + export LDFLAGS="-z notext" + export EXTRA_LDFLAGS="-z notext" + export DLINK_FLAGS="-z notext" + local myconf=( --libdir="${EPREFIX}/usr/$(get_libdir)" --libexecdir="${EPREFIX}/usr/libexec" diff --git a/app-emulation/xen-tools/xen-tools-4.19.1.ebuild b/app-emulation/xen-tools/xen-tools-4.19.1.ebuild index bf00cacae073..06afb06cbb4d 100644 --- a/app-emulation/xen-tools/xen-tools-4.19.1.ebuild +++ b/app-emulation/xen-tools/xen-tools-4.19.1.ebuild @@ -394,6 +394,17 @@ src_prepare() { -e 's/, "-Werror"//' \ {} + || die + if use ovmf ; then + # textrels cause failures w/ hardened binutils + pushd tools/firmware/ovmf-dir-remote > /dev/null || die + eapply "${FILESDIR}"/edk2-202202-binutils-2.41-textrels.patch + popd > /dev/null || die + fi + + # Use gnu17 because incompatible w/ C23 + sed -i -e "s:-DZZLEXBUFSIZE=65536:-DZZLEXBUFSIZE=65536 -std=gnu17:" \ + tools/firmware/ovmf-dir-remote/BaseTools/Source/C/VfrCompile/Pccts/*/makefile || die + default }