Port-macppc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Linker problem while building spidermonkey

Julio Merino <jmmv%julipedia.org@localhost> wrote:

> While trying to build spidermonkey from pkgsrc on a macppc machine, I 
> reach the following error:
> gcc -o pkgsrc_OPT.OBJ/js -O2 -DJS_USE_FDLIBM_MATH=0 -g 
> -fno-strict-aliasing -I/usr/include -Wall -Wno-format -L/usr/pkg/lib -Os 
> -Ipkgsrc_OPT.OBJ  -Wall -Wno-format -L/usr/pkg/lib -Os -DXP_UNIX -DSYSV 
> pkgsrc_OPT.OBJ/js.o -Lpkgsrc_OPT.OBJ -L/usr/lib -Wl,-R/usr/lib 
> -Wl,-R/usr/pkg/lib \
>          editline/pkgsrc_OPT.OBJ/libedit.a -ljs -lm
> ld: pkgsrc_OPT.OBJ/js: hidden symbol `_savefpr_29' in 
> /usr/lib/libgcc.a(crtsavfpr.o) is referenced by DSO
> ld: final link failed: Bad value
> gmake[1]: *** [pkgsrc_OPT.OBJ/js] Error 1
> gmake[1]: Leaving directory 
> `/home/jmmv/os/pkgsrc/lang/spidermonkey/work/js/src'
> gmake: *** [all] Error 2
> *** Error code 2

Ask mrg@

There were some changes in the way we link libgcc*.  The issue you see
is that some dynamic library referenced in that command was not linked
with libgcc correctly and didn't pick up it's own private copy of the
hidden symbol in question.

gcc uses hidden (i.e. DSO-private) symbols for "millicode", functions
with calling sequence not conforming to ABI for speed.  These
functions are usually not safe to call via PLT since dynamic linker
will mess up the registers that are safe to use for normal ABI, but
are not safe to touch for millicode's private calling convention.  sh3
and hppa use millicode extensively (e.g. sh3 integer division).  I
think the current way we build libgcc &co should do the right thing
for millicode, but I haven't actually studied this in detail.  Since
mrg@ was working on it, it's best to bring this up with him.


Home | Main Index | Thread Index | Old Index