Commit d0cf3c86 authored by Marius Gerbershagen's avatar Marius Gerbershagen

build libecl.so with soname on Android

    Otherwise the linker on recent Android versions will not find
    libecl.so. For compatibility with existing Android apps which only
    distribute a libecl.so file, but not a libecl.so.16.x file, we
    don't use a version component in soname, since the linker on older
    Android versions only looks for libraries matching the exact
    soname.
parent 6090d9d2
......@@ -101,7 +101,7 @@ bin/$(ECL): $(ECL_MIN) compile.lsp ecl/external.h build-stamp $(top_srcdir)/lsp/
else \
ECLDIR=`pwd`/ ./$(ECL_MIN) compile; \
fi
if [ "x@SONAME@" != "x" -a -f "@SONAME@" ]; then \
if [ "x@SONAME@" != "x" -a -f "@SONAME@" -a "@SONAME@" != "@SONAME3@" ]; then \
( mv @SONAME@ @SONAME3@ && \
$(RM) -f @SONAME2@ @SONAME1@ @SONAME@ && \
$(LN_S) @SONAME3@ @SONAME2@ && \
......@@ -220,7 +220,7 @@ install:
$(INSTALL_LIBRARY) $$i $(DESTDIR)$(libdir); \
fi \
done
if [ "x@SONAME3@" != "x" -a -f "@SONAME3@" ]; then \
if [ "x@SONAME3@" != "x" -a -f "@SONAME3@" -a "@SONAME@" != "@SONAME3@" ]; then \
( $(INSTALL_LIBRARY) @SONAME3@ $(DESTDIR)$(libdir) && \
cd $(DESTDIR)$(libdir) && $(RM) -f @SONAME2@ @SONAME1@ @SONAME@ && \
$(LN_S) @SONAME3@ @SONAME2@ && \
......
......@@ -263,6 +263,8 @@ case "${host_os}" in
# Maybe CFLAGS="-D_ISOC99_SOURCE ${CFLAGS}" ???
CFLAGS="-D_GNU_SOURCE -DPLATFORM_ANDROID -DUSE_GET_STACKBASE_FOR_MAIN -DIGNORE_DYNAMIC_LOADING ${CFLAGS}"
ECL_ADD_FEATURE([android])
SONAME="${SHAREDPREFIX}ecl.${SHAREDEXT}"
SONAME_LDFLAGS="-Wl,-soname,SONAME"
;;
# libdir may have a dollar expression inside
......
......@@ -4924,6 +4924,8 @@ case "${host_os}" in
LSP_FEATURES="(cons :android ${LSP_FEATURES})"
SONAME="${SHAREDPREFIX}ecl.${SHAREDEXT}"
SONAME_LDFLAGS="-Wl,-soname,SONAME"
;;
# libdir may have a dollar expression inside
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment