* [gentoo-commits] repo/gentoo:master commit in: dev-libs/ffcall/, dev-libs/ffcall/files/
@ 2018-04-10 16:59 José María Alonso
0 siblings, 0 replies; 4+ messages in thread
From: José María Alonso @ 2018-04-10 16:59 UTC (permalink / raw
To: gentoo-commits
commit: 109aa132797d677cd7eb2172547dde7a115e8515
Author: Chema Alonso Josa <nimiux <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 10 16:58:37 2018 +0000
Commit: José María Alonso <nimiux <AT> gentoo <DOT> org>
CommitDate: Tue Apr 10 16:59:02 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=109aa132
dev-libs/ffcall: Drop old version 1.1¾
Package-Manager: Portage-2.3.24, Repoman-2.3.6
dev-libs/ffcall/Manifest | 1 -
dev-libs/ffcall/ffcall-1.13.ebuild | 61 ------------------------------
dev-libs/ffcall/files/ffcall-make-jN.patch | 13 -------
3 files changed, 75 deletions(-)
diff --git a/dev-libs/ffcall/Manifest b/dev-libs/ffcall/Manifest
index bc3bc2c5991..c3e40ea5dd3 100644
--- a/dev-libs/ffcall/Manifest
+++ b/dev-libs/ffcall/Manifest
@@ -1,3 +1,2 @@
-DIST libffcall-1.13.tar.gz 985185 BLAKE2B 78d9b9f046185a9a658ed2864167c64e373359e709cde7abc9360b21959c015b201423b46b8048120b98edfd0047dd20184c5f543c7d1d33a7ffad983036c043 SHA512 c059fa89eb3e85bad22d045de074bfc88fae42454821e10905ffd67209b6e6ea44eeab120b869696f77b816aacb9a5af3e4b51c640512e876df1b6da6f296bd4
DIST libffcall-2.0.tar.gz 938605 BLAKE2B 1e6fcae8f1dcaad52ca84d0dcf97f8dde5bb8153244bbb9047dbab5f6a1dade0a00f149507e6bb14225369a7081cadb069d23c8bc7cdcfaec937d7b9d47d08c1 SHA512 d75aa1df97b14692a9137745bae5b24c4d8f739cb1c7f854e7ed47e4a77a49759122abd6b0e445efa56381f47932c13cd21a154b2783649afb9c7a39e73fea04
DIST libffcall-2.1.tar.gz 943235 BLAKE2B ae82663174db084e830b6ff77ceedf8641b3edeb7800952ac4e2772d9033da3e45f46159e6fdae86615dc69fceba39f48d6c75e6cbd41be98f1986fa69d50b3b SHA512 da73375fb45b7d764c06437a517c2a90abf7d5de6afe0a8ca19e6dfafd2a8c7107e39d230ecbc8edfdd5926b16a0c13b7bb9319287047c47de1241b2f6ae805e
diff --git a/dev-libs/ffcall/ffcall-1.13.ebuild b/dev-libs/ffcall/ffcall-1.13.ebuild
deleted file mode 100644
index 127ea9cd215..00000000000
--- a/dev-libs/ffcall/ffcall-1.13.ebuild
+++ /dev/null
@@ -1,61 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit eutils flag-o-matic toolchain-funcs
-
-MY_PV="libffcall-${PV}"
-
-DESCRIPTION="foreign function call libraries"
-HOMEPAGE="https://www.gnu.org/software/libffcall/"
-SRC_URI="mirror://gnu/libffcall/${MY_PV}.tar.gz"
-
-# "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 ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x86-solaris"
-IUSE=""
-
-S=${WORKDIR}/${MY_PV}
-
-DEPEND=""
-RDEPEND=""
-
-src_prepare() {
- epatch "${FILESDIR}"/${PN}-make-jN.patch
-
- # 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
-
- for mfi in {,*/,*/*/,}Makefile.in
- do
- elog "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
- eapply_user
-}
-
-src_configure() {
- append-flags -fPIC
-
- # Doc goes in datadir
- econf \
- --datadir="${EPREFIX}"/usr/share/doc/${PF} \
- --enable-shared \
- --disable-static
-}
-
-src_install() {
- dodoc NEWS README
- dodir /usr/share/man
- default
- prune_libtool_files
-}
diff --git a/dev-libs/ffcall/files/ffcall-make-jN.patch b/dev-libs/ffcall/files/ffcall-make-jN.patch
deleted file mode 100644
index 98f4c497504..00000000000
--- a/dev-libs/ffcall/files/ffcall-make-jN.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- ffcall-1.10/callback/Makefile.in~ 2003-10-01 21:46:19.000000000 +0200
-+++ ffcall-1.10/callback/Makefile.in 2007-12-18 21:10:51.302118000 +0100
-@@ -51,6 +51,10 @@
- all-subdirs : force
- cd @subdir@; $(MAKE) all
-
-+vacall_r/libvacall.la: all-subdirs
-+
-+trampoline_r/libtrampoline.la: all-subdirs
-+
- callback.h :
- $(LN_S) $(srcdir)/callback.h.in callback.h
-
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/ffcall/, dev-libs/ffcall/files/
@ 2022-05-08 19:28 Jakov Smolić
0 siblings, 0 replies; 4+ messages in thread
From: Jakov Smolić @ 2022-05-08 19:28 UTC (permalink / raw
To: gentoo-commits
commit: 27474f966c5c419ea4fd3a7cb050071d0f9d84c6
Author: Raymond Wong <infiwang <AT> pm <DOT> me>
AuthorDate: Sun May 8 15:57:29 2022 +0000
Commit: Jakov Smolić <jsmolic <AT> gentoo <DOT> org>
CommitDate: Sun May 8 19:27:55 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=27474f96
dev-libs/ffcall-2.4: add vacall PIC support for Linux/riscv
Patch is already done upstream, drop on next version bump.
Closes: https://bugs.gentoo.org/842915
Signed-off-by: Raymond Wong <infiwang <AT> pm.me>
Closes: https://github.com/gentoo/gentoo/pull/25388
Signed-off-by: Jakov Smolić <jsmolic <AT> gentoo.org>
dev-libs/ffcall/ffcall-2.4.ebuild | 7 +-
.../ffcall/files/ffcall-2.4-vacall-riscv-pic.patch | 792 +++++++++++++++++++++
2 files changed, 798 insertions(+), 1 deletion(-)
diff --git a/dev-libs/ffcall/ffcall-2.4.ebuild b/dev-libs/ffcall/ffcall-2.4.ebuild
index 9e5e111bec68..8a30bf885b1d 100644
--- a/dev-libs/ffcall/ffcall-2.4.ebuild
+++ b/dev-libs/ffcall/ffcall-2.4.ebuild
@@ -19,6 +19,11 @@ LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="~alpha amd64 ~arm64 ~hppa ~ia64 ~mips ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
+PATCHES=(
+ # bug 842915, drop on next version bump
+ "${FILESDIR}"/${PN}-2.4-vacall-riscv-pic.patch
+)
+
src_prepare() {
# The build system is a strange mix of autogenerated
# files and manual tweaks on top. Uses $CFLAGS / $LDFLAGS randomly.
@@ -33,7 +38,7 @@ src_prepare() {
-i "${mfi}" || die
done
- eapply_user
+ default
}
src_configure() {
diff --git a/dev-libs/ffcall/files/ffcall-2.4-vacall-riscv-pic.patch b/dev-libs/ffcall/files/ffcall-2.4-vacall-riscv-pic.patch
new file mode 100644
index 000000000000..2bad9a403997
--- /dev/null
+++ b/dev-libs/ffcall/files/ffcall-2.4-vacall-riscv-pic.patch
@@ -0,0 +1,792 @@
+https://bugs.gentoo.org/842915
+Taken from https://alpha.gnu.org/gnu/libffcall/libffcall-2.4-20220508.tar.gz
+
+diff -ruN libffcall-2.4/vacall/Makefile.devel libffcall-2.4-20220508/vacall/Makefile.devel
+--- libffcall-2.4/vacall/Makefile.devel 2021-06-12 23:11:57.000000000 +0800
++++ libffcall-2.4-20220508/vacall/Makefile.devel 2022-05-08 23:28:37.266397740 +0800
+@@ -267,15 +267,21 @@
+ vacall-riscv32-ilp32d-linux.s : vacall-riscv32.c vacall-internal.h vacall.h $(THISFILE)
+ $(CROSS_TOOL) riscv32-linux gcc-7.3.0 $(GCCFLAGS) -D__riscv32__ -S vacall-riscv32.c -o vacall-riscv32-ilp32d-linux.s
+
+-vacall-riscv32-ilp32d-macro.S : vacall-riscv32-ilp32d-linux.s ../common/asm-riscv.sh ../common/noexecstack.h $(THISFILE)
+- (../common/asm-riscv.sh < vacall-riscv32-ilp32d-linux.s ; cat ../common/noexecstack.h) > vacall-riscv32-ilp32d-macro.S
++vacall-riscv32-ilp32d-linux-pic.s : vacall-riscv32.c vacall-internal.h vacall.h $(THISFILE)
++ $(CROSS_TOOL) riscv32-linux gcc-7.3.0 $(GCCFLAGS) -fPIC -D__riscv32__ -S vacall-riscv32.c -o vacall-riscv32-ilp32d-linux-pic.s
++
++vacall-riscv32-ilp32d-macro.S : vacall-riscv32-ilp32d-linux.s vacall-riscv32-ilp32d-linux-pic.s ../common/asm-riscv.sh ../common/noexecstack.h $(THISFILE)
++ (echo '#ifdef __PIC__' ; ../common/asm-riscv.sh < vacall-riscv32-ilp32d-linux-pic.s ; echo '#else' ; ../common/asm-riscv.sh < vacall-riscv32-ilp32d-linux.s ; echo '#endif' ; cat ../common/noexecstack.h) > vacall-riscv32-ilp32d-macro.S
+
+
+ vacall-riscv64-lp64d-linux.s : vacall-riscv64.c vacall-internal.h vacall.h $(THISFILE)
+ $(CROSS_TOOL) riscv64-linux gcc-7.3.0 $(GCCFLAGS) -D__riscv64__ -S vacall-riscv64.c -o vacall-riscv64-lp64d-linux.s
+
+-vacall-riscv64-lp64d-macro.S : vacall-riscv64-lp64d-linux.s ../common/asm-riscv.sh ../common/noexecstack.h $(THISFILE)
+- (../common/asm-riscv.sh < vacall-riscv64-lp64d-linux.s ; cat ../common/noexecstack.h) > vacall-riscv64-lp64d-macro.S
++vacall-riscv64-lp64d-linux-pic.s : vacall-riscv64.c vacall-internal.h vacall.h $(THISFILE)
++ $(CROSS_TOOL) riscv64-linux gcc-7.3.0 $(GCCFLAGS) -fPIC -D__riscv64__ -S vacall-riscv64.c -o vacall-riscv64-lp64d-linux-pic.s
++
++vacall-riscv64-lp64d-macro.S : vacall-riscv64-lp64d-linux.s vacall-riscv64-lp64d-linux-pic.s ../common/asm-riscv.sh ../common/noexecstack.h $(THISFILE)
++ (echo '#ifdef __PIC__' ; ../common/asm-riscv.sh < vacall-riscv64-lp64d-linux-pic.s ; echo '#else' ; ../common/asm-riscv.sh < vacall-riscv64-lp64d-linux.s ; echo '#endif' ; cat ../common/noexecstack.h) > vacall-riscv64-lp64d-macro.S
+
+
+ # --------------- Rules for debugging test failures ---------------
+diff -ruN libffcall-2.4/vacall/Makefile.in libffcall-2.4-20220508/vacall/Makefile.in
+--- libffcall-2.4/vacall/Makefile.in 2021-06-12 23:11:57.000000000 +0800
++++ libffcall-2.4-20220508/vacall/Makefile.in 2022-05-08 23:29:18.347087098 +0800
+@@ -354,8 +354,8 @@
+ vacall-powerpc-aix.s \
+ vacall-powerpc-linux.s vacall-powerpc-linux-macro.S vacall-powerpc-macos.s vacall-powerpc-sysv4-macro.S \
+ vacall-powerpc64.c vacall-powerpc64-aix.s vacall-powerpc64-linux.S vacall-powerpc64-elfv2-linux.S \
+- vacall-riscv32.c vacall-riscv32-ilp32d-linux.s vacall-riscv32-ilp32d-macro.S \
+- vacall-riscv64.c vacall-riscv64-lp64d-linux.s vacall-riscv64-lp64d-macro.S \
++ vacall-riscv32.c vacall-riscv32-ilp32d-linux.s vacall-riscv32-ilp32d-linux-pic.s vacall-riscv32-ilp32d-macro.S \
++ vacall-riscv64.c vacall-riscv64-lp64d-linux.s vacall-riscv64-lp64d-linux-pic.s vacall-riscv64-lp64d-macro.S \
+ vacall-s390.c vacall-s390-linux.s vacall-s390-macro.S \
+ vacall-s390x.c vacall-s390x-linux.s vacall-s390x-macro.S \
+ vacall-sparc.c vacall-sparc-linux.s vacall-sparc-linux-pic.s vacall-sparc-macro.S \
+diff -ruN libffcall-2.4/vacall/vacall-riscv32-ilp32d-linux-pic.s libffcall-2.4-20220508/vacall/vacall-riscv32-ilp32d-linux-pic.s
+--- libffcall-2.4/vacall/vacall-riscv32-ilp32d-linux-pic.s 1970-01-01 08:00:00.000000000 +0800
++++ libffcall-2.4-20220508/vacall/vacall-riscv32-ilp32d-linux-pic.s 2022-05-08 19:41:49.000000000 +0800
+@@ -0,0 +1,163 @@
++ .file "vacall-riscv32.c"
++ .option pic
++ .text
++ .align 1
++ .globl vacall_receiver
++ .type vacall_receiver, @function
++vacall_receiver:
++ add sp,sp,-208
++ sw ra,188(sp)
++ sw s0,184(sp)
++ add s0,sp,192
++ la t1,vacall_function
++ lw t1,0(t1)
++ sw a0,-148(s0)
++ add a0,s0,16
++ sw a7,12(s0)
++ sw a1,-144(s0)
++ sw a2,-140(s0)
++ sw a3,-136(s0)
++ sw a4,-132(s0)
++ sw a5,-128(s0)
++ sw a6,-124(s0)
++ sw a7,-120(s0)
++ fsw fa0,-112(s0)
++ fsw fa1,-108(s0)
++ fsw fa2,-104(s0)
++ fsw fa3,-100(s0)
++ fsw fa4,-96(s0)
++ fsw fa5,-92(s0)
++ fsw fa6,-88(s0)
++ fsw fa7,-84(s0)
++ fsd fa0,-80(s0)
++ fsd fa1,-72(s0)
++ fsd fa2,-64(s0)
++ fsd fa3,-56(s0)
++ fsd fa4,-48(s0)
++ fsd fa5,-40(s0)
++ fsd fa6,-32(s0)
++ fsd fa7,-24(s0)
++ sw a0,-168(s0)
++ sw zero,-184(s0)
++ sw zero,-164(s0)
++ sw zero,-160(s0)
++ add a0,s0,-184
++ sw zero,-152(s0)
++ sw zero,-116(s0)
++ jalr t1
++ lw t1,-160(s0)
++ beqz t1,.L1
++ li t3,1
++ beq t1,t3,.L22
++ li t3,2
++ beq t1,t3,.L25
++ li t3,3
++ beq t1,t3,.L22
++ li t3,4
++ beq t1,t3,.L26
++ li t3,5
++ beq t1,t3,.L27
++ li t3,6
++ beq t1,t3,.L23
++ li t3,7
++ beq t1,t3,.L23
++ li t3,8
++ beq t1,t3,.L23
++ li t3,9
++ beq t1,t3,.L23
++ add t3,t1,-10
++ li t4,1
++ bleu t3,t4,.L28
++ li t3,12
++ beq t1,t3,.L29
++ li t3,13
++ beq t1,t3,.L30
++ li t3,14
++ beq t1,t3,.L23
++ li t3,15
++ bne t1,t3,.L1
++ lw t1,-184(s0)
++ and t1,t1,2
++ beqz t1,.L1
++ lw t3,-156(s0)
++ li t1,7
++ add t5,t3,-1
++ bgtu t5,t1,.L1
++ lw t1,-164(s0)
++ lbu t5,0(t1)
++ mv a0,t5
++ beq t3,t4,.L1
++ lbu t4,1(t1)
++ li t6,2
++ sll t4,t4,8
++ or t5,t4,t5
++ mv a0,t5
++ beq t3,t6,.L1
++ lbu t4,2(t1)
++ li t6,3
++ sll t4,t4,16
++ or t4,t4,t5
++ mv a0,t4
++ beq t3,t6,.L1
++ lbu a0,3(t1)
++ li t5,4
++ sll a0,a0,24
++ or a0,a0,t4
++ beq t3,t5,.L1
++ lbu t5,4(t1)
++ li t4,5
++ mv a1,t5
++ beq t3,t4,.L1
++ lbu t4,5(t1)
++ li t6,6
++ sll t4,t4,8
++ or t5,t4,t5
++ mv a1,t5
++ beq t3,t6,.L1
++ lbu t4,6(t1)
++ li t6,8
++ sll t4,t4,16
++ or t4,t4,t5
++ mv a1,t4
++ bne t3,t6,.L1
++ lbu a1,7(t1)
++ sll a1,a1,24
++ or a1,a1,t4
++.L1:
++ lw ra,188(sp)
++ lw s0,184(sp)
++ add sp,sp,208
++ jr ra
++.L22:
++ lbu a0,-176(s0)
++ lw ra,188(sp)
++ lw s0,184(sp)
++ add sp,sp,208
++ jr ra
++.L23:
++ lw a0,-176(s0)
++ j .L1
++.L25:
++ lb a0,-176(s0)
++ lw ra,188(sp)
++ lw s0,184(sp)
++ add sp,sp,208
++ jr ra
++.L26:
++ lh a0,-176(s0)
++ j .L1
++.L27:
++ lhu a0,-176(s0)
++ j .L1
++.L28:
++ lw a0,-176(s0)
++ lw a1,-172(s0)
++ j .L1
++.L29:
++ flw fa0,-176(s0)
++ j .L1
++.L30:
++ fld fa0,-176(s0)
++ j .L1
++ .size vacall_receiver, .-vacall_receiver
++ .ident "GCC: (GNU) 7.3.0"
+diff -ruN libffcall-2.4/vacall/vacall-riscv32-ilp32d-macro.S libffcall-2.4-20220508/vacall/vacall-riscv32-ilp32d-macro.S
+--- libffcall-2.4/vacall/vacall-riscv32-ilp32d-macro.S 2021-06-13 02:30:16.000000000 +0800
++++ libffcall-2.4-20220508/vacall/vacall-riscv32-ilp32d-macro.S 2022-05-08 19:41:49.000000000 +0800
+@@ -1,3 +1,167 @@
++#ifdef __PIC__
++ .file "vacall-riscv32.c"
++ .option pic
++ .text
++ .align 1
++ .globl vacall_receiver
++ .type vacall_receiver, @function
++vacall_receiver:
++ add sp,sp,-208
++ sw ra,188(sp)
++ sw s0,184(sp)
++ add s0,sp,192
++ la t1,vacall_function
++ lw t1,0(t1)
++ sw a0,-148(s0)
++ add a0,s0,16
++ sw a7,12(s0)
++ sw a1,-144(s0)
++ sw a2,-140(s0)
++ sw a3,-136(s0)
++ sw a4,-132(s0)
++ sw a5,-128(s0)
++ sw a6,-124(s0)
++ sw a7,-120(s0)
++ fsw fa0,-112(s0)
++ fsw fa1,-108(s0)
++ fsw fa2,-104(s0)
++ fsw fa3,-100(s0)
++ fsw fa4,-96(s0)
++ fsw fa5,-92(s0)
++ fsw fa6,-88(s0)
++ fsw fa7,-84(s0)
++ fsd fa0,-80(s0)
++ fsd fa1,-72(s0)
++ fsd fa2,-64(s0)
++ fsd fa3,-56(s0)
++ fsd fa4,-48(s0)
++ fsd fa5,-40(s0)
++ fsd fa6,-32(s0)
++ fsd fa7,-24(s0)
++ sw a0,-168(s0)
++ sw zero,-184(s0)
++ sw zero,-164(s0)
++ sw zero,-160(s0)
++ add a0,s0,-184
++ sw zero,-152(s0)
++ sw zero,-116(s0)
++ jalr t1
++ lw t1,-160(s0)
++ beqz t1,.L1
++ li t3,1
++ beq t1,t3,.L22
++ li t3,2
++ beq t1,t3,.L25
++ li t3,3
++ beq t1,t3,.L22
++ li t3,4
++ beq t1,t3,.L26
++ li t3,5
++ beq t1,t3,.L27
++ li t3,6
++ beq t1,t3,.L23
++ li t3,7
++ beq t1,t3,.L23
++ li t3,8
++ beq t1,t3,.L23
++ li t3,9
++ beq t1,t3,.L23
++ add t3,t1,-10
++ li t4,1
++ bleu t3,t4,.L28
++ li t3,12
++ beq t1,t3,.L29
++ li t3,13
++ beq t1,t3,.L30
++ li t3,14
++ beq t1,t3,.L23
++ li t3,15
++ bne t1,t3,.L1
++ lw t1,-184(s0)
++ and t1,t1,2
++ beqz t1,.L1
++ lw t3,-156(s0)
++ li t1,7
++ add t5,t3,-1
++ bgtu t5,t1,.L1
++ lw t1,-164(s0)
++ lbu t5,0(t1)
++ mv a0,t5
++ beq t3,t4,.L1
++ lbu t4,1(t1)
++ li t6,2
++ sll t4,t4,8
++ or t5,t4,t5
++ mv a0,t5
++ beq t3,t6,.L1
++ lbu t4,2(t1)
++ li t6,3
++ sll t4,t4,16
++ or t4,t4,t5
++ mv a0,t4
++ beq t3,t6,.L1
++ lbu a0,3(t1)
++ li t5,4
++ sll a0,a0,24
++ or a0,a0,t4
++ beq t3,t5,.L1
++ lbu t5,4(t1)
++ li t4,5
++ mv a1,t5
++ beq t3,t4,.L1
++ lbu t4,5(t1)
++ li t6,6
++ sll t4,t4,8
++ or t5,t4,t5
++ mv a1,t5
++ beq t3,t6,.L1
++ lbu t4,6(t1)
++ li t6,8
++ sll t4,t4,16
++ or t4,t4,t5
++ mv a1,t4
++ bne t3,t6,.L1
++ lbu a1,7(t1)
++ sll a1,a1,24
++ or a1,a1,t4
++.L1:
++ lw ra,188(sp)
++ lw s0,184(sp)
++ add sp,sp,208
++ jr ra
++.L22:
++ lbu a0,-176(s0)
++ lw ra,188(sp)
++ lw s0,184(sp)
++ add sp,sp,208
++ jr ra
++.L23:
++ lw a0,-176(s0)
++ j .L1
++.L25:
++ lb a0,-176(s0)
++ lw ra,188(sp)
++ lw s0,184(sp)
++ add sp,sp,208
++ jr ra
++.L26:
++ lh a0,-176(s0)
++ j .L1
++.L27:
++ lhu a0,-176(s0)
++ j .L1
++.L28:
++ lw a0,-176(s0)
++ lw a1,-172(s0)
++ j .L1
++.L29:
++ flw fa0,-176(s0)
++ j .L1
++.L30:
++ fld fa0,-176(s0)
++ j .L1
++ .size vacall_receiver, .-vacall_receiver
++#else
+ .file "vacall-riscv32.c"
+ .option nopic
+ .text
+@@ -160,6 +324,7 @@
+ fld fa0,-176(s0)
+ j .L1
+ .size vacall_receiver, .-vacall_receiver
++#endif
+ #if defined __linux__ || defined __FreeBSD__ || defined __FreeBSD_kernel__ || defined __DragonFly__
+ .section .note.GNU-stack,"",@progbits
+ #endif
+diff -ruN libffcall-2.4/vacall/vacall-riscv64-lp64d-linux-pic.s libffcall-2.4-20220508/vacall/vacall-riscv64-lp64d-linux-pic.s
+--- libffcall-2.4/vacall/vacall-riscv64-lp64d-linux-pic.s 1970-01-01 08:00:00.000000000 +0800
++++ libffcall-2.4-20220508/vacall/vacall-riscv64-lp64d-linux-pic.s 2022-05-08 19:41:49.000000000 +0800
+@@ -0,0 +1,190 @@
++ .file "vacall-riscv64.c"
++ .option pic
++ .text
++ .align 1
++ .globl vacall_receiver
++ .type vacall_receiver, @function
++vacall_receiver:
++ add sp,sp,-288
++ sd ra,264(sp)
++ sd s0,256(sp)
++ sd s1,248(sp)
++ add s0,sp,272
++ la t1,vacall_function
++ ld t1,0(t1)
++ sd a0,-200(s0)
++ add a0,s0,16
++ sd a7,8(s0)
++ sd a1,-192(s0)
++ sd a2,-184(s0)
++ sd a3,-176(s0)
++ sd a4,-168(s0)
++ sd a5,-160(s0)
++ sd a6,-152(s0)
++ sd a7,-144(s0)
++ fsw fa0,-132(s0)
++ fsw fa1,-128(s0)
++ fsw fa2,-124(s0)
++ fsw fa3,-120(s0)
++ fsw fa4,-116(s0)
++ fsw fa5,-112(s0)
++ fsw fa6,-108(s0)
++ fsw fa7,-104(s0)
++ fsd fa0,-96(s0)
++ fsd fa1,-88(s0)
++ fsd fa2,-80(s0)
++ fsd fa3,-72(s0)
++ fsd fa4,-64(s0)
++ fsd fa5,-56(s0)
++ fsd fa6,-48(s0)
++ fsd fa7,-40(s0)
++ sd a0,-240(s0)
++ sw zero,-264(s0)
++ sd zero,-232(s0)
++ add a0,s0,-264
++ sw zero,-224(s0)
++ sw zero,-208(s0)
++ sw zero,-136(s0)
++ jalr t1
++ lw t1,-224(s0)
++ beqz t1,.L1
++ li t3,1
++ beq t1,t3,.L25
++ li t3,2
++ beq t1,t3,.L29
++ li t3,3
++ beq t1,t3,.L25
++ li t3,4
++ beq t1,t3,.L30
++ li t3,5
++ beq t1,t3,.L31
++ li t3,6
++ beq t1,t3,.L32
++ li t3,7
++ beq t1,t3,.L33
++ and t3,t1,-3
++ li t4,8
++ beq t3,t4,.L27
++ li t4,9
++ beq t3,t4,.L27
++ li t3,12
++ beq t1,t3,.L34
++ li t3,13
++ beq t1,t3,.L35
++ li t3,14
++ beq t1,t3,.L27
++ li t3,15
++ bne t1,t3,.L1
++ lw t3,-264(s0)
++ and t3,t3,1024
++ beqz t3,.L1
++ ld t0,-216(s0)
++ add t3,t0,-1
++ bgtu t3,t1,.L1
++ ld t5,-232(s0)
++ li s1,8
++ and t6,t5,7
++ add t2,t0,t6
++ and t5,t5,-8
++ sext.w t6,t6
++ sllw t1,t2,3
++ ld t4,0(t5)
++ sll t3,t6,3
++ bgtu t0,s1,.L15
++ bgtu t2,s1,.L16
++ addw t1,t1,-1
++ li a0,2
++ sll a0,a0,t1
++ add a0,a0,-1
++ and a0,a0,t4
++ sra a0,a0,t3
++.L1:
++ ld ra,264(sp)
++ ld s0,256(sp)
++ ld s1,248(sp)
++ add sp,sp,288
++ jr ra
++.L25:
++ lbu a0,-256(s0)
++ ld ra,264(sp)
++ ld s0,256(sp)
++ ld s1,248(sp)
++ add sp,sp,288
++ jr ra
++.L29:
++ lb a0,-256(s0)
++ ld ra,264(sp)
++ ld s0,256(sp)
++ ld s1,248(sp)
++ add sp,sp,288
++ jr ra
++.L30:
++ lh a0,-256(s0)
++ j .L1
++.L33:
++ lwu a0,-256(s0)
++ j .L1
++.L31:
++ lhu a0,-256(s0)
++ j .L1
++.L27:
++ ld a0,-256(s0)
++ j .L1
++.L32:
++ lw a0,-256(s0)
++ j .L1
++.L34:
++ flw fa0,-256(s0)
++ j .L1
++.L35:
++ fld fa0,-256(s0)
++ j .L1
++.L15:
++ li s1,16
++ sra t4,t4,t3
++ ld t0,8(t5)
++ bleu t2,s1,.L36
++ li a1,-8
++ mulw t6,a1,t6
++ addw t1,t1,-129
++ ld a0,16(t5)
++ li a1,2
++ sll a1,a1,t1
++ add a1,a1,-1
++ and a1,a1,a0
++ sra t3,t0,t3
++ addw t1,t6,64
++ sll a0,t0,t1
++ sll a1,a1,t1
++ or a0,a0,t4
++ or a1,a1,t3
++ j .L1
++.L16:
++ li a0,-8
++ mulw t6,a0,t6
++ addw t1,t1,-65
++ ld t5,8(t5)
++ li a0,2
++ sll a0,a0,t1
++ add a0,a0,-1
++ and a0,a0,t5
++ sra t4,t4,t3
++ sll a0,a0,t6
++ or a0,a0,t4
++ j .L1
++.L36:
++ li a1,-4
++ mulw t6,a1,t6
++ addw t1,t1,-65
++ li a0,2
++ sll a0,a0,t1
++ add a0,a0,-1
++ and a0,a0,t0
++ sra a1,a0,t3
++ addw t1,t6,32
++ sll a0,a0,t1
++ sll a0,a0,t1
++ or a0,a0,t4
++ j .L1
++ .size vacall_receiver, .-vacall_receiver
++ .ident "GCC: (GNU) 7.3.0"
+diff -ruN libffcall-2.4/vacall/vacall-riscv64-lp64d-macro.S libffcall-2.4-20220508/vacall/vacall-riscv64-lp64d-macro.S
+--- libffcall-2.4/vacall/vacall-riscv64-lp64d-macro.S 2021-06-13 02:30:16.000000000 +0800
++++ libffcall-2.4-20220508/vacall/vacall-riscv64-lp64d-macro.S 2022-05-08 19:41:49.000000000 +0800
+@@ -1,3 +1,194 @@
++#ifdef __PIC__
++ .file "vacall-riscv64.c"
++ .option pic
++ .text
++ .align 1
++ .globl vacall_receiver
++ .type vacall_receiver, @function
++vacall_receiver:
++ add sp,sp,-288
++ sd ra,264(sp)
++ sd s0,256(sp)
++ sd s1,248(sp)
++ add s0,sp,272
++ la t1,vacall_function
++ ld t1,0(t1)
++ sd a0,-200(s0)
++ add a0,s0,16
++ sd a7,8(s0)
++ sd a1,-192(s0)
++ sd a2,-184(s0)
++ sd a3,-176(s0)
++ sd a4,-168(s0)
++ sd a5,-160(s0)
++ sd a6,-152(s0)
++ sd a7,-144(s0)
++ fsw fa0,-132(s0)
++ fsw fa1,-128(s0)
++ fsw fa2,-124(s0)
++ fsw fa3,-120(s0)
++ fsw fa4,-116(s0)
++ fsw fa5,-112(s0)
++ fsw fa6,-108(s0)
++ fsw fa7,-104(s0)
++ fsd fa0,-96(s0)
++ fsd fa1,-88(s0)
++ fsd fa2,-80(s0)
++ fsd fa3,-72(s0)
++ fsd fa4,-64(s0)
++ fsd fa5,-56(s0)
++ fsd fa6,-48(s0)
++ fsd fa7,-40(s0)
++ sd a0,-240(s0)
++ sw zero,-264(s0)
++ sd zero,-232(s0)
++ add a0,s0,-264
++ sw zero,-224(s0)
++ sw zero,-208(s0)
++ sw zero,-136(s0)
++ jalr t1
++ lw t1,-224(s0)
++ beqz t1,.L1
++ li t3,1
++ beq t1,t3,.L25
++ li t3,2
++ beq t1,t3,.L29
++ li t3,3
++ beq t1,t3,.L25
++ li t3,4
++ beq t1,t3,.L30
++ li t3,5
++ beq t1,t3,.L31
++ li t3,6
++ beq t1,t3,.L32
++ li t3,7
++ beq t1,t3,.L33
++ and t3,t1,-3
++ li t4,8
++ beq t3,t4,.L27
++ li t4,9
++ beq t3,t4,.L27
++ li t3,12
++ beq t1,t3,.L34
++ li t3,13
++ beq t1,t3,.L35
++ li t3,14
++ beq t1,t3,.L27
++ li t3,15
++ bne t1,t3,.L1
++ lw t3,-264(s0)
++ and t3,t3,1024
++ beqz t3,.L1
++ ld t0,-216(s0)
++ add t3,t0,-1
++ bgtu t3,t1,.L1
++ ld t5,-232(s0)
++ li s1,8
++ and t6,t5,7
++ add t2,t0,t6
++ and t5,t5,-8
++ sext.w t6,t6
++ sllw t1,t2,3
++ ld t4,0(t5)
++ sll t3,t6,3
++ bgtu t0,s1,.L15
++ bgtu t2,s1,.L16
++ addw t1,t1,-1
++ li a0,2
++ sll a0,a0,t1
++ add a0,a0,-1
++ and a0,a0,t4
++ sra a0,a0,t3
++.L1:
++ ld ra,264(sp)
++ ld s0,256(sp)
++ ld s1,248(sp)
++ add sp,sp,288
++ jr ra
++.L25:
++ lbu a0,-256(s0)
++ ld ra,264(sp)
++ ld s0,256(sp)
++ ld s1,248(sp)
++ add sp,sp,288
++ jr ra
++.L29:
++ lb a0,-256(s0)
++ ld ra,264(sp)
++ ld s0,256(sp)
++ ld s1,248(sp)
++ add sp,sp,288
++ jr ra
++.L30:
++ lh a0,-256(s0)
++ j .L1
++.L33:
++ lwu a0,-256(s0)
++ j .L1
++.L31:
++ lhu a0,-256(s0)
++ j .L1
++.L27:
++ ld a0,-256(s0)
++ j .L1
++.L32:
++ lw a0,-256(s0)
++ j .L1
++.L34:
++ flw fa0,-256(s0)
++ j .L1
++.L35:
++ fld fa0,-256(s0)
++ j .L1
++.L15:
++ li s1,16
++ sra t4,t4,t3
++ ld t0,8(t5)
++ bleu t2,s1,.L36
++ li a1,-8
++ mulw t6,a1,t6
++ addw t1,t1,-129
++ ld a0,16(t5)
++ li a1,2
++ sll a1,a1,t1
++ add a1,a1,-1
++ and a1,a1,a0
++ sra t3,t0,t3
++ addw t1,t6,64
++ sll a0,t0,t1
++ sll a1,a1,t1
++ or a0,a0,t4
++ or a1,a1,t3
++ j .L1
++.L16:
++ li a0,-8
++ mulw t6,a0,t6
++ addw t1,t1,-65
++ ld t5,8(t5)
++ li a0,2
++ sll a0,a0,t1
++ add a0,a0,-1
++ and a0,a0,t5
++ sra t4,t4,t3
++ sll a0,a0,t6
++ or a0,a0,t4
++ j .L1
++.L36:
++ li a1,-4
++ mulw t6,a1,t6
++ addw t1,t1,-65
++ li a0,2
++ sll a0,a0,t1
++ add a0,a0,-1
++ and a0,a0,t0
++ sra a1,a0,t3
++ addw t1,t6,32
++ sll a0,a0,t1
++ sll a0,a0,t1
++ or a0,a0,t4
++ j .L1
++ .size vacall_receiver, .-vacall_receiver
++#else
+ .file "vacall-riscv64.c"
+ .option nopic
+ .text
+@@ -187,6 +378,7 @@
+ or a0,a0,t4
+ j .L1
+ .size vacall_receiver, .-vacall_receiver
++#endif
+ #if defined __linux__ || defined __FreeBSD__ || defined __FreeBSD_kernel__ || defined __DragonFly__
+ .section .note.GNU-stack,"",@progbits
+ #endif
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/ffcall/, dev-libs/ffcall/files/
@ 2022-07-15 1:26 Sam James
0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2022-07-15 1:26 UTC (permalink / raw
To: gentoo-commits
commit: b06fbe382208ce06556038081c9990e2375b123f
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Thu Jul 14 00:57:43 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jul 15 01:19:26 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b06fbe38
dev-libs/ffcall: Fix the build with slibtool
Bug: https://bugs.gentoo.org/776976
Upstream-ML: https://lists.gnu.org/archive/html/libffcall/2022-07/msg00000.html
Signed-off-by: orbea <orbea <AT> riseup.net>
Closes: https://github.com/gentoo/gentoo/pull/26394
Signed-off-by: Sam James <sam <AT> gentoo.org>
dev-libs/ffcall/ffcall-2.4-r1.ebuild | 67 +++++++++++++++++++
dev-libs/ffcall/files/ffcall-2.4-slibtool.patch | 86 +++++++++++++++++++++++++
2 files changed, 153 insertions(+)
diff --git a/dev-libs/ffcall/ffcall-2.4-r1.ebuild b/dev-libs/ffcall/ffcall-2.4-r1.ebuild
new file mode 100644
index 000000000000..370cad023a20
--- /dev/null
+++ b/dev-libs/ffcall/ffcall-2.4-r1.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic
+
+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 ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
+
+PATCHES=(
+ # bug 842915, drop on next version bump
+ "${FILESDIR}"/${PN}-2.4-vacall-riscv-pic.patch
+ "${FILESDIR}"/${PN}-2.4-slibtool.patch # 776976
+)
+
+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
+}
+
+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-slibtool.patch b/dev-libs/ffcall/files/ffcall-2.4-slibtool.patch
new file mode 100644
index 000000000000..73c896c4f211
--- /dev/null
+++ b/dev-libs/ffcall/files/ffcall-2.4-slibtool.patch
@@ -0,0 +1,86 @@
+Bug: https://bugs.gentoo.org/776976
+Upstream-ML: https://lists.gnu.org/archive/html/libffcall/2022-07/msg00000.html
+
+From: orbea <orbea@riseup.net>
+Date: Wed, 13 Jul 2022 17:45:05 -0700
+Subject: [PATCH] build: Fix the build with slibtool
+
+Using symlinks to create dummy .lo files does not work with slibtool
+which tries to find the corresponding .o file which doesn't exist.
+
+Its better to use the real .lo file instead.
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -2,6 +2,8 @@
+
+ #### Start of system configuration section. ####
+
++CPU = @HOST_CPU_C_ABI@
++
+ # Directories used by "make":
+ srcdir = @srcdir@
+
+@@ -69,8 +71,8 @@ ffcall-version.h : $(srcdir)/ffcall-version.in.h
+ ffcall-version.lo : $(srcdir)/ffcall-version.c ffcall-version.h config.h
+ $(LIBTOOL_COMPILE) $(CC) $(CFLAGS) $(CFLAGS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) -c $(srcdir)/ffcall-version.c
+
+-libffcall.la : ffcall-version.lo avcall/avcall.lo avcall/avcall-libapi.lo avcall/avcall-structcpy.lo callback/vacall_r/libvacall.la callback/trampoline_r/libtrampoline.la callback/callback-libapi.lo
+- $(LIBTOOL_LINK) $(CC) $(CFLAGS) $(CFLAGS) -o libffcall.la -rpath $(libdir) -no-undefined -export-symbols-regex $(LIBFFCALL_EXPORTED_SYMBOLS_REGEX) -version-info $(LIBFFCALL_VERSION_INFO) ffcall-version.lo avcall/avcall.lo avcall/avcall-libapi.lo avcall/avcall-structcpy.lo callback/vacall_r/vacall.lo callback/vacall_r/vacall-libapi.lo callback/vacall_r/vacall-structcpy.lo callback/trampoline_r/*.lo callback/callback-libapi.lo gnulib-lib/libgnu.la $(LDFLAGS) $(LTLIBTHREAD)
++libffcall.la : ffcall-version.lo avcall/avcall-$(CPU).lo avcall/avcall-libapi.lo avcall/avcall-structcpy.lo callback/vacall_r/libvacall.la callback/trampoline_r/libtrampoline.la callback/callback-libapi.lo
++ $(LIBTOOL_LINK) $(CC) $(CFLAGS) $(CFLAGS) -o libffcall.la -rpath $(libdir) -no-undefined -export-symbols-regex $(LIBFFCALL_EXPORTED_SYMBOLS_REGEX) -version-info $(LIBFFCALL_VERSION_INFO) ffcall-version.lo avcall/avcall-$(CPU).lo avcall/avcall-libapi.lo avcall/avcall-structcpy.lo callback/vacall_r/vacall-$(CPU).lo callback/vacall_r/vacall-libapi.lo callback/vacall_r/vacall-structcpy.lo callback/trampoline_r/*.lo callback/callback-libapi.lo gnulib-lib/libgnu.la $(LDFLAGS) $(LTLIBTHREAD)
+
+ install : force
+ mkdir -p $(DESTDIR)$(prefix)
+--- a/avcall/Makefile.in
++++ b/avcall/Makefile.in
+@@ -58,7 +58,7 @@ SHELL = /bin/sh
+ # Needed by $(LIBTOOL).
+ top_builddir = ..
+
+-OBJECTS = avcall.lo avcall-libapi.lo avcall-structcpy.lo avcall-compat.lo
++OBJECTS = avcall-$(CPU).lo avcall-libapi.lo avcall-structcpy.lo avcall-compat.lo
+
+ # Limit the set of exported symbols, on those platforms where libtool supports it.
+ # Currently this does not exclude any symbol; maybe sometime in the future...
+@@ -70,11 +70,6 @@ LIBAVCALL_VERSION_INFO = 2:0:1
+
+ all : $(OBJECTS) libavcall.la $(srcdir)/avcall.3 $(srcdir)/avcall.html
+
+-avcall.lo : avcall-$(CPU).lo
+- $(RM) avcall.lo avcall.@OBJEXT@
+- $(LN) avcall-$(CPU).lo avcall.lo
+- if test -f avcall-$(CPU).@OBJEXT@; then $(LN) avcall-$(CPU).@OBJEXT@ avcall.@OBJEXT@; fi
+-
+ @IFNOT_MSVC@avcall-i386.lo : avcall-i386.s
+ @IFNOT_MSVC@ $(LIBTOOL_COMPILE) $(CC) $(CFLAGS) @GCC_X_NONE@ -c avcall-i386.s
+
+--- a/callback/Makefile.in
++++ b/callback/Makefile.in
+@@ -77,7 +77,7 @@ callback-compat.lo : $(srcdir)/callback-compat.c ../config.h
+ $(LIBTOOL_COMPILE) $(CC) $(CFLAGS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) -c $(srcdir)/callback-compat.c
+
+ libcallback.la : vacall_r/libvacall.la trampoline_r/libtrampoline.la callback-libapi.lo callback-compat.lo
+- $(LIBTOOL_LINK) $(CC) $(CFLAGS) -o libcallback.la -rpath $(libdir) -no-undefined -export-symbols-regex $(LIBCALLBACK_EXPORTED_SYMBOLS_REGEX) -version-info $(LIBCALLBACK_VERSION_INFO) vacall_r/vacall.lo vacall_r/vacall-libapi.lo vacall_r/vacall-structcpy.lo trampoline_r/*.lo callback-libapi.lo callback-compat.lo ../gnulib-lib/libgnu.la $(LDFLAGS) $(LTLIBTHREAD)
++ $(LIBTOOL_LINK) $(CC) $(CFLAGS) -o libcallback.la -rpath $(libdir) -no-undefined -export-symbols-regex $(LIBCALLBACK_EXPORTED_SYMBOLS_REGEX) -version-info $(LIBCALLBACK_VERSION_INFO) vacall_r/vacall-$(CPU).lo vacall_r/vacall-libapi.lo vacall_r/vacall-structcpy.lo trampoline_r/*.lo callback-libapi.lo callback-compat.lo ../gnulib-lib/libgnu.la $(LDFLAGS) $(LTLIBTHREAD)
+
+ # Installs the library and include files only. Typically called with only
+ # $(libdir) and $(includedir) - don't use $(prefix) and $(exec_prefix) here.
+--- a/callback/vacall_r/Makefile.in
++++ b/callback/vacall_r/Makefile.in
+@@ -54,15 +54,10 @@ SHELL = /bin/sh
+ # Needed by $(LIBTOOL).
+ top_builddir = ../..
+
+-OBJECTS = vacall.lo vacall-libapi.lo vacall-structcpy.lo
++OBJECTS = vacall-$(CPU).lo vacall-libapi.lo vacall-structcpy.lo
+
+ all : $(OBJECTS) libvacall.la
+
+-vacall.lo : vacall-$(CPU).lo
+- $(RM) vacall.lo vacall.@OBJEXT@
+- $(LN) vacall-$(CPU).lo vacall.lo
+- if test -f vacall-$(CPU).@OBJEXT@; then $(LN) vacall-$(CPU).@OBJEXT@ vacall.@OBJEXT@; fi
+-
+ @IFNOT_MSVC@vacall-i386.lo : vacall-i386.s
+ @IFNOT_MSVC@ $(LIBTOOL_COMPILE) $(CC) $(CFLAGS) @GCC_X_NONE@ -c vacall-i386.s
+
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/ffcall/, dev-libs/ffcall/files/
@ 2025-04-10 10:38 Sam James
0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2025-04-10 10:38 UTC (permalink / raw
To: gentoo-commits
commit: 5b89df93ef88388f452bf3d2caf6337c5314395d
Author: Z. Liu <zhixu.liu <AT> gmail <DOT> com>
AuthorDate: Sun Apr 6 14:01:39 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Apr 10 10:38:05 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5b89df93
dev-libs/ffcall: fix build w/ clang
1. apply patch from upstream
2. ignore PROT_MPROTECT for linux, which is NetBSD only
Closes: https://bugs.gentoo.org/829663
Closes: https://bugs.gentoo.org/943754
Signed-off-by: Z. Liu <zhixu.liu <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/41474
Signed-off-by: Sam James <sam <AT> gentoo.org>
dev-libs/ffcall/ffcall-2.5.ebuild | 12 ++++-
.../files/ffcall-2.5-add-support-for-clang.patch | 53 ++++++++++++++++++++++
2 files changed, 64 insertions(+), 1 deletion(-)
diff --git a/dev-libs/ffcall/ffcall-2.5.ebuild b/dev-libs/ffcall/ffcall-2.5.ebuild
index 7f9d8f6bfae9..2ab0965e1c5c 100644
--- a/dev-libs/ffcall/ffcall-2.5.ebuild
+++ b/dev-libs/ffcall/ffcall-2.5.ebuild
@@ -3,7 +3,7 @@
EAPI=8
-inherit flag-o-matic libtool
+inherit autotools flag-o-matic libtool
MY_PV="libffcall-${PV}"
@@ -19,6 +19,10 @@ LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+PATCHES=(
+ "${FILESDIR}"/ffcall-2.5-add-support-for-clang.patch
+)
+
src_prepare() {
# The build system is a strange mix of autogenerated
# files and manual tweaks on top. Uses $CFLAGS / $LDFLAGS randomly.
@@ -35,6 +39,12 @@ src_prepare() {
default
elibtoolize
+ eautoreconf
+
+ if use kernel_linux ; then
+ QA_CONFIG_IMPL_DECL_SKIP=( PROT_MPROTECT )
+ fi
+
}
src_configure() {
diff --git a/dev-libs/ffcall/files/ffcall-2.5-add-support-for-clang.patch b/dev-libs/ffcall/files/ffcall-2.5-add-support-for-clang.patch
new file mode 100644
index 000000000000..2a8cc2676401
--- /dev/null
+++ b/dev-libs/ffcall/files/ffcall-2.5-add-support-for-clang.patch
@@ -0,0 +1,53 @@
+https://git.savannah.gnu.org/cgit/libffcall.git/commit/?id=fe6d9f089d8326b077420c10fec8c2174557be30
+
+From fe6d9f089d8326b077420c10fec8c2174557be30 Mon Sep 17 00:00:00 2001
+From: Bruno Haible <bruno@clisp.org>
+Date: Tue, 20 Aug 2024 13:38:19 +0200
+Subject: [PATCH] Add support for Android.
+
+* m4/cc-gcc.m4 (CL_CC_GCC): If using clang as compiler, add the option
+-no-integrated-as to GCC_X_NONE.
+* NEWS: Mention Android as supported.
+
+diff --git a/m4/cc-gcc.m4 b/m4/cc-gcc.m4
+index 1e12d8e..97c2dac 100644
+--- a/m4/cc-gcc.m4
++++ b/m4/cc-gcc.m4
+@@ -1,5 +1,5 @@
+ dnl -*- Autoconf -*-
+-dnl Copyright (C) 1993-2017 Free Software Foundation, Inc.
++dnl Copyright (C) 1993-2024 Free Software Foundation, Inc.
+ dnl This file is free software, distributed under the terms of the GNU
+ dnl General Public License as published by the Free Software Foundation;
+ dnl either version 2 of the License, or (at your option) any later version.
+@@ -27,6 +27,27 @@ AC_DEFUN([CL_CC_GCC],
+ if test $cl_cv_prog_cc_gcc = yes; then
+ CC_GCC=true
+ GCC_X_NONE='-x none'
++
++ dnl On arm, there are two slightly different syntaxes for assembly language:
++ dnl The "divided" syntax (standard since ca. 2000) and the "unified" syntax
++ dnl (supported by GNU binutils since 2009). See
++ dnl https://sourceware.org/binutils/docs/as/ARM_002dInstruction_002dSet.html
++ dnl While GNU as and thus GCC supports both, clang by default uses an
++ dnl "integrated" assembler that supports only the "unified" syntax, leading
++ dnl to errors "error: invalid instruction" on instructions such as stmeqia.
++ dnl We therefore need to tell clang to use the external assembler.
++ AC_CACHE_CHECK([whether using clang], [cl_cv_prog_cc_clang],
++ [AC_EGREP_CPP([yes],
++ [#ifdef __clang__
++ yes
++ #endif
++ ],
++ [cl_cv_prog_cc_clang=yes],
++ [cl_cv_prog_cc_clang=no])
++ ])
++ if test $cl_cv_prog_cc_clang = yes; then
++ GCC_X_NONE="$GCC_X_NONE -no-integrated-as"
++ fi
+ else
+ CC_GCC=false
+ GCC_X_NONE=''
+--
+2.45.2
+
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-04-10 10:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-10 10:38 [gentoo-commits] repo/gentoo:master commit in: dev-libs/ffcall/, dev-libs/ffcall/files/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2022-07-15 1:26 Sam James
2022-05-08 19:28 Jakov Smolić
2018-04-10 16:59 José María Alonso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox