Re: ld-output-def

2009-04-03 Thread Ralf Wildenhues
* Simon Josefsson wrote on Thu, Apr 02, 2009 at 05:24:54PM CEST: > > As far as I could tell, the pr-msvc-support branch is for building > shared libraries using Visual Studio. Is that right? Yes. > If so, that isn't what lib-msvc-compat is meant to help with: > lib-msvc-compat is for building a

Re: ld-output-def

2009-04-02 Thread Simon Josefsson
Ralf Wildenhues writes: > * Simon Josefsson wrote on Wed, Apr 01, 2009 at 06:50:07AM CEST: >> Bruno Haible writes: >> > Your documented example looks like this: >> > >> >> +if HAVE_LD_OUTPUT_DEF >> >> +libfoo_la_LDFLAGS += -Wl,--output-def,libfoo-$(SOVERSION).def >> >> +defexecdir = $(bindir) >>

Re: ld-output-def

2009-04-01 Thread Bruno Haible
Simon Josefsson wrote: > Ok, I have pushed the patch below. > > + Rename ld-version-script to lib-symbol-versions. Thanks. I renamed likewise: 2009-04-01 Bruno Haible Rename module 'visibility'. * modules/lib-symbol-visibility: Renamed from modules/visibility. *

Re: ld-output-def

2009-04-01 Thread Ralf Wildenhues
* Simon Josefsson wrote on Wed, Apr 01, 2009 at 06:50:07AM CEST: > Bruno Haible writes: > > Your documented example looks like this: > > > >> +if HAVE_LD_OUTPUT_DEF > >> +libfoo_la_LDFLAGS += -Wl,--output-def,libfoo-$(SOVERSION).def > >> +defexecdir = $(bindir) > >> +defexec_DATA = libfoo-$(SOVERS

Re: ld-output-def

2009-04-01 Thread Simon Josefsson
Eric Blake writes: > According to Simon Josefsson on 4/1/2009 9:30 AM: >>> Even though Posix says this should silently return non-zero exit status, >>> some test implementations complain to stderr if the argument starts with >>> something that looks like an operator or option. Hence, any time yo

Re: ld-output-def

2009-04-01 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Simon Josefsson on 4/1/2009 9:30 AM: >> Even though Posix says this should silently return non-zero exit status, >> some test implementations complain to stderr if the argument starts with >> something that looks like an operator or option

Re: ld-output-def

2009-04-01 Thread Simon Josefsson
Eric Blake writes: > According to Simon Josefsson on 4/1/2009 8:14 AM: >> Thanks. Is there some way to systematically find these? A m4 code >> validator or similar? > > Unfortunately, not that I know of. So the best we can do is repeatedly > remind people to follow the autoconf rule of thumb:

Re: ld-output-def

2009-04-01 Thread Simon Josefsson
I pushed the following since there weren't any objections to adding the module. I believe the patch address most if not all comments so far. Thanks for all the comments! Further review is still appreciated. /Simon >From 68f982e01be79f241a306e1dd7328fa1f307ab0c Mon Sep 17 00:00:00 2001 From: Sim

Re: ld-output-def

2009-04-01 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Simon Josefsson on 4/1/2009 8:14 AM: > Thanks. Is there some way to systematically find these? A m4 code > validator or similar? Unfortunately, not that I know of. So the best we can do is repeatedly remind people to follow the autocon

Re: ld-output-def

2009-04-01 Thread Simon Josefsson
Eric Blake writes: > According to Simon Josefsson on 4/1/2009 7:38 AM: >> AM_CONDITIONAL(HAVE_LD_OUTPUT_DEF, test "$gl_cv_ld_output_def" = "yes") > > You still missed the m4 quoting. Thanks. Is there some way to systematically find these? A m4 code validator or similar? > And now that the c

Re: ld-output-def

2009-04-01 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Simon Josefsson on 4/1/2009 7:38 AM: > AM_CONDITIONAL(HAVE_LD_OUTPUT_DEF, test "$gl_cv_ld_output_def" = "yes") You still missed the m4 quoting. And now that the cache can provide a value, you should protect against a user that inserts

Re: ld-output-def

2009-04-01 Thread Simon Josefsson
Eric Blake writes: > According to Simon Josefsson on 3/31/2009 10:56 PM: >> AC_MSG_RESULT($gl_output_def) >> LDFLAGS="$gl_ldflags_save" >> fi >> AM_CONDITIONAL(HAVE_LD_OUTPUT_DEF, test "$gl_output_def" = "yes") > > Still missing m4 quoting. On the other hand, shell quotes around yes

Re: ld-output-def

2009-04-01 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Simon Josefsson on 3/31/2009 10:56 PM: > AC_MSG_RESULT($gl_output_def) > LDFLAGS="$gl_ldflags_save" > fi > AM_CONDITIONAL(HAVE_LD_OUTPUT_DEF, test "$gl_output_def" = "yes") Still missing m4 quoting. On the other hand, shell q

Re: ld-output-def

2009-03-31 Thread Simon Josefsson
Here is an updated patch. Thoughts? /Simon >From cb86aabc84146a5205d5ea88b3f067d893810a1d Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Wed, 1 Apr 2009 07:31:49 +0200 Subject: [PATCH] Add new module lib-msvc-compat. --- MODULES.html.sh |1 + doc/gnulib.texi |3 +

Re: ld-output-def

2009-03-31 Thread Simon Josefsson
Bruno Haible writes: > OK, now we know why your module is useful. Please please mention these > alternatives and why they suck in the documentation. Good idea -- I learned something from this, and it is useful to document why we use a particular solution. It may be that there are alternatives t

Re: ld-output-def

2009-03-31 Thread Simon Josefsson
Bruno Haible writes: > Hi Simon, > >> I kind of prefer the lib-* prefix because I think this is only ever >> relevant for libraries. That makes the name longer though. Do we need >> the -symbol- infix? > > Without the -symbol- infix, 'lib-versions' makes me think about the > library versions (a

Re: ld-output-def

2009-03-31 Thread Simon Josefsson
Ralf Wildenhues writes: > Hi Simon, > > a couple of nits: Many thanks! Updated script below, it will be part of an updated patch soon. /Simon # ld-msvc-compat.m4 serial 1 dnl Copyright (C) 2008, 2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation d

Re: ld-output-def

2009-03-31 Thread Simon Josefsson
Bruno Haible writes: > Hi Simon, Ralf, > > Your documented example looks like this: > >> +if HAVE_LD_OUTPUT_DEF >> +libfoo_la_LDFLAGS += -Wl,--output-def,libfoo-$(SOVERSION).def >> +defexecdir = $(bindir) >> +defexec_DATA = libfoo-$(SOVERSION).def >> +DISTCLEANFILES += $(defexec_DATA) >> +endif >

Re: ld-output-def

2009-03-31 Thread Bruno Haible
Hi Simon, Ralf, Your documented example looks like this: > +if HAVE_LD_OUTPUT_DEF > +libfoo_la_LDFLAGS += -Wl,--output-def,libfoo-$(SOVERSION).def > +defexecdir = $(bindir) > +defexec_DATA = libfoo-$(SOVERSION).def > +DISTCLEANFILES += $(defexec_DATA) > +endif What is $(SOVERSION) ? As I underst

Re: ld-output-def

2009-03-31 Thread Bruno Haible
Hi Simon, > I kind of prefer the lib-* prefix because I think this is only ever > relevant for libraries. That makes the name longer though. Do we need > the -symbol- infix? Without the -symbol- infix, 'lib-versions' makes me think about the library versions (a.k.a. library soname) and libtool'

Re: ld-output-def

2009-03-31 Thread Ralf Wildenhues
Hi Simon, a couple of nits: * Simon Josefsson wrote on Tue, Mar 31, 2009 at 12:01:06PM CEST: > --- /dev/null > +++ b/m4/ld-output-def.m4 > +# gl_LD_OUTPUT_DEF() > +# - > +# Check if linker supports -Wl,--output-def and define automake > +# conditional HAVE_LD_OUTPUT_DEF if it is. > +

Re: ld-output-def

2009-03-31 Thread Simon Josefsson
Bruno Haible writes: > Hi Simon, > >> How about this module? I use something similar in many of my projects. >> For an example of when a *.def file is useful, see "Using the GnuTLS DLL >> from your Visual Studio program" on . > > Again, I advocate for a module n

Re: ld-output-def

2009-03-31 Thread Bruno Haible
PS: > 1) Let the distributor of the DLL ship a .def file; this is what you > are advocating. > 2) Let the user create the .def file, using the Microsoft DUMPBIN > tool [1]. > 3) Let the user create the .def file, using the 'impdef' tool. [2] And 4) Let the user create the .def file

Re: ld-output-def

2009-03-31 Thread Bruno Haible
Hi Simon, > How about this module? I use something similar in many of my projects. > For an example of when a *.def file is useful, see "Using the GnuTLS DLL > from your Visual Studio program" on . Again, I advocate for a module name that makes people understand