Re: [gtk-vnc-devel] [patch] Use export-symbols-regex to fix ld problem on solaris



Anthony,

As your request, the patch is ready, please review it. I verified on
Solaris and Ubuntu platform.

On system which ld does not support --version-script like Solaris
$cat src/Makefile|grep ^libgtk_vnc_1_0_la_LDFLAGS
libgtk_vnc_1_0_la_LDFLAGS = -Wl, export-symbols-regex 'vnc_' \

On system which ld support --version-script like Ubuntu
$ cat src/Makefile|grep ^libgtk_vnc_1_0_la_LDFLAGS
libgtk_vnc_1_0_la_LDFLAGS = -Wl, --version-script=
$(srcdir)/libgtk-vnc_sym.version \

If the patch is okay, can i commit? My account is 'nonsea'.

Thanks,
Halton.
On Fri, 2008-04-11 at 09:49 -0500, Anthony Liguori wrote:
> Halton Huo wrote:
> > Anthony,
> >
> > Is --version-script is a standard option for ld? Checked with ubuntu,
> > seems does not accept this option also.
> >
> > gtest yonex:~$ ld --version-script
> > ld: unrecognized option '--version-script'
> > ld: use the --help option for usage information
> >   
> 
> That's b/c --version-script has to take an option.  If you do ld 
> --version-script= you'll get the right output.
> 
> Regards,
> 
> Anthony Liguori
> 
> > Halton.
> > On Thu, 2008-04-10 at 23:09 -0500, Anthony Liguori wrote:
> >   
> >> Halton Huo wrote:
> >>     
> >>> Hi,
> >>>
> >>> With this patch, gtk-vnc trunk code can build on Solaris. Main reason is
> >>> --version-script is not supported with solaris ld. Use
> >>> export-symbols-regex will fix this bug. Refer to bug
> >>> http://bugzilla.gnome.org/show_bug.cgi?id=503359 for details.
> >>>   
> >>>       
> >> We can't unconditionally eliminate the sym versions file just because it 
> >> doesn't work on Solaris.   The proper solution would be to detect 
> >> support for it in configure and then conditionally add the proper LDFLAG.
> >>     
> > 
> > I can try to rework this patch if it is necessary.
> >
> >   
> >> Regards,
> >>
> >> Anthony Liguori
> >>
> >>     
> >>> Can I commit? My sourceforge id is 'nonsea'.
> >>>
> >>> Thanks,
> >>> Halton.
> >>>
> >>>
> >>>   
> >>> ------------------------------------------------------------------------
> >>>
> >>> -------------------------------------------------------------------------
> >>> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
> >>> Register now and save $200. Hurry, offer ends at 11:59 p.m., 
> >>> Monday, April 7! Use priority code J8TLD2. 
> >>> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> >>> ------------------------------------------------------------------------
> >>>
> >>> _______________________________________________
> >>> Gtk-vnc-devel mailing list
> >>> Gtk-vnc-devel lists sourceforge net
> >>> https://lists.sourceforge.net/lists/listinfo/gtk-vnc-devel
> >>>       
> >> -------------------------------------------------------------------------
> >> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
> >> Don't miss this year's exciting event. There's still time to save $100. 
> >> Use priority code J8TL2D2. 
> >> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> >> _______________________________________________
> >> Gtk-vnc-devel mailing list
> >> Gtk-vnc-devel lists sourceforge net
> >> https://lists.sourceforge.net/lists/listinfo/gtk-vnc-devel
> >>     
> >
> >   
> 
# HG changeset patch
# User halton judo
# Date 1208328624 -28800
# Node ID c805d9d1083fac991e33fb8201c3655784ef2ceb
# Parent  b7bbfb2b5a47fb9aa68165fccb31414a45c9891a
Fix bug solaris ld does not support --version-script, refer to
http://bugzilla.gnome.org/show_bug.cgi?id=503359

diff -r b7bbfb2b5a47 -r c805d9d1083f configure.ac
--- a/configure.ac	Sun Apr 06 17:44:38 2008 -0500
+++ b/configure.ac	Wed Apr 16 14:50:24 2008 +0800
@@ -87,6 +87,17 @@ AC_ARG_WITH(examples,
    *)      AC_MSG_ERROR([bad value ${withval} for examples option]) ;;
  esac],[withval=no])
 WITH_EXAMPLES=$withval
+
+ 
+dnl check ld support --version-script
+ld --help>/tmp/$$ 2>&1
+if `cat /tmp/$$|grep version-script>/dev/null 2>&1`; then
+LD_VERSION_SCRIPT_SUPPORT='--version-script=$(srcdir)/libgtk-vnc_sym.version'
+else
+LD_VERSION_SCRIPT_SUPPORT="export-symbols-regex 'vnc_'"
+fi
+rm /tmp/$$
+AC_SUBST(LD_VERSION_SCRIPT_SUPPORT)
 
 PKG_CHECK_MODULES(GTK, gtk+-2.0 >= $GTK_REQUIRED)
 AC_SUBST(GTK_CFLAGS)
diff -r b7bbfb2b5a47 -r c805d9d1083f src/Makefile.am
--- a/src/Makefile.am	Sun Apr 06 17:44:38 2008 -0500
+++ b/src/Makefile.am	Wed Apr 16 14:50:24 2008 +0800
@@ -9,7 +9,7 @@ libgtk_vnc_1_0_la_CFLAGS = @GTK_CFLAGS@ 
 			   @GTHREAD_CFLAGS@ @WARNING_CFLAGS@ \
 			   -DSYSCONFDIR=\""$(sysconfdir)"\" \
                            -DG_LOG_DOMAIN=\"gtk-vnc\"
-libgtk_vnc_1_0_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libgtk-vnc_sym.version \
+libgtk_vnc_1_0_la_LDFLAGS = -Wl, @LD_VERSION_SCRIPT_SUPPORT@ \
                             -version-info 0:1:0
 
 gtk_vnc_includedir = $(includedir)/gtk-vnc-1.0/


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