]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* NEWS: mention fixes
authorThomas Tanner <tanner@ffii.org>
Tue, 24 Aug 1999 11:05:14 +0000 (11:05 +0000)
committerThomas Tanner <tanner@gmx.de>
Tue, 24 Aug 1999 11:05:14 +0000 (11:05 +0000)
* doc/PLATFORMS: GNU/Hurd update
* depdemo: make use of variables
* ltconfig.in: use CC -E when checking for ELF support
  on NetBSD (reported by Todd Vierling <tv@pobox.com>),
  replace all occurences of 'linkopts' with 'linker_flags'
* ltmain.in: move ltdll.c and impgen.c to ltconfig.in and
  only add them to the libtool script if it's necessary

* ltconfig.in: add support for UnixWare 7.X.X
* doc/PLATFORMS: add new platforms

* doc/libtool.texi: document use of noinst_LTLIBRARIES for
  convenience libraries

* ltconfig.in: check for freebsdelf3, not just freebsd3.
Set hardcode_into_libs=yes for FreeBSD 3.0 and 3.1

* ltmain.in: enable workaround for freebsdelf3.0

* ltconfig.in: export_dynamic_flag_spec is -rdynamic on BSD/OS

ChangeLog
NEWS
depdemo/l1/l1.c
depdemo/l2/l2.c
depdemo/l3/l3.c
depdemo/l4/l4.c
depdemo/main.c
doc/PLATFORMS
doc/libtool.texi
ltconfig.in
ltmain.in

index 16105acaaf3e6e31f525a1c552f421d0bb43f836..6825d33280de1e110f94d8248c3ca32ea9ddc429 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,33 @@
+1999-08-24  Thomas Tanner  <tanner@ffii.org>
+
+       * NEWS: mention fixes
+       * doc/PLATFORMS: GNU/Hurd update
+       * depdemo: make use of variables
+       * ltconfig.in: use CC -E when checking for ELF support
+         on NetBSD (reported by Todd Vierling <tv@pobox.com>),
+         replace all occurences of 'linkopts' with 'linker_flags'
+       * ltmain.in: move ltdll.c and impgen.c to ltconfig.in and
+         only add them to the libtool script if it's necessary
+
+1999-08-24  Boyd Gerber  <gerberb@zenez.com>
+
+       * ltconfig.in: add support for UnixWare 7.X.X
+       * doc/PLATFORMS: add new platforms
+
+1999-08-24  Pavel Roskin  <pavel_roskin@geocities.com>
+
+       * doc/libtool.texi: document use of noinst_LTLIBRARIES for
+         convenience libraries
+       
+       * ltconfig.in: check for freebsdelf3, not just freebsd3.
+       Set hardcode_into_libs=yes for FreeBSD 3.0 and 3.1
+
+       * ltmain.in: enable workaround for freebsdelf3.0
+
+1999-08-24  Bert Driehuis  <bert_driehuis@nl.compuware.com>
+
+       * ltconfig.in: export_dynamic_flag_spec is -rdynamic on BSD/OS
+
 1999-08-07  Alexandre Oliva  <oliva@dcc.unicamp.br>
 
        * libltdl/COPYING.LIB: Update to version 2.1.
diff --git a/NEWS b/NEWS
index d60136429714a39df43c55198059726c76f8d612..b415b90225bc68846b5a77fb30bac006a2e0e2ad 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,7 +2,7 @@ NEWS - list of user-visible changes between releases of GNU Libtool
 
 New in 1.3d: 1999-??-??; CVS version 1.3c, Libtool team:
 * Start of support code for cross-compiling to win32.
-* Improved support for mingw32.
+* Improved support for mingw32, NetBSD, FreeBSD and Unixware.
 * New --with-pic flag to control the generation of PIC/non-PIC code.
 * New --build flag to ltconfig to help with build cross compilation
   environments is inherited from --build flag passed to configure.
index af035a75a6b34f2fb8f9c14f3a4308dff47f68d5..ba2fa7734080f15bf6a03c3e025132da8f439972 100644 (file)
@@ -20,16 +20,17 @@ USA. */
 #include "l1/l1.h"
 #include <stdio.h>
 
-int    var_l1;
+int    var_l1 = 0;
 
 int
 func_l1(indent)
     int indent;
 {
   int i;
-  
+
   for (i = 0; i < indent; i++)
     putchar(' ');
-  printf("l1\n");
+  printf("l1 (%i)\n", var_l1);
+  var_l1++;
   return 0; 
 }
index c6f18338cb0fda1887576e933a897bcda44b6843..555d0688fe61d072b35a8899f33ed3b57223f9d4 100644 (file)
@@ -22,17 +22,18 @@ USA. */
 #include "l1/l1.h"
 #include <stdio.h>
 
-int    var_l2;
+int    var_l2 = 0;
 
 int
 func_l2(indent)
     int indent;
 {
   int i;
-  
+
   for (i = 0; i < indent; i++)
     putchar(' ');
-  printf("l2\n");
+  printf("l2 (%i)\n", var_l2);
   func_l1(indent+1);
+  var_l2 += var_l1;
   return 0; 
 }
index 50ca3be9403a9b7d9eb4df71683dac5db7db0134..de75bd6f3ecfb8368b9c40d9a61eedf2cec93ab2 100644 (file)
@@ -23,18 +23,19 @@ USA. */
 #include "l2/l2.h"
 #include <stdio.h>
 
-int    var_l3;
+int    var_l3 = 0;
 
 int
 func_l3(indent)
     int indent;
 {
   int i;
-  
+
   for (i = 0; i < indent; i++)
     putchar(' ');
-  printf("l3\n");
+  printf("l3 (%i)\n", var_l3);
   func_l1(indent+1);
   func_l2(indent+1);
+  var_l3 += var_l1 + var_l2;
   return 0; 
 }
index a27ec7b71caf6997ba553136ab0c6b60e92f1e06..d99d0200e04d98ef03b419643d985e51ce6f4182 100644 (file)
@@ -26,20 +26,21 @@ USA. */
 #include <math.h>
 #endif
 
-int    var_l4;
+int    var_l4 = 0;
 
 int
 func_l4(indent)
     int indent;
 {
   int i;
-  
+
   for (i = 0; i < indent; i++)
     putchar(' ');
-  printf("l4\n");
+  printf("l4 (%i)\n", var_l4);
   func_l3(indent+1);
   for (i = 0; i <= indent; i++)
     putchar(' ');
   printf("libm [sin(1.5) = %f]\n", sin(1.5));
+  var_l4 += var_l3;
   return 0; 
 }
index 1157cc3e1015d14a86de53ff66c42f6c732d41d6..6940b624beda1299f27736bfa3facf0077b1bb69 100644 (file)
@@ -32,5 +32,7 @@ main (argc,argv)
   func_l1(0);
   func_l2(0);
   func_l4(0);
+  if (var_l1 + var_l2 + var_l4 != 20)
+       return 1;
   return 0;
 }
index 6f8a5d8584bc2f5ca3aca991b1b04194e93910d9..35be8bdfeded97b67db25f42fb2de0026e702e6d 100644 (file)
@@ -45,7 +45,7 @@ i*86-*-freebsd2.2.8             gcc      1.3c     ok
 i*86-*-freebsd2.2.6             gcc      1.3b     ok
   (egcs-1.1 & gcc-2.7.2.1, native ld)
 i*86-*-freebsd2.1.5             gcc      0.5      ok
-i*86-*-gnu                      gcc      1.3.3    ok
+i*86-*-gnu                      gcc      1.3c     ok (1.602)
 i*86-*-netbsd1.4                gcc      1.3c     ok
   (egcs-1.1.1)
 i*86-*-netbsd1.3.3              gcc      1.3c     ok
@@ -68,6 +68,14 @@ i*86-*-solaris2.5.1             gcc      1.2f     ok
 i*86-ncr-sysv4.3.03             gcc      1.2f     ok
 i*86-ncr-sysv4.3.03             cc       1.2e     ok
   (cc -Hnocopyr)
+i*86-pc-sco3.2v5.0.5           cc       1.3c     ok
+i*86-pc-sco3.2v5.0.5           gcc      1.3c     ok
+  (gcc 95q4c)
+i*86-pc-sco3.2v5.0.5           gcc      1.3c     ok
+  (egcs-1.1.2)
+i*86-UnixWare7.1.0-sysv5       cc       1.3c     ok
+i*86-UnixWare7.1.0-sysv5       gcc      1.3c     ok
+  (egcs-1.1.1)
 m68k-next-nextstep3             gcc      1.2f     NS
 m68k-sun-sunos4.1.1             gcc      1.2f     NS
   (gcc-2.5.7)
index c9a6b411980b2cdef18338d7ad2dfec39b7939be..dedd9491e0e66c9b7628dd1e802b17b7e12b9a55 100644 (file)
@@ -1025,6 +1025,10 @@ libraries.  But be careful not to link a single convenience library,
 directly or indirectly, into a single program or library, otherwise you
 may get errors about symbol redefinitions.
 
+When GNU automake is used, you should use @code{noinst_LTLIBRARIES}\r
+instead of @code{lib_LTLIBRARIES} for convenience libraries, so that\r
+the @samp{-rpath} option is not passed when they are linked.\r
+\r
 As a rule of thumb, link a libtool convenience library into at most one
 libtool library, and never into a program, and link libtool static
 convenience libraries only into programs, and only if you need to carry
index 13631fb4a5d30d846206178e591ede766a62745d..02c04f92a93acd7a6da086ca88007cb6bafdc41a 100755 (executable)
@@ -1337,7 +1337,7 @@ EOF
       allow_undefined_flag=unsupported
       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
       # support --undefined.  This deserves some investigation.  FIXME
-      archive_cmds='$CC -nostart $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
+      archive_cmds='$CC -nostart $libobjs $deplibs $linker_flags ${wl}-soname $wl$soname -o $lib'
     else
       ld_shlibs=no
     fi
@@ -1408,12 +1408,11 @@ EOF
     ;;
 
   netbsd*)
-    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
     else
       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
-      # can we support soname and/or expsyms with a.out? -oliva
     fi
     ;;
 
@@ -1431,8 +1430,8 @@ EOF
 
 EOF
     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
-      archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
-      archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      archive_cmds='$CC -shared $libobjs $deplibs $linker_flags ${wl}-soname $wl$soname -o $lib'
+      archive_expsym_cmds='$CC -shared $libobjs $deplibs $linker_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
     else
       ld_shlibs=no
     fi
@@ -1707,6 +1706,12 @@ else
     fi
     ;;
 
+  unixware7* | sysv5*)
+    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+    runpath_var='LD_RUN_PATH'
+    hardcode_shlibpath_var=no
+    ;;
+
   *)
     ld_shlibs=no
     ;;
@@ -1836,6 +1841,7 @@ bsdi4*)
   file_magic_test_file=/shlib/libc.so
   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  export_dynamic_flag_spec=-rdynamic
   # the default ld.so.conf also contains /usr/contrib/lib and
   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
   # libtool to hard-code these into programs
@@ -1881,9 +1887,13 @@ freebsd*)
   esac
   shlibpath_var=LD_LIBRARY_PATH
   case "$host_os" in
-  freebsd2* | freebsd3.[01]*)
+  freebsd2*)
     shlibpath_overrides_runpath=yes
     ;;
+  freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
   *) # from 3.2 on
     shlibpath_overrides_runpath=no
     hardcode_into_libs=yes
@@ -3170,6 +3180,186 @@ fi
 EOF
     ;;
   esac
+  case "$host" in
+  *-*-cygwin* | *-*-mingw* | *-*-os2*)
+    cat <<EOF >> "$ofile"
+      # This is a source program that is used to create dlls on Windows
+      # Don't remove nor modify the starting and closing comments
+# /* ltdll.c starts here */
+# #define WIN32_LEAN_AND_MEAN
+# #include <windows.h>
+# #undef WIN32_LEAN_AND_MEAN
+# #include <stdio.h>
+#
+# #ifndef __CYGWIN__
+# #  ifdef __CYGWIN32__
+# #    define __CYGWIN__ __CYGWIN32__
+# #  endif
+# #endif
+#
+# #ifdef __cplusplus
+# extern "C" {
+# #endif
+# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
+# #ifdef __cplusplus
+# }
+# #endif
+#
+# #ifdef __CYGWIN__
+# #include <cygwin/cygwin_dll.h>
+# DECLARE_CYGWIN_DLL( DllMain );
+# #endif
+# HINSTANCE __hDllInstance_base;
+#
+# BOOL APIENTRY
+# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
+# {
+#   __hDllInstance_base = hInst;
+#   return TRUE;
+# }
+# /* ltdll.c ends here */
+      # This is a source program that is used to create import libraries
+      # on Windows for dlls which lack them. Don't remove nor modify the
+      # starting and closing comments
+# /* impgen.c starts here */
+# /*   Copyright (C) 1999 Free Software Foundation, Inc.
+# 
+#  This file is part of GNU libtool.
+# 
+#  This program is free software; you can redistribute it and/or modify
+#  it under the terms of the GNU General Public License as published by
+#  the Free Software Foundation; either version 2 of the License, or
+#  (at your option) any later version.
+# 
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+# 
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#  */
+# 
+#  #include <stdio.h>          /* for printf() */
+#  #include <unistd.h>         /* for open(), lseek(), read() */
+#  #include <fcntl.h>          /* for O_RDONLY, O_BINARY */
+#  #include <string.h>         /* for strdup() */
+# 
+#  /* O_BINARY isn't required (or even defined sometimes) under Unix */
+#  #ifndef O_BINARY
+#  #define O_BINARY 0
+#  #endif
+#
+#  static unsigned int
+#  pe_get16 (fd, offset)
+#       int fd;
+#       int offset;
+#  {
+#    unsigned char b[2];
+#    lseek (fd, offset, SEEK_SET);
+#    read (fd, b, 2);
+#    return b[0] + (b[1]<<8);
+#  }
+# 
+#  static unsigned int
+#  pe_get32 (fd, offset)
+#      int fd;
+#      int offset;
+#  {
+#    unsigned char b[4];
+#    lseek (fd, offset, SEEK_SET);
+#    read (fd, b, 4);
+#    return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
+#  }
+# 
+#  static unsigned int
+#  pe_as32 (ptr)
+#       void *ptr;
+#  {
+#    unsigned char *b = ptr;
+#    return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
+#  }
+# 
+#  int
+#  main (argc, argv)
+#      int argc;
+#      char *argv[];
+#  {
+#      int dll;
+#      unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
+#      unsigned long export_rva, export_size, nsections, secptr, expptr;
+#      unsigned long name_rvas, nexp;
+#      unsigned char *expdata, *erva;
+#      char *filename, *dll_name;
+# 
+#      filename = argv[1];
+# 
+#      dll = open(filename, O_RDONLY|O_BINARY);
+#      if (!dll)
+#      return 1;
+# 
+#      dll_name = filename;
+#    
+#      for (i=0; filename[i]; i++)
+#      if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
+#          dll_name = filename + i +1;
+# 
+#      pe_header_offset = pe_get32 (dll, 0x3c);
+#      opthdr_ofs = pe_header_offset + 4 + 20;
+#      num_entries = pe_get32 (dll, opthdr_ofs + 92);
+# 
+#      if (num_entries < 1) /* no exports */
+#      return 1;
+# 
+#      export_rva = pe_get32 (dll, opthdr_ofs + 96);
+#      export_size = pe_get32 (dll, opthdr_ofs + 100);
+#      nsections = pe_get16 (dll, pe_header_offset + 4 +2);
+#      secptr = (pe_header_offset + 4 + 20 +
+#            pe_get16 (dll, pe_header_offset + 4 + 16));
+# 
+#      expptr = 0;
+#      for (i = 0; i < nsections; i++)
+#      {
+#      char sname[8];
+#      unsigned long secptr1 = secptr + 40 * i;
+#      unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
+#      unsigned long vsize = pe_get32 (dll, secptr1 + 16);
+#      unsigned long fptr = pe_get32 (dll, secptr1 + 20);
+#      lseek(dll, secptr1, SEEK_SET);
+#      read(dll, sname, 8);
+#      if (vaddr <= export_rva && vaddr+vsize > export_rva)
+#      {
+#          expptr = fptr + (export_rva - vaddr);
+#          if (export_rva + export_size > vaddr + vsize)
+#              export_size = vsize - (export_rva - vaddr);
+#          break;
+#      }
+#      }
+# 
+#      expdata = (unsigned char*)malloc(export_size);
+#      lseek (dll, expptr, SEEK_SET);
+#      read (dll, expdata, export_size);
+#      erva = expdata - export_rva;
+# 
+#      nexp = pe_as32 (expdata+24);
+#      name_rvas = pe_as32 (expdata+32);
+# 
+#      printf ("EXPORTS\n");
+#      for (i = 0; i<nexp; i++)
+#      {
+#      unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
+#      printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
+#      }
+# 
+#      return 0;
+#  }
+# /* impgen.c ends here */
+
+EOF
+    ;;
+  esac
+
 
   # Append the ltmain.sh script.
   sed '$q' "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1)
index 89de6c2d02649108dcd48027c0d5f103a792ae1e..60ee654774b8ac1838f98a02000c18407d2eb53c 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -512,7 +512,7 @@ compiler."
 
       # If we have no pic_flag, then copy the object into place and finish.
       if (test -z "$pic_flag" || test "$pic_mode" != default) &&
-         test "$build_old_libs" = yes; then
+        test "$build_old_libs" = yes; then
        # Rename the .lo from within objdir to obj
        if test -f $obj; then
          $show $rm $obj
@@ -649,179 +649,6 @@ compiler."
       # -no-undefined on the libtool link line when we can be certain
       # that all symbols are satisfied, otherwise we get a static library.
       allow_undefined=yes
-
-      # This is a source program that is used to create dlls on Windows
-      # Don't remove nor modify the starting and closing comments
-# /* ltdll.c starts here */
-# #define WIN32_LEAN_AND_MEAN
-# #include <windows.h>
-# #undef WIN32_LEAN_AND_MEAN
-# #include <stdio.h>
-#
-# #ifndef __CYGWIN__
-# #  ifdef __CYGWIN32__
-# #    define __CYGWIN__ __CYGWIN32__
-# #  endif
-# #endif
-#
-# #ifdef __cplusplus
-# extern "C" {
-# #endif
-# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
-# #ifdef __cplusplus
-# }
-# #endif
-#
-# #ifdef __CYGWIN__
-# #include <cygwin/cygwin_dll.h>
-# DECLARE_CYGWIN_DLL( DllMain );
-# #endif
-# HINSTANCE __hDllInstance_base;
-#
-# BOOL APIENTRY
-# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
-# {
-#   __hDllInstance_base = hInst;
-#   return TRUE;
-# }
-# /* ltdll.c ends here */
-      # This is a source program that is used to create import libraries
-      # on Windows for dlls which lack them. Don't remove nor modify the
-      # starting and closing comments
-# /* impgen.c starts here */
-# /*   Copyright (C) 1999 Free Software Foundation, Inc.
-# 
-#  This file is part of GNU libtool.
-# 
-#  This program is free software; you can redistribute it and/or modify
-#  it under the terms of the GNU General Public License as published by
-#  the Free Software Foundation; either version 2 of the License, or
-#  (at your option) any later version.
-# 
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-# 
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software
-#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#  */
-# 
-#  #include <stdio.h>          /* for printf() */
-#  #include <unistd.h>         /* for open(), lseek(), read() */
-#  #include <fcntl.h>          /* for O_RDONLY, O_BINARY */
-#  #include <string.h>         /* for strdup() */
-# 
-#  /* O_BINARY isn't required (or even defined sometimes) under Unix */
-#  #ifndef O_BINARY
-#  #define O_BINARY 0
-#  #endif
-#
-#  static unsigned int
-#  pe_get16 (fd, offset)
-#       int fd;
-#       int offset;
-#  {
-#    unsigned char b[2];
-#    lseek (fd, offset, SEEK_SET);
-#    read (fd, b, 2);
-#    return b[0] + (b[1]<<8);
-#  }
-# 
-#  static unsigned int
-#  pe_get32 (fd, offset)
-#      int fd;
-#      int offset;
-#  {
-#    unsigned char b[4];
-#    lseek (fd, offset, SEEK_SET);
-#    read (fd, b, 4);
-#    return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
-#  }
-# 
-#  static unsigned int
-#  pe_as32 (ptr)
-#       void *ptr;
-#  {
-#    unsigned char *b = ptr;
-#    return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
-#  }
-# 
-#  int
-#  main (argc, argv)
-#      int argc;
-#      char *argv[];
-#  {
-#      int dll;
-#      unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
-#      unsigned long export_rva, export_size, nsections, secptr, expptr;
-#      unsigned long name_rvas, nexp;
-#      unsigned char *expdata, *erva;
-#      char *filename, *dll_name;
-# 
-#      filename = argv[1];
-# 
-#      dll = open(filename, O_RDONLY|O_BINARY);
-#      if (!dll)
-#      return 1;
-# 
-#      dll_name = filename;
-#    
-#      for (i=0; filename[i]; i++)
-#      if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
-#          dll_name = filename + i +1;
-# 
-#      pe_header_offset = pe_get32 (dll, 0x3c);
-#      opthdr_ofs = pe_header_offset + 4 + 20;
-#      num_entries = pe_get32 (dll, opthdr_ofs + 92);
-# 
-#      if (num_entries < 1) /* no exports */
-#      return 1;
-# 
-#      export_rva = pe_get32 (dll, opthdr_ofs + 96);
-#      export_size = pe_get32 (dll, opthdr_ofs + 100);
-#      nsections = pe_get16 (dll, pe_header_offset + 4 +2);
-#      secptr = (pe_header_offset + 4 + 20 +
-#            pe_get16 (dll, pe_header_offset + 4 + 16));
-# 
-#      expptr = 0;
-#      for (i = 0; i < nsections; i++)
-#      {
-#      char sname[8];
-#      unsigned long secptr1 = secptr + 40 * i;
-#      unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
-#      unsigned long vsize = pe_get32 (dll, secptr1 + 16);
-#      unsigned long fptr = pe_get32 (dll, secptr1 + 20);
-#      lseek(dll, secptr1, SEEK_SET);
-#      read(dll, sname, 8);
-#      if (vaddr <= export_rva && vaddr+vsize > export_rva)
-#      {
-#          expptr = fptr + (export_rva - vaddr);
-#          if (export_rva + export_size > vaddr + vsize)
-#              export_size = vsize - (export_rva - vaddr);
-#          break;
-#      }
-#      }
-# 
-#      expdata = (unsigned char*)malloc(export_size);
-#      lseek (dll, expptr, SEEK_SET);
-#      read (dll, expdata, export_size);
-#      erva = expdata - export_rva;
-# 
-#      nexp = pe_as32 (expdata+24);
-#      name_rvas = pe_as32 (expdata+32);
-# 
-#      printf ("EXPORTS\n");
-#      for (i = 0; i<nexp; i++)
-#      {
-#      unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
-#      printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
-#      }
-# 
-#      return 0;
-#  }
-# /* impgen.c ends here */
       ;;
     *)
       allow_undefined=yes
@@ -3408,7 +3235,7 @@ static const void *lt_preloaded_setup() {
          # linked before any other PIC object.  But we must not use
          # pic_flag when linking with -static.  The problem exists in
          # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
-         *-*-freebsd2*|*-*-freebsd3.0*)
+         *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)\r
            case "$compile_command " in
            *" -static "*) ;;
            *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";;