From 2ccbf8da63d65ee79093406bde2a132490828bbe Mon Sep 17 00:00:00 2001 From: "Z. Liu" Date: Fri, 21 Mar 2025 03:47:56 +0000 Subject: [PATCH] sys-boot/syslinux: fix pkgcheck warning & force gcc '#include_next ' can be fixed by append '-I/usr/lib/clang/19/include', but gcc only option is used elsewhere, for example '--print-libgcc' is used in mk/{elf,embedded}.mk: > LIBGCC := $(shell $(CC) $(GCCOPT) --print-libgcc) Closes: https://bugs.gentoo.org/729426 Signed-off-by: Z. Liu Closes: https://github.com/gentoo/gentoo/pull/41256 Signed-off-by: Sam James --- sys-boot/syslinux/syslinux-6.04_pre1-r5.ebuild | 17 ++++++++++++++--- sys-boot/syslinux/syslinux-6.04_pre3-r1.ebuild | 16 +++++++++++++--- 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/sys-boot/syslinux/syslinux-6.04_pre1-r5.ebuild b/sys-boot/syslinux/syslinux-6.04_pre1-r5.ebuild index b13e8ee8582b..111b2e04c1b1 100644 --- a/sys-boot/syslinux/syslinux-6.04_pre1-r5.ebuild +++ b/sys-boot/syslinux/syslinux-6.04_pre1-r5.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -10,6 +10,8 @@ HOMEPAGE="https://www.syslinux.org/" MY_P=${P/_/-} SRC_URI="https://www.kernel.org/pub/linux/utils/boot/syslinux/Testing/6.04/${MY_P}.tar.xz" +S=${WORKDIR}/${MY_P} + LICENSE="GPL-2" SLOT="0" KEYWORDS="-* amd64 x86" @@ -20,6 +22,7 @@ REQUIRED_USE="|| ( bios uefi ) BDEPEND=" dev-lang/perl bios? ( dev-lang/nasm ) + sys-devel/gcc:* " RDEPEND=" sys-apps/util-linux @@ -31,8 +34,6 @@ DEPEND="${RDEPEND} virtual/os-headers " -S=${WORKDIR}/${MY_P} - QA_EXECSTACK="usr/share/syslinux/*" QA_WX_LOAD="usr/share/syslinux/*" QA_PRESTRIPPED="usr/share/syslinux/.*" @@ -49,7 +50,17 @@ src_prepare() { "${FILESDIR}/syslinux-6.04-binutils-2.41.patch" ) default + + # Force gcc because build failed with clang, #729426 + if ! tc-is-gcc ; then + ewarn "syslinux can be built with gcc only." + ewarn "Ignoring CC=$(tc-getCC) and forcing ${CHOST}-gcc" + export CC=${CHOST}-gcc + export CXX=${CHOST}-g++ + tc-is-gcc || die "tc-is-gcc failed in spite of CC=${CC}" + fi } + src_compile() { filter-lto #863722 diff --git a/sys-boot/syslinux/syslinux-6.04_pre3-r1.ebuild b/sys-boot/syslinux/syslinux-6.04_pre3-r1.ebuild index cc980c2f0157..0afea508fbc5 100644 --- a/sys-boot/syslinux/syslinux-6.04_pre3-r1.ebuild +++ b/sys-boot/syslinux/syslinux-6.04_pre3-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -10,6 +10,8 @@ HOMEPAGE="https://www.syslinux.org/" MY_P=${P/_/-} SRC_URI="https://git.zytor.com/syslinux/syslinux.git/snapshot/${MY_P}.tar.gz" +S=${WORKDIR}/${MY_P} + LICENSE="GPL-2" SLOT="0" #KEYWORDS="-* ~amd64 ~x86" @@ -22,6 +24,7 @@ RESTRICT="test" BDEPEND=" dev-lang/perl bios? ( dev-lang/nasm ) + sys-devel/gcc:* " RDEPEND=" sys-apps/util-linux @@ -34,8 +37,6 @@ DEPEND="${RDEPEND} virtual/os-headers " -S=${WORKDIR}/${MY_P} - QA_EXECSTACK="usr/share/syslinux/*" QA_WX_LOAD="usr/share/syslinux/*" QA_PRESTRIPPED="usr/share/syslinux/.*" @@ -51,6 +52,15 @@ src_prepare() { "${FILESDIR}/6.04_pre3" ) default + + # Force gcc because build failed with clang, #729426 + if ! tc-is-gcc ; then + ewarn "syslinux can be built with gcc only." + ewarn "Ignoring CC=$(tc-getCC) and forcing ${CHOST}-gcc" + export CC=${CHOST}-gcc + export CXX=${CHOST}-g++ + tc-is-gcc || die "tc-is-gcc failed in spite of CC=${CC}" + fi } efimake() {