From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 19367 invoked from network); 7 Mar 1999 17:51:16 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 7 Mar 1999 17:51:16 -0000 Received: from ellpspace.math.ualberta.ca (michal@ellpspace.math.ualberta.ca [129.128.88.19]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id MAA14392 for ; Sun, 7 Mar 1999 12:45:45 -0500 Received: (from michal@localhost) by ellpspace.math.ualberta.ca (8.8.8/8.8.8) id KAA24591 for axp-list@redhat.com; Sun, 7 Mar 1999 10:45:42 -0700 From: Michal Jaegermann Message-Id: <199903071745.KAA24591@ellpspace.math.ualberta.ca> Subject: shared libcpml (was: Re: libcmpl vs libffm !!!!) To: axp-list@redhat.com Date: Sun, 7 Mar 1999 10:45:42 -0700 (MST) In-Reply-To: <19990307000456.A6853@twiddle.net> from "Richard Henderson" at Mar 7, 99 00:04:56 am Content-Type: text Richard Henderson wrote: > > It should be safe to assemble > > .global _fpdata > _fpdata = 0 > > and link it in to the shared object simply to resolve the reference. This indeed does work but it was only lightly tested. Included below is a shell script which will convert the the current version of libcpml.a into a shared library and it will avoid unresolved references. If you are brave - go ahead. :-) If something will break you may blame me, Richard or yourself but its you to keep pieces in any case. Review the contents before running and edit 'fromd' to point to a location where you really have a copy of libcpml.a. Error handling is mostly non-existent; feel free to rectify. Enjoy, Michal #!/bin/sh lib=libcpml # this is places with a copy of libcpml.a fromd=/usr/local/lib # this is where we will place a shared version of this library targetd=/usr/local/lib workdir=/usr/tmp/working.$$ if [ -e $workdir ] ; then echo "$workdir already exists; try again" exit 1 else mkdir $workdir cd $workdir fi fpd=fpdata echo ".global _fpdata _fpdata = 0" > ${fpd}.s if ! gcc -c ${fpd}.s ; then echo -e "failed to create ${fpd}.o\nbailing out\n" fi if ! cp $fromd/${lib}.a . ; then echo "cannot copy $fromd/${lib}.a" echo "did you forget to change \$fromd?" exit 1 fi olist=" __powii_e.o cacoshl.o cacosl.o casinl.o catanhl.o ccosl.o cdivl.o cexpl.o cmull.o cpowl.o csinl.o csqrtl.o ctanhl.o fdiml.o fmal.o fmaxl.o fminl.o frexpl.o ilogbl.o ldexpl.o llrintl.o llroundl.o logbl.o lrintl.o lroundl.o nearbyintl.o nextafterl.o nextafterxl.o nxtaftrl.o powii.o r_diml.o r_iixint.o r_imod.o r_inintl.o r_iumod.o r_jixint.o r_jmod.o r_jnintl.o r_kixint.o r_kmod.o r_knintl.o r_kumod.o r_lumod.o r_prodl.o r_signl.o r_xfloti.o r_xflotj.o r_xflotk.o roundl.o scalbl.o scalblnl.o scalbnl.o spec_expl.o tgammal.o casinhl.o catanl.o ccoshl.o csinhl.o ctanl.o " ar -dv ${lib}.a $olist ar -qv ${lib}.a ${fpd}.o ld -shared --whole-archive ${lib}.a --no-whole-archive -lc -o ${lib}.so cp ${lib}.so $targetd grep -q $targetd /etc/ld.so.conf || echo $targetd >> /etc/ld.so.conf ldconfig cd .. rm -rf $workdir exit 0