Re: linking with extern DLLs under Cygwin

2008-01-23 Thread Denis Chancogne
>
> Peter Rosin wrote:
>
> > It is not terribly hard to create those import libraries semi-
> > manually. dlltool can do most of the work. Is that not an
> > option for you?
>
> That or simply a symlink libfoo.dll.a -> ../bin/cygfoo-n.dll.
>
> In the official Cygwin distro all devel packages contain import libs, so
> I'd consider this a bug in the ICU package if it can't generate one.
> One can be created as a side effect of linking the DLL simply by adding
> -Wl,-out-implib,libfoo.dll.a.
>
> Brian
>

Thanks a lot for your quick response, I understand, this patch would do
nothing interesting and is dangerous.

Denis
___
http://lists.gnu.org/mailman/listinfo/libtool


Re: -prefer-pic

2008-01-23 Thread Olly Betts
On Mon, Jan 14, 2008 at 10:54:41PM +0100, Ralf Wildenhues wrote:
> Hello Olly,
> 
> * Olly Betts wrote on Thu, Jan 10, 2008 at 07:42:16PM CET:
> > The output from:
> > 
> > libtool --help --mode=compile
> > 
> > contains:
> > 
> >   -prefer-pic   try to building PIC objects only
> >   -prefer-non-pic   try to building non-PIC objects only
> > 
> > Firstly, that's poor grammar ("try to build" would be better).
> > 
> > Secondly, this seems to be the full extent of the documentation for
> > these options - searching the info manual for "-prefer" doesn't find
> > anything.  The NEWS file notes they were added in libtool 1.3d "to
> > control the generation of PIC/non-PIC code".
> 
> Firstly, a patch for both would be cool, and secondly, it's probably not
> documented because it doesn't work all that well.  ;-)

I'm happy to produce a patch for the first issue (though it might take
me a while to get to it as I'm in the throes of relocating to the other
side of the planet).

But I'm not clear on the details of what these options do, despite
peering at the source code, so I don't feel I can usefully write a patch
for the manual.  All I could really do currently is transcribe the
--help output into the manual!  If these options don't work very well,
it seems particularly important to mention the limitations.

> (Of course, the non-PIC code in shared issue is borked because of the
> deplibs_check_method war.  That should be revisited at some time and
> redone right.)

Sorry, I don't get the reference.  Googling for "deplibs_check_method
war" just finds your message.  The only page I found which seemed like
it might be relevant is this, but I'm not really following:

http://www.gnu.org/software/libtool/deplibs.html

The issue that caused me to be looking at these options in the first
place was someone linking a static library (built with libtool) into a
Python module.  As you're no doubt aware, that doesn't work at all on
many architectures (e.g. x86-64), and has drawbacks on some where it
does work (e.g.  on x86), so I wondered if libtool could easily be told
to build a static library with PIC code for this purpose.

Cheers,
Olly


___
http://lists.gnu.org/mailman/listinfo/libtool


Re: multilib dirs and ld.so

2008-01-23 Thread Peter O'Gorman
Ralf Wildenhues wrote:
> Hi Peter,
> 
> * Peter O'Gorman wrote on Mon, Jan 21, 2008 at 07:29:08PM CET:
>> I give up on trying to find fancy ways to set the paths, ok to apply
>> this to branch-1-5 (and similar for HEAD)?
> 
> I suppose, yes, but I guess some mention in the documentation would not
> be bad.

Committed these,
Thanks,
Peter
-- 
Peter O'Gorman
http://pogma.com
Index: ChangeLog
===
RCS file: /sources/libtool/libtool/ChangeLog,v
retrieving revision 1.1220.2.486
diff -u -r1.1220.2.486 ChangeLog
--- ChangeLog	21 Jan 2008 17:47:50 -	1.1220.2.486
+++ ChangeLog	24 Jan 2008 06:52:12 -
@@ -1,3 +1,9 @@
+2008-01-24  Peter O'Gorman  <[EMAIL PROTECTED]>
+
+	* libtool.m4 (sys_lib_search_path_spec, sys_lib_dlsearch_path_spec):
+	Allow for a cache variable lt_cv_sys_lib... to set these at configure
+	time.
+
 2008-01-21  Peter O'Gorman  <[EMAIL PROTECTED]>
 
 	* ltmain.in [darwin]: look in libdir for dependent libraries, the .la
Index: libtool.m4
===
RCS file: /sources/libtool/libtool/Attic/libtool.m4,v
retrieving revision 1.314.2.192
diff -u -r1.314.2.192 libtool.m4
--- libtool.m4	11 Jan 2008 19:15:57 -	1.314.2.192
+++ libtool.m4	24 Jan 2008 06:52:16 -
@@ -1817,6 +1817,13 @@
 AC_MSG_RESULT([$dynamic_linker])
 test "$dynamic_linker" = no && can_build_shared=no
 
+AC_CACHE_VAL([lt_cv_sys_lib_search_path_spec],
+[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"])
+sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+AC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec],
+[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"])
+sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+
 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
 if test "$GCC" = yes; then
   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
? compiler_search.patch
Index: ChangeLog
===
RCS file: /sources/libtool/libtool/ChangeLog,v
retrieving revision 1.2567
diff -u -r1.2567 ChangeLog
--- ChangeLog	24 Jan 2008 04:08:37 -	1.2567
+++ ChangeLog	24 Jan 2008 06:54:22 -
@@ -1,3 +1,10 @@
+2008-01-24  Peter O'Gorman  <[EMAIL PROTECTED]>
+
+	* libltdl/m4/libtool.m4 (sys_lib_search_path_spec, 
+	sys_lib_dlsearch_path_spec): Allow for a cache variable 
+	lt_cv_sys_lib_... to set these at configure time.
+	* doc/notes.texi: Short note about the above change.
+
 2008-01-24  Eric Blake  <[EMAIL PROTECTED]>
 
 	Add proper quoting to doc examples.
Index: doc/notes.texi
===
RCS file: /sources/libtool/libtool/doc/notes.texi,v
retrieving revision 1.4
diff -u -r1.4 notes.texi
--- doc/notes.texi	14 Jan 2008 21:34:19 -	1.4
+++ doc/notes.texi	24 Jan 2008 06:54:22 -
@@ -67,4 +67,14 @@
 to use autoconf-mode, which is distributed with GNU Emacs 21, Autoconf itself,
 and all recent releases of XEmacs.
 
[EMAIL PROTECTED]
+When building on some linux systems for multilib targets
[EMAIL PROTECTED] sometimes guesses the wrong paths that the linker
+and dynamic linker search by default. If this occurs, you may override
+libtool's guesses at @command{configure} time by setting the
[EMAIL PROTECTED] cache variables
[EMAIL PROTECTED] and
[EMAIL PROTECTED] respectively to the correct search
+paths.
+
 @end itemize
Index: libltdl/m4/libtool.m4
===
RCS file: /sources/libtool/libtool/libltdl/m4/libtool.m4,v
retrieving revision 1.130
diff -u -r1.130 libtool.m4
--- libltdl/m4/libtool.m4	16 Jan 2008 14:49:40 -	1.130
+++ libltdl/m4/libtool.m4	24 Jan 2008 06:54:27 -
@@ -2663,6 +2663,13 @@
 if test "$GCC" = yes; then
   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
 fi
+ 
+AC_CACHE_VAL([lt_cv_sys_lib_search_path_spec],
+[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"])
+sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+AC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec],
+[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"])
+sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
 
 _LT_DECL([], [variables_saved_for_relink], [1],
 [Variables whose values should be saved in libtool wrapper scripts and
___
http://lists.gnu.org/mailman/listinfo/libtool