>From 72ba40794f6a229a84a64404bff378402f602617 Mon Sep 17 00:00:00 2001 From: Kristian Lein-Mathisen Date: Fri, 3 Jan 2014 15:16:51 +0100 Subject: [PATCH 1/3] fix: eval.scm: use soname only with when USES_SONAME present in Makefile Android, who'se software-version is 'linux, does not use sonames and crashes with (use ) because the binary-version is incorrectly appended to the shared library filename. This patch explicitly propagates the Makefiles' USES_SONAME property through to eval for this to work properly. Signed-off-by: Peter Bex --- defaults.make | 7 +++++++ eval.scm | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/defaults.make b/defaults.make index f3c600b..a32dfbd 100644 --- a/defaults.make +++ b/defaults.make @@ -485,6 +485,13 @@ endif echo "#ifndef C_BINARY_VERSION" >>$@ echo "# define C_BINARY_VERSION $(BINARYVERSION)" >>$@ echo "#endif" >>$@ + echo "#ifndef C_USES_SONAME" >>$@ +ifdef USES_SONAME + echo "# define C_USES_SONAME 1" >>$@ +else + echo "# define C_USES_SONAME 0" >>$@ +endif + echo "#endif" >>$@ echo "/* END OF FILE */" >>$@ endif diff --git a/eval.scm b/eval.scm index a835394..ed1b92d 100644 --- a/eval.scm +++ b/eval.scm @@ -57,6 +57,7 @@ (define-foreign-variable install-egg-home c-string "C_INSTALL_EGG_HOME") (define-foreign-variable installation-home c-string "C_INSTALL_SHARE_HOME") (define-foreign-variable binary-version int "C_BINARY_VERSION") +(define-foreign-variable uses-soname? bool "C_USES_SONAME") (define-foreign-variable install-lib-name c-string "C_INSTALL_LIB_NAME") (define ##sys#core-library-modules @@ -1066,8 +1067,7 @@ (define dynamic-load-libraries (let ((ext - (if (and (memq (software-version) '(linux netbsd openbsd freebsd haiku hurd)) - (not (zero? binary-version))) ; allow "configless" build + (if uses-soname? (string-append ##sys#load-library-extension "." -- 1.7.10.4