libtool-patches
[Top][All Lists]
Advanced

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

Re: MinGW & library_names


From: Peter O'Gorman
Subject: Re: MinGW & library_names
Date: Sun, 03 Oct 2004 00:04:03 +0900
User-agent: Mozilla Thunderbird 0.7.3 (Macintosh/20040803)

Bob Friesenhahn wrote:

Which file/line should I look at in order to expediently implement a solution to only pass the .a file to the correct loader?

Does this help any?

Peter
--
Peter O'Gorman - http://www.pogma.com
? -p
? .cvsapplynum
? .gdb_history
? .patch_number
? 1-peter-extramodcmds.patch
? 1-peter-oldstriplib.patch
? 1-peter-tilde_in_path.patch
? 1-peter-tilde_in_path1.patch
? 10-peter-func_style.patch
? 10-peter-shrext_cmds.patch
? 100-peter-backup-changes.diff
? 11-peter-linkorder.patch
? 12-peter-darwin-xlc.patch
? 13-peter-test-correct-compiler.patch
? 14-peter-loader-dyld-fixes.patch
? 15-peter-fast-bsd-cmdlen.patch
? 16-peter-frameworks.patch
? 16-peter-inherited_linker_flags.patch
? 17-peter-xlc_pass_tests.patch
? 18-peter-make-dist-work.patch
? 19-peter-am_makeflags.patch
? 2-peter-zsh_early_config_status.patch
? 20-peter-fat_darwin_ar_x.patch
? 21-peter-badincludes.patch
? 22-peter-modified_darwin_fat_arch.patch
? 23-peter-cdpathagain.patch
? 24-peter-onlyonemodulevar.patch
? 25-peter-replacecomments.patch
? 26-peter-cachedsed.patch
? 27-peter-no-all_load.patch
? 28-peter-jakemsr.patch
? 29-peter-config_shell.patch
? 3-peter-zshsucks.patch
? 30-peter-nodyld_darwin8.patch
? 31-peter-darwin_couplet.patch
? 32-peter-darwin_dylib_file.patch
? 33-peter-harderf77tests.patch
? 34-peter-harderf77tests.patch
? 35-peter-harderf77tests.patch
? 36-peter-tigermod.patch
? 37-peter-tigermod.patch
? 38-peter-extraquote.patch
? 39-peter-substgrep.patch
? 4-peter-bloofyhell.patch
? 4-peter-darwin_libnames.patch
? 4-peter-zsh_ls_fix.patch
? 40-peter-darwindevnulls.patch
? 41-peter-darwinstripold.patch
? 42-peter-no_echo_gcc_v_try_2.patch
? 5-peter-zsh_cdpath_fix.patch
? 6-peter-quote_zsh_version.patch
? 7-peter-dontbuiltingench.patch
? 8-peter-noframeworks.patch
? 9-peter-infertagssucks.patch
? __.SYMDEF SORTED
? bloofy_crap_diff.patch
? bob-mingw.patch
? btrlt
? ch.log
? check1.log
? check_gcc.log
? configure.test
? cookiefile
? cp
? d
? darwin_20040812.diff
? darwincrap.ltmain.diff
? diff.diff
? diff1.diff
? fat-darwin-diffs.diff
? fix-shrext.diff
? foo
? ktrace.out
? ld_hardcode_libpath.patch
? libtool-1.5a
? libtool-1.5a.tar.bz2
? libtool-1.5a.tar.gz
? ltfatfunc
? ltmain.my.in
? mdemo-dryrun.patch
? my.diff
? my0730.diff
? my1.diff
? myframeworkworks2.diff
? named-non-ranlibbed-ar
? nodyldondarwin.diff
? real-12.diff
? rozinante.opendarwin.org
? config/config.guess
? config/config.sub
? m4/libtool.m4.darwin.cleaner
? tests/ch.log
? tests/check1.log
? tests/foo12.cpp
? tests/f77demo/ktrace.out
? tests/f77demo/libfoof.dylib
? tests/f77demo/out.jpg
? tests/mdemo/b.log
? tests/mdemo/build.log
? tests/mdemo/foo~1.c
? tests/mdemo/my.log
? tests/tagdemo/.in
Index: libltdl/ltdl.c
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/ltdl.c,v
retrieving revision 1.217
diff -u -3 -p -u -r1.217 ltdl.c
--- libltdl/ltdl.c      1 Oct 2004 10:24:18 -0000       1.217
+++ libltdl/ltdl.c      2 Oct 2004 15:03:04 -0000
@@ -116,7 +116,8 @@ static      int     trim                  (char **dest, con
 static int     try_dlopen            (lt_dlhandle *handle,
                                       const char *filename);
 static int     tryall_dlopen         (lt_dlhandle *handle,
-                                      const char *filename);
+                                      const char *filename,
+                                      const char *loader_name);
 static int     unload_deplibs        (lt_dlhandle handle);
 static int     lt_argz_insert        (char **pargz, size_t *pargz_len,
                                       char *before, const char *entry);
@@ -301,7 +302,7 @@ lt_dlexit (void)
 }
 
 static int
-tryall_dlopen (lt_dlhandle *phandle, const char *filename)
+tryall_dlopen (lt_dlhandle *phandle, const char *filename, const char 
*loader_name)
 {
   lt__handle * handle          = (lt__handle *) handles;
   const char * saved_error     = 0;
@@ -357,7 +358,22 @@ tryall_dlopen (lt_dlhandle *phandle, con
   {
     const lt_dlvtable *vtable = 0;
     lt_dlloader *loader = 0;
-
+       if ( NULL != loader_name)
+       {
+         if (NULL != (vtable = lt_dlloader_find(loader_name)))
+         {
+                 handle->module = (*vtable->module_open) 
(vtable->dlloader_data,
+                                                                               
                   filename);
+                 if (handle->module != 0)
+                       {
+                         handle->vtable = vtable;
+                         goto done;
+                 }
+         }
+         FREE (handle->info.filename);
+         ++errors;
+         goto done;
+       }
     while ((loader = lt_dlloader_next (loader)))
       {
        vtable = lt_dlloader_get (loader);
@@ -426,7 +442,7 @@ tryall_dlopen_module (lt_dlhandle *handl
       error += tryall_dlopen_module (handle,
                                     (const char *) 0, prefix, filename);
     }
-  else if (tryall_dlopen (handle, filename) != 0)
+  else if (tryall_dlopen (handle, filename, NULL) != 0)
     {
       ++error;
     }
@@ -442,7 +458,7 @@ find_module (lt_dlhandle *handle, const 
   /* Try to open the old library first; if it was dlpreopened,
      we want the preopened version of it, even if a dlopenable
      module is available.  */
-  if (old_name && tryall_dlopen (handle, old_name) == 0)
+  if (old_name && tryall_dlopen (handle, old_name,"lt_preopen") == 0)
     {
       return 0;
     }
@@ -684,7 +700,7 @@ find_handle_callback (char *filename, vo
 
   /* Try to dlopen the file, but do not continue searching in any
      case.  */
-  if (tryall_dlopen (handle, filename) != 0)
+  if (tryall_dlopen (handle, filename, NULL) != 0)
     *handle = 0;
 
   return 1;
@@ -942,7 +958,7 @@ try_dlopen (lt_dlhandle *phandle, const 
       /* lt_dlclose()ing yourself is very bad!  Disallow it.  */
       LT_DLSET_FLAG (*phandle, LT_DLRESIDENT_FLAG);
 
-      if (tryall_dlopen (&newhandle, 0) != 0)
+      if (tryall_dlopen (&newhandle, 0, NULL) != 0)
        {
          FREE (*phandle);
          return 1;
@@ -1263,7 +1279,7 @@ try_dlopen (lt_dlhandle *phandle, const 
 #endif
                   )))
        {
-          if (tryall_dlopen (&newhandle, filename) != 0)
+          if (tryall_dlopen (&newhandle, filename, NULL) != 0)
             {
               newhandle = NULL;
             }

reply via email to

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