Update to the final 1.13 release.

Drop patches and workarounds for problems fixed upstream.
This commit is contained in:
Jerry James 2017-07-03 16:28:02 -06:00
parent 4733f164c3
commit 964835f2cf
4 changed files with 12 additions and 136 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
/ffcall-20120424cvs.tar.xz
/ffcall-1.12.tar.gz
/ffcall-1.13.tar.xz
/libffcall-1.13.tar.gz

View File

@ -1,56 +0,0 @@
--- common/asm-i386.hh.orig 2017-02-23 14:48:41.000000000 -0700
+++ common/asm-i386.hh 2017-02-24 14:00:27.428126212 -0700
@@ -160,6 +160,7 @@
#define MEM(base)(R(base))
#define MEM_DISP(base,displacement)displacement(R(base))
#define MEM_INDEX(base,index)(R(base),R(index))
+#define MEM_DISPINDEX(base,displacement,index) displacement(R(base),R(index))
#define MEM_SHINDEX(base,index,size)(R(base),R(index),size)
#define MEM_DISP_SHINDEX0(displacement,index,size)displacement(,R(index),size)
#define MEM_DISP_SHINDEX(base,displacement,index,size)displacement(R(base),R(index),size)
@@ -167,6 +168,7 @@
#define INSNCONC(mnemonic,size_suffix)mnemonic##size_suffix
#define INSN1(mnemonic,size_suffix,dst)INSNCONC(mnemonic,size_suffix) dst
#define INSN2(mnemonic,size_suffix,src,dst)INSNCONC(mnemonic,size_suffix) src,dst
+#define INSN3(mnemonic,size_suffix,displacement,src,dst)INSNCONC(mnemonic,size_suffix) displacement,src,dst
#define INSN2MOVX(mnemonic,size_suffix,src,dst)INSNCONC(mnemonic,size_suffix##l) src,dst
#if defined(BSD_SYNTAX) || defined(COHERENT)
#define INSN2SHCL(mnemonic,size_suffix,src,dst)INSNCONC(mnemonic,size_suffix) R(cl),src,dst
@@ -199,6 +201,7 @@
#define MEM(base) [base]
#define MEM_DISP(base,displacement) [base+(displacement)]
#define MEM_INDEX(base,index) [base+index]
+#define MEM_DISPINDEX(base,displacement,index) [base+(displacement)+index]
#define MEM_SHINDEX(base,index,size) [base+index*size]
#define MEM_DISP_SHINDEX0(displacement,index,size) [(displacement)+index*size]
#define MEM_DISP_SHINDEX(base,displacement,index,size) [base+(displacement)+index*size]
@@ -206,6 +209,7 @@
#define INSNCONC(mnemonic,suffix)mnemonic##suffix
#define INSN1(mnemonic,size_suffix,dst)mnemonic dst
#define INSN2(mnemonic,size_suffix,src,dst)mnemonic dst,src
+#define INSN3(mnemonic,size_suffix,displacement,src,dst) displacement,dst,src
#define INSN2MOVX(mnemonic,size_suffix,src,dst)INSNCONC(mnemonic,x) dst,src
#define INSN2SHCL(mnemonic,size_suffix,src,dst)mnemonic dst,src,R(cl)
#define REPZ repz
--- common/asm-i386.sh.orig 2017-02-23 14:48:41.000000000 -0700
+++ common/asm-i386.sh 2017-02-24 14:02:19.403144281 -0700
@@ -82,15 +82,17 @@ s/[(]%\(e..\)[)]/MEM(\1)/g
s/\([-+0-9A-Z_]\+\)[(],%\(e..\),\([0-9]*\)[)]/MEM_DISP_SHINDEX0(\1,\2,\3)/g
s/\([-+0-9A-Z_]\+\)[(]%\(e..\),%\(e..\),\([0-9]*\)[)]/MEM_DISP_SHINDEX(\2,\1,\3,\4)/g
s/[(]%\(e..\),%\(e..\),\([0-9]*\)[)]/MEM_SHINDEX(\1,\2,\3)/g
+s/\([-+0-9A-Z_]\+\)[(]%\(e..\),%\(e..\)[)]/MEM_DISPINDEX(\2,\1,\3)/g
s/[(]%\(e..\),%\(e..\)[)]/MEM_INDEX(\1,\2)/g
EOF
cat > $tmpscript05 << \EOF
# ----------- Introduce macro syntax for instructions
+s/\(imul\)\(.\)\([ ]\+\)\(.*\)$/INSN3(\1,\2 ,\4)/
s/\(push\|pop\|mul\|div\|not\|neg\|inc\|dec\|fld\|fstp\)\(.\)\([ ]\+\)\(.*\)$/INSN1(\1,\2 ,\4)/
-s/\(call\|jmp\|jc\|jnc\|je\|jne\|jz\|jnz\|ja\|jae\|jb\|jbe\|jl\|jge\|js\|jns\)\([ ]\+\)\(.*\)$/INSN1(\1,_ ,\3)/
+s/\(call\|jmp\|jc\|jnc\|je\|jne\|jz\|jnz\|ja\|jae\|jb\|jbe\|jl\|jle\|jg\|jge\|js\|jns\)\([ ]\+\)\(.*\)$/INSN1(\1,_ ,\3)/
s/\(movs\|movz\)\(.\)l\([ ]\+\)\(.*\)$/INSN2MOVX(\1,\2,\4)/
-s/\(mov\|add\|sub\|adc\|sbb\|xor\|test\|cmp\|rcl\|rcr\|and\|or\|sar\|shr\|shl\|lea\)\(.\)\([ ]\+\)\(.*\)$/INSN2(\1,\2 ,\4)/
+s/\([[:blank:]]\+\)\(mov\|add\|sub\|adc\|sbb\|xor\|test\|cmp\|rcl\|rcr\|and\|or\|sar\|shr\|shl\|lea\)\(.\)\([ ]\+\)\(.*\)$/\1INSN2(\2,\3 ,\5)/
s/\(shld\|shrd\)\(.\)\([ ]\+\)shcl\( \+\)\(.*\)$/INSN2SHCL(\1,\2 ,\5)/
s/rep[ ];/REP/
s/repz[ ];/REPZ/

View File

@ -4,29 +4,19 @@
# This package uses assembly to do its work. This is the entire list of
# supported architectures understood by RPM, even those not currently supported
# by Fedora. RPM hasn't heard about line continuations, hence the mess.
%global ffcall_arches %{ix86} x86_64 amd64 %{alpha} %{arm} parisc hppa1.0 hppa1.1 hppa1.2 hppa2.0 ia64 m68k %{mips32} ppc ppc8260 ppc8560 ppc32dy4 ppciseries ppcpseries %{power64} s390 s390x %{sparc}
%global ffcall_arches %{ix86} x86_64 amd64 aarch64 %{alpha} %{arm} parisc hppa1.0 hppa1.1 hppa1.2 hppa2.0 ia64 m68k %{mips32} %{mips64} ppc ppc8260 ppc8560 ppc32dy4 ppciseries ppcpseries %{power64} s390 s390x %{sparc}
Name: ffcall
Version: 1.13
Release: 2%{?dist}
Release: 3%{?dist}
Summary: Libraries for foreign function call interfaces
License: GPLv2+
URL: http://www.gnu.org/software/libffcall/
# Upstream no longer provides tarballs. To generate the tarball:
# git clone git://git.savannah.gnu.org/libffcall.git
# cd libffcall
# git reset --hard 0455e86c9c24f7bc2bd7ed036b5815223254a965
# rm -fr .git*
# cd ..
# tar cJf ffcall-%%{version}.tar.xz libfcall
Source0: %{name}-%{version}.tar.xz
# Fix multiple errors in the 32-bit x86 assembly syntax conversion
Patch0: %{name}-i386.patch
Source0: https://ftp.gnu.org/gnu/libffcall/lib%{name}-%{version}.tar.gz
BuildRequires: gcc
BuildRequires: gnulib-devel
BuildRequires: libtool
Provides: %{name}-static = %{version}-%{release}
@ -44,75 +34,11 @@ packages are:
%prep
%setup -q -n libffcall
%patch0
# Preserve timestamps
for fil in $(find . -name Makefile\*); do
sed -i 's/^[[:blank:]]*cp[[:blank:]]/&-p /' $fil
done
# Upstream does not ship a configure script, and autogen.sh wants to download
make -f Makefile.maint \
gnulib-clean glm4/gnulib-cache.m4 gnulib-imported-files \
GNULIB_TOOL="%{_bindir}/gnulib-tool"
make -C callback/vacall_r -f Makefile.maint copied-files
make -C callback/trampoline_r -f Makefile.maint copied-files
make -f Makefile.maint totally-clean
autoreconf -fi -I $PWD/m4 -I $PWD/glm4
# Throw away OS X code that causes a syntax error on Linux
sed -i '\%/EH_FRAME_SECTION%,/EOF/d;/Likewise/aEOF' common/asm-x86_64.sh
# On ARM, the script throws away .file directives, but not .loc directives,
# leading to a compilation error. Keep both for better debuginfo.
sed -i '/\.file/d' common/asm-arm.sh
# We are not AIX. We are Linux.
sed -i 's, $(srcdir)/avcall-powerpc64-aix\.s,,' avcall/Makefile.in
sed -i 's, $(srcdir)/vacall-powerpc64-aix\.s,,' vacall/Makefile.in
sed -i 's, $(srcdir)/vacall-powerpc64-aix\.s,,' callback/vacall_r/Makefile.in
# Endianness comparisons always fail, but we don't care because we only want to
# build for the host architecture.
sed -i '/^\([[:blank:]]*\)cmp[[:blank:]]/d' avcall/Makefile.devel \
vacall/Makefile.devel callback/vacall_r/Makefile.devel
# We are not really cross-compiling, even though the Makefile thinks so
cat > cross << EOF
#!/bin/sh
shift 2
if [ "\$1" = "-V" ]; then
shift 2
fi
gcc $CFLAGS \$@
EOF
chmod a+x cross
%setup -q -n lib%{name}-%{version}
%build
# Use our fake cross-compilation script
PATH=$PATH:$PWD
export CFLAGS="$RPM_OPT_FLAGS -fPIC"
%ifarch %{arm}
CFLAGS="$CFLAGS -fno-strict-aliasing"
%endif
%configure
# Find out what ffcall thinks the arch name is
FFARCH=$(sed -n "s/HOST_CPU_C_ABI='\(.*\)'/\1/p" config.log)
%ifarch %{ix86}
make -f Makefile.maint common/asm-i386.h
%endif
# Construct files needed for the build; failure is not necessarily fatal
make -C avcall -f Makefile.devel avcall-$FFARCH-linux.s || :
make -C avcall -f Makefile.devel avcall-$FFARCH-macro.S || :
make -C vacall -f Makefile.devel vacall-$FFARCH-linux.s || :
make -C vacall -f Makefile.devel vacall-$FFARCH-macro.S || :
make -C callback/vacall_r -f Makefile.devel vacall-$FFARCH-linux.s || :
make -C callback/vacall_r -f Makefile.devel vacall-$FFARCH-macro.S || :
# Build the actual library
make # %{?_smp_mflags}
@ -122,7 +48,6 @@ mkdir -p $RPM_BUILD_ROOT%{_mandir}
make install DESTDIR=$RPM_BUILD_ROOT
rm -fr $RPM_BUILD_ROOT%{_datadir}/html
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
cd $RPM_BUILD_ROOT%{_mandir}/man3
# Advertise supported architectures
mkdir -p $RPM_BUILD_ROOT%{_rpmconfigdir}/macros.d
@ -132,9 +57,11 @@ cat > $RPM_BUILD_ROOT%{_rpmconfigdir}/macros.d/macros.%{name} << EOF
EOF
# Fix man pages with overly generic names (bz 800360)
pushd $RPM_BUILD_ROOT%{_mandir}/man3
for page in *; do
mv $page %{name}-$page
done
popd
%files
%license COPYING
@ -151,6 +78,10 @@ done
%changelog
* Mon Jul 3 2017 Jerry James <loganjerry@gmail.com> - 1.13-3
- Update to the final 1.13 release
- Drop patches and workarounds for problems fixed upstream
* Fri Feb 24 2017 Jerry James <loganjerry@gmail.com> - 1.13-2
- Fix missing symbols in the i386 build

View File

@ -1 +1 @@
SHA512 (ffcall-1.13.tar.xz) = d63bd798e274fad68451c396767fc5c23083d89dbfc257c18ccad8ea78622c2331f713b03afc862953373ab60d0605fad3251e653ef654a7e6a4656a95ff6651
SHA512 (libffcall-1.13.tar.gz) = c059fa89eb3e85bad22d045de074bfc88fae42454821e10905ffd67209b6e6ea44eeab120b869696f77b816aacb9a5af3e4b51c640512e876df1b6da6f296bd4