libtool patch

Craig Dooley craig at xlnx-x.net
Tue Mar 30 08:04:40 PST 2004


Sorry, but I missed a couple cases in that last patch that was causing C++
to not build shared libraries.  Heres a new patch that fixes those cases.
I still would like feedback on this to send it to the gnu people.

-Craig
-- 
------------------------------------------------------------------------
Craig Dooley                                            craig at xxxxxxxxxx
------------------------------------------------------------------------
--- libtool-1.5.2/ltmain.sh	Sun Jan 25 07:40:26 2004
+++ libtool-1.5.2-modified/ltmain.sh	Fri Mar 26 10:25:36 2004
@@ -1335,7 +1335,7 @@
 	    # These systems don't actually have a C library (as such)
 	    test "X$arg" = "X-lc" && continue
 	    ;;
-	  *-*-openbsd* | *-*-freebsd*)
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
 	    # Do not include libc due to us having libc/libc_r.
 	    test "X$arg" = "X-lc" && continue
 	    ;;
@@ -1346,7 +1346,7 @@
 	  esac
 	elif test "X$arg" = "X-lc_r"; then
 	 case $host in
-	 *-*-openbsd* | *-*-freebsd*)
+	 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
 	   # Do not include libc_r directly, use -pthread flag.
 	   continue
 	   ;;
@@ -2904,7 +2904,7 @@
 	    age="$number_minor"
 	    revision="$number_revision"
 	    ;;
-	  freebsd-aout|freebsd-elf|sunos)
+	  freebsd-aout|freebsd-elf|dragonfly|sunos)
 	    current="$number_major"
 	    revision="$number_minor"
 	    age="0"
@@ -2984,6 +2984,11 @@
 	  versuffix=".$current";
 	  ;;
 
+	dragonfly)
+	  major=".$current"
+	  versuffix=".$current";
+	  ;;
+
 	irix | nonstopux)
 	  major=`expr $current - $age + 1`
 
@@ -3175,7 +3180,7 @@
 	  *-*-netbsd*)
 	    # Don't link with libc until the a.out ld.so is fixed.
 	    ;;
-	  *-*-openbsd* | *-*-freebsd*)
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
 	    # Do not include libc due to us having libc/libc_r.
 	    test "X$arg" = "X-lc" && continue
 	    ;;
--- libtool-1.5.2/libltdl/ltmain.sh	Sun Jan 25 07:40:26 2004
+++ libtool-1.5.2-modified/libltdl/ltmain.sh	Fri Mar 26 10:25:35 2004
@@ -1335,7 +1335,7 @@
 	    # These systems don't actually have a C library (as such)
 	    test "X$arg" = "X-lc" && continue
 	    ;;
-	  *-*-openbsd* | *-*-freebsd*)
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
 	    # Do not include libc due to us having libc/libc_r.
 	    test "X$arg" = "X-lc" && continue
 	    ;;
@@ -1346,7 +1346,7 @@
 	  esac
 	elif test "X$arg" = "X-lc_r"; then
 	 case $host in
-	 *-*-openbsd* | *-*-freebsd*)
+	 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
 	   # Do not include libc_r directly, use -pthread flag.
 	   continue
 	   ;;
@@ -2904,7 +2904,7 @@
 	    age="$number_minor"
 	    revision="$number_revision"
 	    ;;
-	  freebsd-aout|freebsd-elf|sunos)
+	  dragonfly|freebsd-aout|freebsd-elf|sunos)
 	    current="$number_major"
 	    revision="$number_minor"
 	    age="0"
@@ -2980,6 +2980,11 @@
 	  ;;
 
 	freebsd-elf)
+	  major=".$current"
+	  versuffix=".$current";
+	  ;;
+
+	dragonfly)
 	  major=".$current"
 	  versuffix=".$current";
 	  ;;
--- libtool-1.5.2/ltmain.in	Sun Jan 25 01:50:41 2004
+++ libtool-1.5.2-modified/ltmain.in	Fri Mar 26 10:25:36 2004
@@ -1335,7 +1335,7 @@
 	    # These systems don't actually have a C library (as such)
 	    test "X$arg" = "X-lc" && continue
 	    ;;
-	  *-*-openbsd* | *-*-freebsd*)
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
 	    # Do not include libc due to us having libc/libc_r.
 	    test "X$arg" = "X-lc" && continue
 	    ;;
@@ -1346,7 +1346,7 @@
 	  esac
 	elif test "X$arg" = "X-lc_r"; then
 	 case $host in
-	 *-*-openbsd* | *-*-freebsd*)
+	 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
 	   # Do not include libc_r directly, use -pthread flag.
 	   continue
 	   ;;
@@ -2904,7 +2904,7 @@
 	    age="$number_minor"
 	    revision="$number_revision"
 	    ;;
-	  freebsd-aout|freebsd-elf|sunos)
+	  freebsd-aout|freebsd-elf|dragonfly|sunos)
 	    current="$number_major"
 	    revision="$number_minor"
 	    age="0"
@@ -2984,6 +2984,11 @@
 	  versuffix=".$current";
 	  ;;
 
+	dragonfly)
+	  major=".$current"
+	  versuffix=".$current";
+	  ;;
+
 	irix | nonstopux)
 	  major=`expr $current - $age + 1`
 
@@ -3175,7 +3180,7 @@
 	  *-*-netbsd*)
 	    # Don't link with libc until the a.out ld.so is fixed.
 	    ;;
-	  *-*-openbsd* | *-*-freebsd*)
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
 	    # Do not include libc due to us having libc/libc_r.
 	    test "X$arg" = "X-lc" && continue
 	    ;;
--- libtool-1.5.2/libtool.m4	Fri Jan 23 01:07:04 2004
+++ libtool-1.5.2-modified/libtool.m4	Fri Mar 26 10:25:36 2004
@@ -1298,6 +1298,16 @@
   dynamic_linker='GNU ld.so'
   ;;
 
+dragonfly*)
+  version_type=dragonfly
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  need_version=no
+  need_lib_prefix=no
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
 freebsd*)
   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
   version_type=freebsd-$objformat
--- libtool-1.5.2-clean/ltmain.sh	Tue Mar 30 10:37:41 2004
+++ libtool-1.5.2-modified/ltmain.sh	Fri Mar 26 10:25:36 2004
@@ -1335,7 +1335,7 @@
 	    # These systems don't actually have a C library (as such)
 	    test "X$arg" = "X-lc" && continue
 	    ;;
-	  *-*-openbsd* | *-*-freebsd*)
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
 	    # Do not include libc due to us having libc/libc_r.
 	    test "X$arg" = "X-lc" && continue
 	    ;;
@@ -1346,7 +1346,7 @@
 	  esac
 	elif test "X$arg" = "X-lc_r"; then
 	 case $host in
-	 *-*-openbsd* | *-*-freebsd*)
+	 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
 	   # Do not include libc_r directly, use -pthread flag.
 	   continue
 	   ;;
@@ -2904,7 +2904,7 @@
 	    age="$number_minor"
 	    revision="$number_revision"
 	    ;;
-	  freebsd-aout|freebsd-elf|sunos)
+	  freebsd-aout|freebsd-elf|dragonfly|sunos)
 	    current="$number_major"
 	    revision="$number_minor"
 	    age="0"
@@ -2984,6 +2984,11 @@
 	  versuffix=".$current";
 	  ;;
 
+	dragonfly)
+	  major=".$current"
+	  versuffix=".$current";
+	  ;;
+
 	irix | nonstopux)
 	  major=`expr $current - $age + 1`
 
@@ -3175,7 +3180,7 @@
 	  *-*-netbsd*)
 	    # Don't link with libc until the a.out ld.so is fixed.
 	    ;;
-	  *-*-openbsd* | *-*-freebsd*)
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
 	    # Do not include libc due to us having libc/libc_r.
 	    test "X$arg" = "X-lc" && continue
 	    ;;
--- libtool-1.5.2-clean/ltmain.in	Tue Mar 30 10:37:41 2004
+++ libtool-1.5.2-modified/ltmain.in	Fri Mar 26 10:25:36 2004
@@ -1335,7 +1335,7 @@
 	    # These systems don't actually have a C library (as such)
 	    test "X$arg" = "X-lc" && continue
 	    ;;
-	  *-*-openbsd* | *-*-freebsd*)
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
 	    # Do not include libc due to us having libc/libc_r.
 	    test "X$arg" = "X-lc" && continue
 	    ;;
@@ -1346,7 +1346,7 @@
 	  esac
 	elif test "X$arg" = "X-lc_r"; then
 	 case $host in
-	 *-*-openbsd* | *-*-freebsd*)
+	 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
 	   # Do not include libc_r directly, use -pthread flag.
 	   continue
 	   ;;
@@ -2904,7 +2904,7 @@
 	    age="$number_minor"
 	    revision="$number_revision"
 	    ;;
-	  freebsd-aout|freebsd-elf|sunos)
+	  freebsd-aout|freebsd-elf|dragonfly|sunos)
 	    current="$number_major"
 	    revision="$number_minor"
 	    age="0"
@@ -2984,6 +2984,11 @@
 	  versuffix=".$current";
 	  ;;
 
+	dragonfly)
+	  major=".$current"
+	  versuffix=".$current";
+	  ;;
+
 	irix | nonstopux)
 	  major=`expr $current - $age + 1`
 
@@ -3175,7 +3180,7 @@
 	  *-*-netbsd*)
 	    # Don't link with libc until the a.out ld.so is fixed.
 	    ;;
-	  *-*-openbsd* | *-*-freebsd*)
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
 	    # Do not include libc due to us having libc/libc_r.
 	    test "X$arg" = "X-lc" && continue
 	    ;;
--- libtool-1.5.2-clean/libtool.m4	Tue Mar 30 10:37:41 2004
+++ libtool-1.5.2-modified/libtool.m4	Tue Mar 30 10:53:58 2004
@@ -1298,6 +1298,16 @@
   dynamic_linker='GNU ld.so'
   ;;
 
+dragonfly*)
+  version_type=dragonfly
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  need_version=no
+  need_lib_prefix=no
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
 freebsd*)
   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
   version_type=freebsd-$objformat
@@ -2133,13 +2143,13 @@
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-freebsd* | kfreebsd*-gnu)
+freebsd* | dragonfly* | kfreebsd*-gnu)
   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
     case $host_cpu in
     i*86 )
       # Not sure whether the presence of OpenBSD here was a mistake.
       # Let's accept both of them until this is cleared up.
-      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
+      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
       lt_cv_file_magic_cmd=/usr/bin/file
       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
       ;;
@@ -2965,7 +2975,7 @@
   freebsd-elf*)
     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
     ;;
-  freebsd* | kfreebsd*-gnu)
+  freebsd* | dragonfly* | kfreebsd*-gnu)
     # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
     # conventions
     _LT_AC_TAGVAR(ld_shlibs, $1)=yes
@@ -4615,7 +4625,7 @@
 	    ;;
 	esac
 	;;
-      freebsd* | kfreebsd*-gnu)
+      freebsd* | dragonfly* | kfreebsd*-gnu)
 	# FreeBSD uses GNU C++
 	;;
       hpux9* | hpux10* | hpux11*)
@@ -5461,7 +5471,7 @@
       ;;
 
     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
-    freebsd* | kfreebsd*-gnu)
+    freebsd* | dragonfly* | kfreebsd*-gnu)
       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
--- libtool-1.5.2-clean/libltdl/ltmain.sh	Tue Mar 30 10:37:40 2004
+++ libtool-1.5.2-modified/ltmain.sh	Fri Mar 26 10:25:36 2004
@@ -1335,7 +1335,7 @@
 	    # These systems don't actually have a C library (as such)
 	    test "X$arg" = "X-lc" && continue
 	    ;;
-	  *-*-openbsd* | *-*-freebsd*)
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
 	    # Do not include libc due to us having libc/libc_r.
 	    test "X$arg" = "X-lc" && continue
 	    ;;
@@ -1346,7 +1346,7 @@
 	  esac
 	elif test "X$arg" = "X-lc_r"; then
 	 case $host in
-	 *-*-openbsd* | *-*-freebsd*)
+	 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
 	   # Do not include libc_r directly, use -pthread flag.
 	   continue
 	   ;;
@@ -2904,7 +2904,7 @@
 	    age="$number_minor"
 	    revision="$number_revision"
 	    ;;
-	  freebsd-aout|freebsd-elf|sunos)
+	  freebsd-aout|freebsd-elf|dragonfly|sunos)
 	    current="$number_major"
 	    revision="$number_minor"
 	    age="0"
@@ -2984,6 +2984,11 @@
 	  versuffix=".$current";
 	  ;;
 
+	dragonfly)
+	  major=".$current"
+	  versuffix=".$current";
+	  ;;
+
 	irix | nonstopux)
 	  major=`expr $current - $age + 1`
 
@@ -3175,7 +3180,7 @@
 	  *-*-netbsd*)
 	    # Don't link with libc until the a.out ld.so is fixed.
 	    ;;
-	  *-*-openbsd* | *-*-freebsd*)
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
 	    # Do not include libc due to us having libc/libc_r.
 	    test "X$arg" = "X-lc" && continue
 	    ;;
Attachment:
pgp00020.pgp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00020.pgp
Type: application/octet-stream
Size: 187 bytes
Desc: "Description: PGP signature"
URL: <http://lists.dragonflybsd.org/pipermail/submit/attachments/20040330/0ffcbb15/attachment-0019.obj>


More information about the Submit mailing list