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) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 62957158176 for ; Thu, 09 Oct 2025 07:41:21 +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 4E4A5340F5F for ; Thu, 09 Oct 2025 07:41:21 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 4AE9E1102C9; Thu, 09 Oct 2025 07:41:20 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 444E61102C9 for ; Thu, 09 Oct 2025 07:41:20 +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 F12AE340E96 for ; Thu, 09 Oct 2025 07:41:19 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 588102A94 for ; Thu, 09 Oct 2025 07:41:18 +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: <1759995635.2e3cc0b99dbeabd39abda0ee063760a6434ed060.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/ffcall/files/, dev-libs/ffcall/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-libs/ffcall/ffcall-2.4-r2.ebuild dev-libs/ffcall/files/ffcall-2.4-create-a-read-only-.eh_frame-section-on-all-p.patch X-VCS-Directories: dev-libs/ffcall/ dev-libs/ffcall/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 2e3cc0b99dbeabd39abda0ee063760a6434ed060 X-VCS-Branch: master Date: Thu, 09 Oct 2025 07:41:18 +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: 4864cc09-2bc0-4ed8-81d2-15a4e5c0275a X-Archives-Hash: 9eb83ecbe5551039e293ade1007e6a6e commit: 2e3cc0b99dbeabd39abda0ee063760a6434ed060 Author: Z. Liu gmail com> AuthorDate: Fri Jun 13 04:27:31 2025 +0000 Commit: Sam James gentoo org> CommitDate: Thu Oct 9 07:40:35 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2e3cc0b9 dev-libs/ffcall: fix compilation with clang patch from upstream Closes: https://bugs.gentoo.org/829663 Signed-off-by: Z. Liu gmail.com> Part-of: https://github.com/gentoo/gentoo/pull/42572 Signed-off-by: Sam James gentoo.org> dev-libs/ffcall/ffcall-2.4-r2.ebuild | 69 ++++++++++++++++++++++ ...te-a-read-only-.eh_frame-section-on-all-p.patch | 65 ++++++++++++++++++++ 2 files changed, 134 insertions(+) diff --git a/dev-libs/ffcall/ffcall-2.4-r2.ebuild b/dev-libs/ffcall/ffcall-2.4-r2.ebuild new file mode 100644 index 000000000000..66c961625fe8 --- /dev/null +++ b/dev-libs/ffcall/ffcall-2.4-r2.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic libtool + +MY_PV="libffcall-${PV}" + +DESCRIPTION="Build foreign function call interfaces in embedded interpreter" +HOMEPAGE="https://www.gnu.org/software/libffcall/" +SRC_URI="mirror://gnu/libffcall/${MY_PV}.tar.gz" +S="${WORKDIR}"/${MY_PV} + +# "Ffcall is under GNU GPL. As a special exception, if used in GNUstep +# or in derivate works of GNUstep, the included parts of ffcall are +# under GNU LGPL." -ffcall author +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos" + +PATCHES=( + # bug 842915, drop on next version bump + "${FILESDIR}"/${PN}-2.4-vacall-riscv-pic.patch + "${FILESDIR}"/${PN}-2.4-slibtool.patch # 776976 + "${FILESDIR}"/${PN}-2.4-create-a-read-only-.eh_frame-section-on-all-p.patch # 829663 +) + +src_prepare() { + # The build system is a strange mix of autogenerated + # files and manual tweaks on top. Uses $CFLAGS / $LDFLAGS randomly. + # We are adding them consistently here and a bit over the top: + # bugs: #334581 + local mfi + for mfi in {,*/,*/*/,}Makefile.in ; do + einfo "Patching '${mfi}'" + # usually uses only assembler here, but -march= + # and -Wa, are a must to pass here. + sed -e 's/$(CC) /&$(CFLAGS) /g' \ + -i "${mfi}" || die + done + + default + elibtoolize +} + +src_configure() { + append-flags -fPIC + + # Doc goes in datadir + econf \ + --datadir="${EPREFIX}"/usr/share/doc/${PF} \ + --enable-shared \ + --disable-static +} + +src_compile() { + # TODO. Remove -j1 + emake -j1 +} + +src_install() { + dodoc NEWS README + dodir /usr/share/man + + default + + find "${ED}" -name '*.la' -delete || die +} diff --git a/dev-libs/ffcall/files/ffcall-2.4-create-a-read-only-.eh_frame-section-on-all-p.patch b/dev-libs/ffcall/files/ffcall-2.4-create-a-read-only-.eh_frame-section-on-all-p.patch new file mode 100644 index 000000000000..1eb9fb2ee759 --- /dev/null +++ b/dev-libs/ffcall/files/ffcall-2.4-create-a-read-only-.eh_frame-section-on-all-p.patch @@ -0,0 +1,65 @@ +https://git.savannah.gnu.org/cgit/libffcall.git/commit/?id=580f0bb144c0d63560c61229291e172e55971437 + +From 580f0bb144c0d63560c61229291e172e55971437 Mon Sep 17 00:00:00 2001 +From: Bruno Haible +Date: Sat, 26 Jun 2021 18:19:21 +0200 +Subject: [PATCH] x86_64: Create a read-only .eh_frame section on all + platforms. + +Reported by Thomas Klausner at +. + +* common/asm-x86_64.h (EH_FRAME_SECTION): Use flags "a" (instead of +"aw") on all platforms. + +diff --git a/ChangeLog b/ChangeLog +index 1e87b99..d2bde2a 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,11 @@ ++2021-06-26 Bruno Haible ++ ++ x86_64: Create a read-only .eh_frame section on all platforms. ++ Reported by Thomas Klausner at ++ . ++ * common/asm-x86_64.h (EH_FRAME_SECTION): Use flags "a" (instead of ++ "aw") on all platforms. ++ + 2021-06-13 Bruno Haible + + maint: Don't require an internet connection for running autogen.sh. +diff --git a/common/asm-x86_64.h b/common/asm-x86_64.h +index b4713d7..edb1ea5 100644 +--- a/common/asm-x86_64.h ++++ b/common/asm-x86_64.h +@@ -279,11 +279,24 @@ + // Solaris/ELF + #define EH_FRAME_SECTION .eh_frame,"aL",link=.text,@unwind + #else +-#if defined __FreeBSD__ +-// FreeBSD/ELF ++// The eh_frame section was usually writable (flags "aw") in older OS versions, ++// but can be made read-only (flags "a") under specific conditions, depending ++// on the assembler's behaviour (look for EH_TABLES_CAN_BE_READ_ONLY in ++// gcc-11.1.0/gcc/defaults.h). ++// To determine whether the eh_frame section is writable or read-only by ++// default, compile a simple program: ++// gcc -S -fno-dwarf2-cfi-asm hello.c (GCC >= 4.4) ++// or ++// gcc -S hello.c (GCC < 4.4) ++// The result is that all modern systems (at least Ubuntu >= 16.04, ++// Red Hat Enterprise Linux >= 5, Fedora >= 13, Alpine Linux >= 3.7, ++// FreeBSD >= 11, DragonFly BSD >= 6, NetBSD >= 7, OpenBSD >= 6) ++// use a read-only eh_frame section. ++#if 1 ++// all modern systems + #define EH_FRAME_SECTION .eh_frame,"a",@progbits + #else +-// Linux/ELF ++// only very old systems + #define EH_FRAME_SECTION .eh_frame,"aw",@progbits + #endif + #endif +-- +2.45.2 +