mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-24 12:06:31 +01:00
fix(guile-gnutls): force CROSS_COMPILING_VARIABLE in make to prevent GUILEC load-extension segfault
This commit is contained in:
parent
a05880ecb5
commit
5d63dc3c5e
2 changed files with 4 additions and 88 deletions
|
|
@ -27,9 +27,11 @@ src_configure() {
|
||||||
}
|
}
|
||||||
|
|
||||||
src_compile() {
|
src_compile() {
|
||||||
default_src_compile
|
make "${MAKEJOBS}" -f Makefile PREFIX="${PREFIX}" \
|
||||||
|
CROSS_COMPILING_VARIABLE="GNUTLS_GUILE_CROSS_COMPILING=yes"
|
||||||
}
|
}
|
||||||
|
|
||||||
src_install() {
|
src_install() {
|
||||||
default_src_install
|
make -f Makefile install PREFIX="${PREFIX}" DESTDIR="${DESTDIR}" \
|
||||||
|
CROSS_COMPILING_VARIABLE="GNUTLS_GUILE_CROSS_COMPILING=yes"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,86 +0,0 @@
|
||||||
--- guile-gnutls-v5.0.1/configure.ac 2025-07-13 09:01:47
|
|
||||||
+++ guile-gnutls-v5.0.1/configure.ac 2026-02-26 09:33:42
|
|
||||||
@@ -37,7 +37,7 @@
|
|
||||||
AC_PROG_CC
|
|
||||||
AC_PROG_CPP
|
|
||||||
AM_PROG_AR
|
|
||||||
-LT_INIT([disable-static])
|
|
||||||
+LT_INIT
|
|
||||||
|
|
||||||
PKG_CHECK_MODULES(GNUTLS, [gnutls])
|
|
||||||
|
|
||||||
@@ -508,6 +508,15 @@
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_SUBST([maybe_guileextensiondir])
|
|
||||||
+
|
|
||||||
+if test "x$enable_shared" = "xyes"; then
|
|
||||||
+ gnutls_guile_load_extension=yes
|
|
||||||
+else
|
|
||||||
+ gnutls_guile_load_extension=no
|
|
||||||
+fi
|
|
||||||
+AC_SUBST([gnutls_guile_load_extension])
|
|
||||||
+AM_CONDITIONAL([BUILD_SHARED], [test "x$enable_shared" = "xyes"])
|
|
||||||
+
|
|
||||||
AM_CONDITIONAL([HAVE_GUILD], [test "x$GUILD" != "x"])
|
|
||||||
AM_CONDITIONAL([CROSS_COMPILING], [test "x$cross_compiling" = "xyes"])
|
|
||||||
AM_CONDITIONAL(HAVE_GCC_GNU89_INLINE_OPTION, test "$gnu89_inline" = "yes"])
|
|
||||||
--- guile-gnutls-v5.0.1/guile/Makefile.am 2025-07-13 09:01:47
|
|
||||||
+++ guile-gnutls-v5.0.1/guile/Makefile.am 2026-02-26 09:33:42
|
|
||||||
@@ -46,6 +46,7 @@
|
|
||||||
.in.scm:
|
|
||||||
$(AM_V_GEN)$(MKDIR_P) "`dirname "$@"`" ; cat "$^" | \
|
|
||||||
$(SED) -e's|[@]maybe_guileextensiondir[@]|$(maybe_guileextensiondir)|g' \
|
|
||||||
+ -e's|[@]gnutls_guile_load_extension[@]|$(gnutls_guile_load_extension)|g' \
|
|
||||||
> "$@.tmp"
|
|
||||||
$(AM_V_at)mv "$@.tmp" "$@"
|
|
||||||
|
|
||||||
@@ -73,8 +74,12 @@
|
|
||||||
if CROSS_COMPILING
|
|
||||||
CROSS_COMPILING_VARIABLE = GNUTLS_GUILE_CROSS_COMPILING=yes
|
|
||||||
else
|
|
||||||
+if BUILD_SHARED
|
|
||||||
CROSS_COMPILING_VARIABLE =
|
|
||||||
+else
|
|
||||||
+CROSS_COMPILING_VARIABLE = GNUTLS_GUILE_CROSS_COMPILING=yes
|
|
||||||
endif
|
|
||||||
+endif
|
|
||||||
|
|
||||||
# Make sure 'gnutls.scm' is built first.
|
|
||||||
# Unset 'GUILE_LOAD_COMPILED_PATH' so we can be sure that any .go file that we
|
|
||||||
--- guile-gnutls-v5.0.1/guile/modules/gnutls.in 2025-07-13 09:01:47
|
|
||||||
+++ guile-gnutls-v5.0.1/guile/modules/gnutls.in 2026-02-26 09:33:43
|
|
||||||
@@ -817,7 +817,8 @@
|
|
||||||
;; save 'extensiondir' only if it's different from what Guile expects.
|
|
||||||
@maybe_guileextensiondir@))
|
|
||||||
|
|
||||||
- (unless (getenv "GNUTLS_GUILE_CROSS_COMPILING")
|
|
||||||
+ (unless (or (getenv "GNUTLS_GUILE_CROSS_COMPILING")
|
|
||||||
+ (string=? "@gnutls_guile_load_extension@" "no"))
|
|
||||||
(load-extension (if %libdir
|
|
||||||
(string-append %libdir "/guile-gnutls-v-2")
|
|
||||||
"guile-gnutls-v-2")
|
|
||||||
@@ -866,7 +867,8 @@
|
|
||||||
(define certificate-verify/allow-any-x509-v1-ca-certificate #f)
|
|
||||||
(define certificate-verify/allow-x509-v1-ca-certificate #f)
|
|
||||||
|
|
||||||
-(unless (getenv "GNUTLS_GUILE_CROSS_COMPILING")
|
|
||||||
+(unless (or (getenv "GNUTLS_GUILE_CROSS_COMPILING")
|
|
||||||
+ (string=? "@gnutls_guile_load_extension@" "no"))
|
|
||||||
;; Renaming.
|
|
||||||
(set! protocol/ssl-3 protocol/ssl3)
|
|
||||||
(set! protocol/tls-1.0 protocol/tls1-0)
|
|
||||||
--- guile-gnutls-v5.0.1/guile/src/Makefile.am 2025-07-13 09:01:47
|
|
||||||
+++ guile-gnutls-v5.0.1/guile/src/Makefile.am 2026-02-26 09:33:43
|
|
||||||
@@ -40,7 +40,11 @@
|
|
||||||
# Use '-module' to build a "dlopenable module", in Libtool terms.
|
|
||||||
# Use '-undefined' to placate Libtool on Windows; see
|
|
||||||
# <https://lists.gnutls.org/pipermail/gnutls-devel/2014-December/007294.html>.
|
|
||||||
+if BUILD_SHARED
|
|
||||||
guile_gnutls_v_2_la_LDFLAGS = -module -no-undefined
|
|
||||||
+else
|
|
||||||
+guile_gnutls_v_2_la_LDFLAGS = -all-static -no-undefined
|
|
||||||
+endif
|
|
||||||
|
|
||||||
guile_gnutls_v_2_la_SOURCES = core.c errors.c utils.c
|
|
||||||
guile_gnutls_v_2_la_CFLAGS = \
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue