libtool-patches
[Top][All Lists]
Advanced

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

Re: FYI: IRIX 6.5 and exporting symbols.


From: Ralf Wildenhues
Subject: Re: FYI: IRIX 6.5 and exporting symbols.
Date: Thu, 17 Mar 2005 13:30:43 +0100
User-agent: Mutt/1.4.1i

No, wait.

* Ralf Wildenhues wrote on Thu, Mar 17, 2005 at 01:21:57PM CET:
> * Peter Ekberg wrote on Thu, Mar 17, 2005 at 12:45:18PM CET:
> > > 
> > > 2005-03-10  Peter Ekberg  <spam.protected>
> > > 
> > >   * m4/libtool.m4 (_LT_LINKER_SHLIBS): Test if it is
> > >   possible to use the -exports_file linker option on
> > >   irix with gcc, as the gcc specs file may include
> > >   a -hidden_symbol option that is clashing with the
> > >   -exports_file option.
> > >   See this gcc bugzilla entry for further details:
> > >   http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15288

> diff -u -r1.171 libtool.m4
> --- m4/libtool.m4     16 Mar 2005 17:27:35 -0000      1.171
> +++ m4/libtool.m4     17 Mar 2005 12:25:54 -0000
> @@ -4106,7 +4106,15 @@
>      irix5* | irix6* | nonstopux*)
>        if test "$GCC" = yes; then
>       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs 
> $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO 
> ${wl}-set_version ${wl}$verstring` ${wl}-update_registry 
> ${wl}${output_objdir}/so_locations -o $lib'
> -     _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs 
> $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO 
> ${wl}-set_version ${wl}$verstring` ${wl}-update_registry 
> ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o 
> $lib'
> +     # Try to use the -exported_symbol ld option, if it does not
> +     # work, assume that -exports_file does not work either and
> +     # implicitly export all symbols.
> +        save_LDFLAGS="$LDFLAGS"
> +        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo 
> ${wl}-update_registry ${wl}/dev/null"
> +        AC_LINK_IFELSE(int foo(void) {},
> +          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs 
> $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO 
> ${wl}-set_version ${wl}$verstring` ${wl}-update_registry 
> ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o 
> $lib'

This is not ok:  $ECHO may only take one argument, so you must
double-quote.  Furthermore, the argument may not start with a hyphen in
general, for it might be misinterpreted as option to the $ECHO command.
The solution is to use the slower
  $ECHO "X$what $ever" | $Xsed

> +        )
> +        LDFLAGS="$save_LDFLAGS"
>        else
>       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs 
> $compiler_flags -soname $soname `test -n "$verstring" && $ECHO -set_version 
> $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
>       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs 
> $compiler_flags -soname $soname `test -n "$verstring" && $ECHO -set_version 
> $verstring` -update_registry ${output_objdir}/so_locations -exports_file 
> $export_symbols -o $lib'

I see this bug is in several places here.  :-/

Regards,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]