Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* shared libcpml (was: Re: libcmpl vs libffm !!!!)
  1999-03-07  8:04 libcmpl vs libffm !!!! Richard Henderson
@ 1999-03-07 17:45 ` Michal Jaegermann
  0 siblings, 0 replies; 3+ messages in thread
From: Michal Jaegermann @ 1999-03-07 17:45 UTC (permalink / raw)
  To: axp-list

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: shared libcpml (was: Re: libcmpl vs libffm !!!!)
@ 1999-03-08  8:13 designer seven
  1999-03-08 17:17 ` Michal Jaegermann
  0 siblings, 1 reply; 3+ messages in thread
From: designer seven @ 1999-03-08  8:13 UTC (permalink / raw)
  To: axp-list

hmmmm... even with your script below, I'm getting an unresolved
reference to 'nextafterl'. I was trying to build gtk with it...




---Michal Jaegermann <michal@ellpspace.math.ualberta.ca> wrote:
>
> 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
> 
> -- 
> To unsubscribe: send e-mail to axp-list-request@redhat.com with
> 'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com
> 
> 

_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: shared libcpml (was: Re: libcmpl vs libffm !!!!)
  1999-03-08  8:13 shared libcpml (was: Re: libcmpl vs libffm !!!!) designer seven
@ 1999-03-08 17:17 ` Michal Jaegermann
  0 siblings, 0 replies; 3+ messages in thread
From: Michal Jaegermann @ 1999-03-08 17:17 UTC (permalink / raw)
  To: axp-list

designer seven wrote:
> 
> hmmmm... even with your script below, I'm getting an unresolved
> reference to 'nextafterl'. I was trying to build gtk with it...

I may have missed something.  This is something which you are
supposed to try, and expand, on your own and not the ultimate word
on the subject.  As I wrote - it may break.

Check what tries to use 'nextafterl' (in the original library) and what
provides this symbol; I mean in the original library.  If you try to use
a function which references 'nextafterl' does it work when linking with
a static version?  Whatever has a name which ends with 'l' smells like
128-bit function which you will not be able to use in any case.
Maybe you can get away providing a dummy if you cannot avoid whatever
references it?

  Michal

p.s. what value was added to your posting by quoting the whole longish
script in extenso?


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1999-03-08 17:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-03-08  8:13 shared libcpml (was: Re: libcmpl vs libffm !!!!) designer seven
1999-03-08 17:17 ` Michal Jaegermann
  -- strict thread matches above, loose matches on Subject: below --
1999-03-07  8:04 libcmpl vs libffm !!!! Richard Henderson
1999-03-07 17:45 ` shared libcpml (was: Re: libcmpl vs libffm !!!!) Michal Jaegermann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox