mirror of
https://https.git.savannah.gnu.org/git/guix.git/
synced 2025-07-12 01:50:46 +02:00
* gnu/packages/math.scm (reduce): New variable. * gnu/packages/patches/reduce-unbundle-libffi.patch: New file. * gnu/local.mk (dist_patch_DATA): Register file. Change-Id: Ic85be7dc490f005f7ba65c418250cc9681fbb3a8 Signed-off-by: Andreas Enge <andreas@enge.fr>
125 lines
3.8 KiB
Diff
125 lines
3.8 KiB
Diff
This patch unbundles libffi.
|
|
|
|
Index: autogen.sh
|
|
===================================================================
|
|
diff --git a/autogen.sh b/autogen.sh
|
|
--- a/autogen.sh (revision 6860)
|
|
+++ b/autogen.sh (working copy)
|
|
@@ -142,18 +142,6 @@
|
|
;;
|
|
*--with-csl* | *--with-both*)
|
|
L="$L ./csl ./csl/cslbase ./csl/cslbase-nothrow ./libraries/SoftFloat-3a/source"
|
|
-# On Apple m1 (ie arm64) I will want to build a universal version of the
|
|
-# libffi library and that is done in a way that differs from standrad builds.
|
|
- case "`uname -s` `uname -m`" in
|
|
- *Darwin*arm64*)
|
|
- L="$L ./libraries/libffi-for-mac/libffi-3.3-arm64"
|
|
- L="$L ./libraries/libffi-for-mac/libffi-3.3-x86_64"
|
|
- L="$L ./libraries/libffi"
|
|
- ;;
|
|
- *)
|
|
- L="$L ./libraries/libffi"
|
|
- ;;
|
|
- esac
|
|
case $a in
|
|
*--without-fox* | *with-fox=no* | \
|
|
*--without-gui* | *with-gui=no*)
|
|
Index: configure.ac
|
|
===================================================================
|
|
diff --git a/configure.ac b/configure.ac
|
|
--- a/configure.ac (revision 6860)
|
|
+++ b/configure.ac (working copy)
|
|
@@ -1389,37 +1389,6 @@
|
|
cd "$builddir"
|
|
fi
|
|
|
|
-AC_MSG_NOTICE([About to configure libffi])
|
|
-mkdir -p libffi
|
|
-if test `uname` = "Darwin" && test "$enable_universal" != "no"
|
|
-then
|
|
-# This is a messy script that arranges to build a universal version of
|
|
-# the library on MacOS. It does this by building arm64 and an x86_64
|
|
-# separately and then merging the resulting libraries.
|
|
- sed "s+@srcdir@+$abssrcdir+" \
|
|
- < $abssrcdir/libraries/libffi-for-mac/Makefile \
|
|
- > libffi/Makefile
|
|
-else
|
|
- cd libffi
|
|
- setpasscc
|
|
- doconfig="$SHELL $abssrcdir/libraries/libffi/configure -C $filtered \
|
|
- $pass_host \
|
|
- CPPFLAGS=\"$CPPFLAGS\" \
|
|
- CFLAGS=\"$CFLAGS\" \
|
|
- CXXFLAGS=\"$CXXFLAGS\" \
|
|
- LDFLAGS=\"$LDFLAGS\" \
|
|
- $passcc \
|
|
- --disable-multi-os-directory \
|
|
- --disable-docs \
|
|
- --prefix=\"$builddir\" \
|
|
- --libdir=\"$builddir/lib\" \
|
|
- --includedir=\"$builddir/include\""
|
|
- AC_MSG_NOTICE([doconfig = $doconfig])
|
|
- printf "\n\n+++ About to configure libffi +++\n\n"
|
|
- eval "$doconfig"
|
|
- cd "$builddir"
|
|
-fi
|
|
-
|
|
AC_MSG_NOTICE([About to configure libsoftfloat])
|
|
mkdir -p softfloat
|
|
cd softfloat
|
|
Index: csl/cslbase/Makefile.am
|
|
===================================================================
|
|
diff --git a/csl/cslbase/Makefile.am b/csl/cslbase/Makefile.am
|
|
--- a/csl/cslbase/Makefile.am (revision 6860)
|
|
+++ b/csl/cslbase/Makefile.am (working copy)
|
|
@@ -807,35 +807,6 @@
|
|
|
|
endif !crlibm
|
|
|
|
-LIBFFIDEPS=../lib/libffi.a ../include/ffi.h
|
|
-
|
|
-FFIDEP = ../include/ffi.h
|
|
-FFIINC = -I../include
|
|
-AM_CPPFLAGS += $(FFINC)
|
|
-reduce_CPPFLAGS += $(FFINC)
|
|
-bootstrapreduce_CPPFLAGS += $(FFINC)
|
|
-csl_CPPFLAGS += $(FFINC)
|
|
-flatcsl_CPPFLAGS += $(FFINC)
|
|
-
|
|
-# The following ugly dependencies are here so that one can go, for
|
|
-# instance, "make csl.o" in a clean tree and libffi building will get
|
|
-# triggered.
|
|
-
|
|
-
|
|
-csl_LDADD += ../lib/libffi.a
|
|
-flatcsl_LDADD += ../lib/libffi.a
|
|
-bootstrapreduce_LDADD += ../lib/libffi.a
|
|
-reduce_LDADD += ../lib/libffi.a
|
|
-
|
|
-csl_DEPENDENCIES += $(LIBFFIDEPS)
|
|
-flatcsl_DEPENDENCIES += $(LIBFFIDEPS)
|
|
-bootstrapreduce_DEPENDENCIES += $(LIBFFIDEPS)
|
|
-reduce_DEPENDENCIES += $(LIBFFIDEPS)
|
|
-
|
|
-$(LIBFFIDEPS):
|
|
- @printf "About to build libffi for %s ($@)\n" `pwd`
|
|
- -$(TRACE)@$(MAKE) -C ../libffi install
|
|
-
|
|
SOFTFLOATDEPS=../lib/libsoftfloat.a ../include/softfloat.h
|
|
|
|
SOFTFLOATDEP = ../include/softfloat.h
|
|
Index: csl/cslbase/configure.ac
|
|
===================================================================
|
|
diff --git a/csl/cslbase/configure.ac b/csl/cslbase/configure.ac
|
|
--- a/csl/cslbase/configure.ac (revision 6860)
|
|
+++ b/csl/cslbase/configure.ac (working copy)
|
|
@@ -146,8 +146,8 @@
|
|
AC_DEFINE(WITHOUT_FFI, [1], [remove the foreign function support])
|
|
fi
|
|
|
|
+AC_SEARCH_LIBS([ffi_call], [ffi])
|
|
|
|
-
|
|
# What host am I on?
|
|
AC_CANONICAL_HOST()
|
|
|