From 9cabef963cf67aefba0f560eb284bbb827f3e306 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lutz=20J=C3=A4nicke?= Date: Thu, 6 Sep 2001 19:25:56 +0000 Subject: [PATCH] Completely reworked SVR5 shared library support. --- Makefile.org | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/Makefile.org b/Makefile.org index f3bc96597e..9132551ff7 100644 --- a/Makefile.org +++ b/Makefile.org @@ -315,14 +315,18 @@ do_solaris-shared: # UnixWare 7 and OpenUNIX 8 native compilers used do_svr5-shared: - libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \ - touch lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ - ( PATH=/usr/ccs/bin:$$PATH ; export PATH; \ - set -x; ${CC} -G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ - -h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ - -z allextract lib$$i.a $$libs ${EX_LIBS} ) || exit 1; \ - libs="$$libs -l$$i"; \ - done + libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \ + ( PATH=/usr/ccs/bin:$$PATH ; export PATH; \ + find . -name "*.o" -print > allobjs ; \ + OBJS= ; export OBJS ; \ + for obj in `ar t lib$$i.a` ; do \ + OBJS="$${OBJS} `grep $$obj allobjs`" ; \ + done ; \ + set -x; ${CC} -G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ + -h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ + $${OBJS} $$libs ${EX_LIBS} ) || exit 1; \ + libs="$$libs -l$$i"; \ + done # This assumes that GNU utilities are *not* used do_irix-shared: