A few corrections with the shared library support:
1. make sure libssl.so becomes dependent on libcrypto.so 2. correct a number of silly bugs in the solaris-shared target, and make sure lib*.so also depends on libc.so.
This commit is contained in:
parent
ee087bb8eb
commit
96f3b56c8c
23
Makefile.org
23
Makefile.org
@ -241,7 +241,7 @@ libcrypto.so: libcrypto.a
|
|||||||
fi
|
fi
|
||||||
libssl.so: libcrypto.so libssl.a
|
libssl.so: libcrypto.so libssl.a
|
||||||
@if [ "$(SHLIB_TARGET)" != "" ]; then \
|
@if [ "$(SHLIB_TARGET)" != "" ]; then \
|
||||||
$(MAKE) SHLIBDIRS=ssl $(SHLIB_TARGET); \
|
$(MAKE) SHLIBDIRS=ssl SHLIBDEPS='-L. -lcrypto' $(SHLIB_TARGET); \
|
||||||
else \
|
else \
|
||||||
echo "There's no support for shared libraries on this platform" >&2; \
|
echo "There's no support for shared libraries on this platform" >&2; \
|
||||||
fi
|
fi
|
||||||
@ -254,47 +254,44 @@ clean-shared:
|
|||||||
done
|
done
|
||||||
|
|
||||||
linux-shared:
|
linux-shared:
|
||||||
libs=; for i in ${SHLIBDIRS}; do \
|
libs='${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||||
rm -f lib$$i.so \
|
rm -f lib$$i.so \
|
||||||
lib$$i.so.${SHLIB_MAJOR} \
|
lib$$i.so.${SHLIB_MAJOR} \
|
||||||
lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}; \
|
lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}; \
|
||||||
( set -x; ${CC} -shared -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
( set -x; ${CC} -shared -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||||
-Wl,-S,-soname=lib$$i.so.${SHLIB_MAJOR} \
|
-Wl,-S,-soname=lib$$i.so.${SHLIB_MAJOR} \
|
||||||
-Wl,--whole-archive lib$$i.a \
|
-Wl,--whole-archive lib$$i.a \
|
||||||
-Wl,--no-whole-archive -lc $$libs ) || exit 1; \
|
-Wl,--no-whole-archive $$libs -lc ) || exit 1; \
|
||||||
libs="$$libs -L. -l$$i"; \
|
libs="$$libs -L. -l$$i"; \
|
||||||
( set -x; \
|
( set -x; \
|
||||||
ln -s lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
ln -s lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||||
lib$$i.so.${SHLIB_MAJOR}; \
|
lib$$i.so.${SHLIB_MAJOR}; \
|
||||||
ln -s lib$$i.so.${SHLIB_MAJOR} lib$$i.so ); \
|
ln -s lib$$i.so.${SHLIB_MAJOR} lib$$i.so ); \
|
||||||
done;
|
done
|
||||||
|
|
||||||
# This assumes that GNU utilities are *not* used
|
# This assumes that GNU utilities are *not* used
|
||||||
true64-shared:
|
true64-shared:
|
||||||
libs=; for i in ${SHLIBDIRS}; do \
|
libs='${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||||
( set -x; ${CC} -shared -no_archive -o lib$$i.so \
|
( set -x; ${CC} -shared -no_archive -o lib$$i.so \
|
||||||
-set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \
|
-set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \
|
||||||
-all lib$$i.a -none -lc $$libs ) || exit 1; \
|
-all lib$$i.a -none $$libs -lc ) || exit 1; \
|
||||||
libs="$$libs -L. -l$$i"; \
|
libs="$$libs -L. -l$$i"; \
|
||||||
done;
|
done
|
||||||
|
|
||||||
# This assumes that GNU utilities are *not* used
|
# This assumes that GNU utilities are *not* used
|
||||||
solaris-shared:
|
solaris-shared:
|
||||||
libs=; for i in ${SHLIBDIRS}; do \
|
libs='${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||||
rm -f lib$$i.so \
|
rm -f lib$$i.so \
|
||||||
lib$$i.so.${SHLIB_MAJOR} \
|
lib$$i.so.${SHLIB_MAJOR} \
|
||||||
lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}; \
|
lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}; \
|
||||||
( set -x; ${CC} -G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
( set -x; ${CC} -G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||||
-h lib$$i.so.${SHLIB_MAJOR} \
|
-h lib$$i.so.${SHLIB_MAJOR} \
|
||||||
-z allextract lib$$i.a $$libs ) || exit 1; \
|
-z allextract lib$$i.a $$libs -lc ) || exit 1; \
|
||||||
libs="$$libs -L. -l$$i"; \
|
libs="$$libs -L. -l$$i"; \
|
||||||
ln -s lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
ln -s lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||||
lib$$i.so.${SHLIB_MAJOR}; \
|
lib$$i.so.${SHLIB_MAJOR}; \
|
||||||
ln -s lib$$i.so.${SHLIB_MAJOR} lib$$i.so; \
|
ln -s lib$$i.so.${SHLIB_MAJOR} lib$$i.so; \
|
||||||
done; \
|
done
|
||||||
@set -x; \
|
|
||||||
for i in ${SHLIBDIRS}; do \
|
|
||||||
done;
|
|
||||||
|
|
||||||
Makefile.ssl: Makefile.org
|
Makefile.ssl: Makefile.org
|
||||||
@echo "Makefile.ssl is older than Makefile.org."
|
@echo "Makefile.ssl is older than Makefile.org."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user