Ld options for SGI Irix6.5

Kai Ruottu karuottu@mbnet.fi
Mon May 19 08:32:00 GMT 2003


In a message on the crossgcc list the following things were told:

> Anyway I got a littler further now, tweaking things along the way.
> Right now I'm stuck with the following problem:
> in mips-sgi-irix6/mabi=64/libstdc++-v3/src,
> /bin/sh ../libtool --tag CXX --mode=link
> /work/gcc-32-cross/gcc-build/gcc/xgcc [...] -o libstdc++.la [...]
>
> gets expanded to
>
> /work/gcc-32-cross/gcc-build/gcc/xgcc -shared-libgcc [...] -soname
> libstdc++.so.6 `test -n "sgi6.3:sgi6.2:sgi6.1:sgi6.0:sgi6.4" && echo
> -set_version sgi6.3:sgi6.2:sgi6.1:sgi6.0:sgi6.4`
> -o .libs/libstdc++.so.6.4
>
> and bombs with
>
> xgcc: libstdc++.so.6: No such file or directory
> xgcc: sgi6.3:sgi6.2:sgi6.1:sgi6.0:sgi6.4: No such file or directory
> xgcc: unrecognized option `-soname'
> xgcc: unrecognized option `-set_version'
> make: *** [libstdc++.la] Error 1
>
> Huh?  My mips-sgi-irix6-ld says it can do `-soname', but chokes on
> `-set_version'.  Where has it gone awry now?

  Using the 'mips-sgi-irix6' target name for Irix6.5 target was clearly
one problem, but still this problem with the '-set_version' should
remain...

  The 'ltcf-cxx.sh' defines these special options for Irix5 and Irix6
(backslashes added for clarity):

---------------------- clip ------------------------------------------
   *)
     if test "$with_gcc" = yes; then
       if test "$with_gnu_ld" = no; then
         archive_cmds='$CC -shared -nostdlib $predep_objects \
	$libobjs $deplibs $postdep_objects $compiler_flags \
	${wl}-soname ${wl}$soname \
	`test -n "$verstring" \
	  && echo ${wl}-set_version ${wl}$verstring` \
	${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
       else
         archive_cmds='$CC -shared -nostdlib $predep_objects $libobjs \
	$deplibs $postdep_objects $compiler_flags \
	-soname $soname \
	`test -n "$verstring" && echo -set_version $verstring` \
	-o $lib'
       fi
     fi
     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
     hardcode_libdir_separator=:
     link_all_deplibs=yes
     ;;
---------------------- clip ------------------------------------------

and is present also in the binutils sources. Here on binutils list
should be people who could know how these options for versioning (or
whatever it tries here to do) should be for Irixes, and I'm subscribed
here, not on the GCC-lists (or some list where the 'libtool' should be
discusssed), so excuse me asking this here...

  Of course the '-Wl,' is missing here, but adding it (the '${wl}' most
probably) wouldn't help much.

  Clearly the GNU binutils snapshots, 030429 were tried, don't support
the '-set_version' in ld. And also the '-soname' is wrong if given
directly to 'xgcc'...

  What the options for getting the same result as the '-set_version'
given to the native linker should be ?  And could the 'ltcf-c.sh', 
'ltcf-cxx.sh' be fixed by someone who can do it when this issue has
been solved?

Cheers, Kai





More information about the Binutils mailing list