diff options
author | tv <tv@pkgsrc.org> | 2004-11-11 22:29:03 +0000 |
---|---|---|
committer | tv <tv@pkgsrc.org> | 2004-11-11 22:29:03 +0000 |
commit | 0bd444ae35c67d531bd9063e4677de9b581e0343 (patch) | |
tree | e2ccc46240d904f793dcf9f6a5a18b0e7ea9e0c0 | |
parent | fbcbe78f2d1a771c87ad2d82520086e3c50aa42b (diff) | |
download | pkgsrc-0bd444ae35c67d531bd9063e4677de9b581e0343.tar.gz |
Fix C++ linkage on modern NetBSD ELF by using a more standard link command.
Based on jlam's patch to tech-pkg.
Bump PKGREVISION to 1.5.0nb6.
-rw-r--r-- | devel/libtool-base/Makefile | 4 | ||||
-rw-r--r-- | devel/libtool/distinfo | 6 | ||||
-rw-r--r-- | devel/libtool/patches/manual-libtool.m4 | 38 | ||||
-rw-r--r-- | devel/libtool/patches/patch-ab | 76 | ||||
-rw-r--r-- | devel/libtool/patches/patch-ad | 76 |
5 files changed, 127 insertions, 73 deletions
diff --git a/devel/libtool-base/Makefile b/devel/libtool-base/Makefile index 57672c05658..60307a97385 100644 --- a/devel/libtool-base/Makefile +++ b/devel/libtool-base/Makefile @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.45 2004/10/14 19:07:46 tv Exp $ +# $NetBSD: Makefile,v 1.46 2004/11/11 22:29:03 tv Exp $ # .include "../../devel/libtool/Makefile.common" PKGNAME= ${DISTNAME:S/-/-base-/} -PKGREVISION= 5 +PKGREVISION= 6 SVR4_PKGNAME= ltoob COMMENT= Generic shared library support script (the script itself) diff --git a/devel/libtool/distinfo b/devel/libtool/distinfo index 42b4ca596e1..472e3635115 100644 --- a/devel/libtool/distinfo +++ b/devel/libtool/distinfo @@ -1,8 +1,8 @@ -$NetBSD: distinfo,v 1.50 2004/10/12 04:41:39 tv Exp $ +$NetBSD: distinfo,v 1.51 2004/11/11 22:29:03 tv Exp $ SHA1 (libtool-1.5.10.tar.gz) = bb2cab7f405c5eb08ab8ba193cbac59ebe6e6e9e Size (libtool-1.5.10.tar.gz) = 2699923 bytes SHA1 (patch-aa) = 173b8f40ebb067e3bcea798b87e822a445d5688e -SHA1 (patch-ab) = eb46985d419849a5bb5aab150ba761fe0113777c +SHA1 (patch-ab) = 11c564b44d22a9a49219ef1edd76aa469fc4a3f2 SHA1 (patch-ac) = e5cb5ca2303ebb82bb17db6c785580c23db2c6d3 -SHA1 (patch-ad) = 530dc8b47e2c8d60ef203e07d972e96f64c54df3 +SHA1 (patch-ad) = 17ae54beead8ed189cf7aab8708d40d499750e7d diff --git a/devel/libtool/patches/manual-libtool.m4 b/devel/libtool/patches/manual-libtool.m4 index a33774bed85..b9f31d21725 100644 --- a/devel/libtool/patches/manual-libtool.m4 +++ b/devel/libtool/patches/manual-libtool.m4 @@ -1,4 +1,4 @@ -$NetBSD: manual-libtool.m4,v 1.10 2004/10/12 04:41:39 tv Exp $ +$NetBSD: manual-libtool.m4,v 1.11 2004/11/11 22:29:03 tv Exp $ --- libtool.m4.orig 2004-09-19 08:15:08.000000000 -0400 +++ libtool.m4 @@ -175,8 +175,11 @@ $NetBSD: manual-libtool.m4,v 1.10 2004/10/12 04:41:39 tv Exp $ irix5* | irix6*) case $cc_basename in CC) -@@ -3210,6 +3220,13 @@ case $host_os in +@@ -3208,14 +3218,29 @@ case $host_os in + ;; + netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then ++ # a.out is quite broken and goes directly to ld _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= + # Determine if we need to override the c++rt0 that is @@ -189,7 +192,22 @@ $NetBSD: manual-libtool.m4,v 1.10 2004/10/12 04:41:39 tv Exp $ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no -@@ -3651,6 +3668,21 @@ if AC_TRY_EVAL(ac_compile); then ++ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ++ elif $CC -dumpspecs | grep -- '-lgcc -lc -lgcc' >/dev/null; then ++ # Workaround some broken pre-1.5 ELF toolchains ++ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ++ else ++ # Modern ELF works sanely as-is ++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ output_verbose_link_cmd='echo' + fi +- # Workaround some broken pre-1.5 toolchains +- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + openbsd2*) + # C++ shared libraries are fairly broken +@@ -3651,6 +3676,21 @@ if AC_TRY_EVAL(ac_compile); then esac done @@ -211,7 +229,7 @@ $NetBSD: manual-libtool.m4,v 1.10 2004/10/12 04:41:39 tv Exp $ # Clean up. rm -f a.out a.exe else -@@ -4591,9 +4623,11 @@ AC_MSG_CHECKING([for $compiler option to +@@ -4591,9 +4631,11 @@ AC_MSG_CHECKING([for $compiler option to _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; darwin* | rhapsody*) @@ -224,7 +242,7 @@ $NetBSD: manual-libtool.m4,v 1.10 2004/10/12 04:41:39 tv Exp $ ;; *djgpp*) # DJGPP does not support shared libraries at all -@@ -4615,6 +4649,10 @@ AC_MSG_CHECKING([for $compiler option to +@@ -4615,6 +4657,10 @@ AC_MSG_CHECKING([for $compiler option to ;; esac ;; @@ -235,7 +253,7 @@ $NetBSD: manual-libtool.m4,v 1.10 2004/10/12 04:41:39 tv Exp $ *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; -@@ -4689,6 +4727,8 @@ AC_MSG_CHECKING([for $compiler option to +@@ -4689,6 +4735,8 @@ AC_MSG_CHECKING([for $compiler option to ;; esac ;; @@ -244,7 +262,7 @@ $NetBSD: manual-libtool.m4,v 1.10 2004/10/12 04:41:39 tv Exp $ irix5* | irix6* | nonstopux*) case $cc_basename in CC) -@@ -4854,9 +4894,11 @@ AC_MSG_CHECKING([for $compiler option to +@@ -4854,9 +4902,11 @@ AC_MSG_CHECKING([for $compiler option to ;; darwin* | rhapsody*) @@ -257,7 +275,7 @@ $NetBSD: manual-libtool.m4,v 1.10 2004/10/12 04:41:39 tv Exp $ ;; msdosdjgpp*) -@@ -4885,6 +4927,11 @@ AC_MSG_CHECKING([for $compiler option to +@@ -4885,6 +4935,11 @@ AC_MSG_CHECKING([for $compiler option to esac ;; @@ -269,7 +287,7 @@ $NetBSD: manual-libtool.m4,v 1.10 2004/10/12 04:41:39 tv Exp $ *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; -@@ -5187,6 +5234,17 @@ EOF +@@ -5187,6 +5242,17 @@ EOF fi ;; @@ -287,7 +305,7 @@ $NetBSD: manual-libtool.m4,v 1.10 2004/10/12 04:41:39 tv Exp $ netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' -@@ -5592,6 +5650,21 @@ $echo "local: *; };" >> $output_objdir/$ +@@ -5592,6 +5658,21 @@ $echo "local: *; };" >> $output_objdir/$ fi ;; diff --git a/devel/libtool/patches/patch-ab b/devel/libtool/patches/patch-ab index df19e77d85b..2ee6f992e6c 100644 --- a/devel/libtool/patches/patch-ab +++ b/devel/libtool/patches/patch-ab @@ -1,4 +1,4 @@ -$NetBSD: patch-ab,v 1.45 2004/10/12 04:41:39 tv Exp $ +$NetBSD: patch-ab,v 1.46 2004/11/11 22:29:03 tv Exp $ --- configure.orig 2004-09-19 08:22:04.000000000 -0400 +++ configure @@ -231,8 +231,11 @@ $NetBSD: patch-ab,v 1.45 2004/10/12 04:41:39 tv Exp $ irix5* | irix6*) case $cc_basename in CC) -@@ -10936,6 +10983,13 @@ if test -z "$aix_libpath"; then aix_libp +@@ -10934,14 +10981,29 @@ if test -z "$aix_libpath"; then aix_libp + ;; + netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then ++ # a.out is quite broken and goes directly to ld archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= + # Determine if we need to override the c++rt0 that is @@ -245,7 +248,22 @@ $NetBSD: patch-ab,v 1.45 2004/10/12 04:41:39 tv Exp $ hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no -@@ -11324,6 +11378,21 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c ++ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ++ elif $CC -dumpspecs | grep -- '-lgcc -lc -lgcc' >/dev/null; then ++ # Workaround some broken pre-1.5 ELF toolchains ++ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ++ else ++ # Modern ELF works sanely as-is ++ archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ output_verbose_link_cmd='echo' + fi +- # Workaround some broken pre-1.5 toolchains +- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + openbsd2*) + # C++ shared libraries are fairly broken +@@ -11324,6 +11386,21 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c esac done @@ -267,7 +285,7 @@ $NetBSD: patch-ab,v 1.45 2004/10/12 04:41:39 tv Exp $ # Clean up. rm -f a.out a.exe else -@@ -11371,9 +11440,11 @@ echo $ECHO_N "checking for $compiler opt +@@ -11371,9 +11448,11 @@ echo $ECHO_N "checking for $compiler opt lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) @@ -280,7 +298,7 @@ $NetBSD: patch-ab,v 1.45 2004/10/12 04:41:39 tv Exp $ ;; *djgpp*) # DJGPP does not support shared libraries at all -@@ -11395,6 +11466,10 @@ echo $ECHO_N "checking for $compiler opt +@@ -11395,6 +11474,10 @@ echo $ECHO_N "checking for $compiler opt ;; esac ;; @@ -291,7 +309,7 @@ $NetBSD: patch-ab,v 1.45 2004/10/12 04:41:39 tv Exp $ *) lt_prog_compiler_pic_CXX='-fPIC' ;; -@@ -11469,6 +11544,8 @@ echo $ECHO_N "checking for $compiler opt +@@ -11469,6 +11552,8 @@ echo $ECHO_N "checking for $compiler opt ;; esac ;; @@ -300,7 +318,7 @@ $NetBSD: patch-ab,v 1.45 2004/10/12 04:41:39 tv Exp $ irix5* | irix6* | nonstopux*) case $cc_basename in CC) -@@ -11939,6 +12016,7 @@ beos*) +@@ -11939,6 +12024,7 @@ beos*) bsdi[45]*) version_type=linux need_version=no @@ -308,7 +326,7 @@ $NetBSD: patch-ab,v 1.45 2004/10/12 04:41:39 tv Exp $ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' -@@ -12053,16 +12131,17 @@ kfreebsd*-gnu) +@@ -12053,16 +12139,17 @@ kfreebsd*-gnu) ;; freebsd*) @@ -332,7 +350,7 @@ $NetBSD: patch-ab,v 1.45 2004/10/12 04:41:39 tv Exp $ need_version=yes ;; esac -@@ -12138,15 +12217,22 @@ hpux9* | hpux10* | hpux11*) +@@ -12138,15 +12225,22 @@ hpux9* | hpux10* | hpux11*) postinstall_cmds='chmod 555 $lib' ;; @@ -361,7 +379,7 @@ $NetBSD: patch-ab,v 1.45 2004/10/12 04:41:39 tv Exp $ esac need_lib_prefix=no need_version=no -@@ -12223,11 +12309,11 @@ knetbsd*-gnu) +@@ -12223,11 +12317,11 @@ knetbsd*-gnu) ;; netbsd*) @@ -375,7 +393,7 @@ $NetBSD: patch-ab,v 1.45 2004/10/12 04:41:39 tv Exp $ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else -@@ -12258,10 +12344,10 @@ nto-qnx*) +@@ -12258,10 +12352,10 @@ nto-qnx*) ;; openbsd*) @@ -388,7 +406,7 @@ $NetBSD: patch-ab,v 1.45 2004/10/12 04:41:39 tv Exp $ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then -@@ -13805,9 +13891,11 @@ echo $ECHO_N "checking for $compiler opt +@@ -13805,9 +13899,11 @@ echo $ECHO_N "checking for $compiler opt ;; darwin* | rhapsody*) @@ -401,7 +419,7 @@ $NetBSD: patch-ab,v 1.45 2004/10/12 04:41:39 tv Exp $ ;; msdosdjgpp*) -@@ -13836,6 +13924,11 @@ echo $ECHO_N "checking for $compiler opt +@@ -13836,6 +13932,11 @@ echo $ECHO_N "checking for $compiler opt esac ;; @@ -413,7 +431,7 @@ $NetBSD: patch-ab,v 1.45 2004/10/12 04:41:39 tv Exp $ *) lt_prog_compiler_pic_F77='-fPIC' ;; -@@ -14221,6 +14314,17 @@ EOF +@@ -14221,6 +14322,17 @@ EOF fi ;; @@ -431,7 +449,7 @@ $NetBSD: patch-ab,v 1.45 2004/10/12 04:41:39 tv Exp $ netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' -@@ -14708,6 +14812,21 @@ if test -z "$aix_libpath"; then aix_libp +@@ -14708,6 +14820,21 @@ if test -z "$aix_libpath"; then aix_libp fi ;; @@ -453,7 +471,7 @@ $NetBSD: patch-ab,v 1.45 2004/10/12 04:41:39 tv Exp $ irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -@@ -15099,6 +15218,7 @@ beos*) +@@ -15099,6 +15226,7 @@ beos*) bsdi[45]*) version_type=linux need_version=no @@ -461,7 +479,7 @@ $NetBSD: patch-ab,v 1.45 2004/10/12 04:41:39 tv Exp $ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' -@@ -15213,16 +15333,17 @@ kfreebsd*-gnu) +@@ -15213,16 +15341,17 @@ kfreebsd*-gnu) ;; freebsd*) @@ -485,7 +503,7 @@ $NetBSD: patch-ab,v 1.45 2004/10/12 04:41:39 tv Exp $ need_version=yes ;; esac -@@ -15298,15 +15419,22 @@ hpux9* | hpux10* | hpux11*) +@@ -15298,15 +15427,22 @@ hpux9* | hpux10* | hpux11*) postinstall_cmds='chmod 555 $lib' ;; @@ -514,7 +532,7 @@ $NetBSD: patch-ab,v 1.45 2004/10/12 04:41:39 tv Exp $ esac need_lib_prefix=no need_version=no -@@ -15383,11 +15511,11 @@ knetbsd*-gnu) +@@ -15383,11 +15519,11 @@ knetbsd*-gnu) ;; netbsd*) @@ -528,7 +546,7 @@ $NetBSD: patch-ab,v 1.45 2004/10/12 04:41:39 tv Exp $ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else -@@ -15418,10 +15546,10 @@ nto-qnx*) +@@ -15418,10 +15554,10 @@ nto-qnx*) ;; openbsd*) @@ -541,7 +559,7 @@ $NetBSD: patch-ab,v 1.45 2004/10/12 04:41:39 tv Exp $ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then -@@ -16147,9 +16275,11 @@ echo $ECHO_N "checking for $compiler opt +@@ -16147,9 +16283,11 @@ echo $ECHO_N "checking for $compiler opt ;; darwin* | rhapsody*) @@ -554,7 +572,7 @@ $NetBSD: patch-ab,v 1.45 2004/10/12 04:41:39 tv Exp $ ;; msdosdjgpp*) -@@ -16178,6 +16308,11 @@ echo $ECHO_N "checking for $compiler opt +@@ -16178,6 +16316,11 @@ echo $ECHO_N "checking for $compiler opt esac ;; @@ -566,7 +584,7 @@ $NetBSD: patch-ab,v 1.45 2004/10/12 04:41:39 tv Exp $ *) lt_prog_compiler_pic_GCJ='-fPIC' ;; -@@ -16563,6 +16698,17 @@ EOF +@@ -16563,6 +16706,17 @@ EOF fi ;; @@ -584,7 +602,7 @@ $NetBSD: patch-ab,v 1.45 2004/10/12 04:41:39 tv Exp $ netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' -@@ -17070,6 +17216,21 @@ if test -z "$aix_libpath"; then aix_libp +@@ -17070,6 +17224,21 @@ if test -z "$aix_libpath"; then aix_libp fi ;; @@ -606,7 +624,7 @@ $NetBSD: patch-ab,v 1.45 2004/10/12 04:41:39 tv Exp $ irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -@@ -17461,6 +17622,7 @@ beos*) +@@ -17461,6 +17630,7 @@ beos*) bsdi[45]*) version_type=linux need_version=no @@ -614,7 +632,7 @@ $NetBSD: patch-ab,v 1.45 2004/10/12 04:41:39 tv Exp $ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' -@@ -17575,16 +17737,17 @@ kfreebsd*-gnu) +@@ -17575,16 +17745,17 @@ kfreebsd*-gnu) ;; freebsd*) @@ -638,7 +656,7 @@ $NetBSD: patch-ab,v 1.45 2004/10/12 04:41:39 tv Exp $ need_version=yes ;; esac -@@ -17660,15 +17823,22 @@ hpux9* | hpux10* | hpux11*) +@@ -17660,15 +17831,22 @@ hpux9* | hpux10* | hpux11*) postinstall_cmds='chmod 555 $lib' ;; @@ -667,7 +685,7 @@ $NetBSD: patch-ab,v 1.45 2004/10/12 04:41:39 tv Exp $ esac need_lib_prefix=no need_version=no -@@ -17745,11 +17915,11 @@ knetbsd*-gnu) +@@ -17745,11 +17923,11 @@ knetbsd*-gnu) ;; netbsd*) @@ -681,7 +699,7 @@ $NetBSD: patch-ab,v 1.45 2004/10/12 04:41:39 tv Exp $ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else -@@ -17780,10 +17950,10 @@ nto-qnx*) +@@ -17780,10 +17958,10 @@ nto-qnx*) ;; openbsd*) diff --git a/devel/libtool/patches/patch-ad b/devel/libtool/patches/patch-ad index 9dac380528b..79a10e84042 100644 --- a/devel/libtool/patches/patch-ad +++ b/devel/libtool/patches/patch-ad @@ -1,4 +1,4 @@ -$NetBSD: patch-ad,v 1.18 2004/10/12 04:41:39 tv Exp $ +$NetBSD: patch-ad,v 1.19 2004/11/11 22:29:03 tv Exp $ --- libltdl/configure.orig 2004-09-19 08:23:09.000000000 -0400 +++ libltdl/configure @@ -231,8 +231,11 @@ $NetBSD: patch-ad,v 1.18 2004/10/12 04:41:39 tv Exp $ irix5* | irix6*) case $cc_basename in CC) -@@ -10841,6 +10888,13 @@ if test -z "$aix_libpath"; then aix_libp +@@ -10839,14 +10886,29 @@ if test -z "$aix_libpath"; then aix_libp + ;; + netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then ++ # a.out is quite broken and goes directly to ld archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= + # Determine if we need to override the c++rt0 that is @@ -245,7 +248,22 @@ $NetBSD: patch-ad,v 1.18 2004/10/12 04:41:39 tv Exp $ hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no -@@ -11229,6 +11283,21 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c ++ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ++ elif $CC -dumpspecs | grep -- '-lgcc -lc -lgcc' >/dev/null; then ++ # Workaround some broken pre-1.5 ELF toolchains ++ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ++ else ++ # Modern ELF works sanely as-is ++ archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ output_verbose_link_cmd='echo' + fi +- # Workaround some broken pre-1.5 toolchains +- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + openbsd2*) + # C++ shared libraries are fairly broken +@@ -11229,6 +11291,21 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c esac done @@ -267,7 +285,7 @@ $NetBSD: patch-ad,v 1.18 2004/10/12 04:41:39 tv Exp $ # Clean up. rm -f a.out a.exe else -@@ -11276,9 +11345,11 @@ echo $ECHO_N "checking for $compiler opt +@@ -11276,9 +11353,11 @@ echo $ECHO_N "checking for $compiler opt lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) @@ -280,7 +298,7 @@ $NetBSD: patch-ad,v 1.18 2004/10/12 04:41:39 tv Exp $ ;; *djgpp*) # DJGPP does not support shared libraries at all -@@ -11300,6 +11371,10 @@ echo $ECHO_N "checking for $compiler opt +@@ -11300,6 +11379,10 @@ echo $ECHO_N "checking for $compiler opt ;; esac ;; @@ -291,7 +309,7 @@ $NetBSD: patch-ad,v 1.18 2004/10/12 04:41:39 tv Exp $ *) lt_prog_compiler_pic_CXX='-fPIC' ;; -@@ -11374,6 +11449,8 @@ echo $ECHO_N "checking for $compiler opt +@@ -11374,6 +11457,8 @@ echo $ECHO_N "checking for $compiler opt ;; esac ;; @@ -300,7 +318,7 @@ $NetBSD: patch-ad,v 1.18 2004/10/12 04:41:39 tv Exp $ irix5* | irix6* | nonstopux*) case $cc_basename in CC) -@@ -11844,6 +11921,7 @@ beos*) +@@ -11844,6 +11929,7 @@ beos*) bsdi[45]*) version_type=linux need_version=no @@ -308,7 +326,7 @@ $NetBSD: patch-ad,v 1.18 2004/10/12 04:41:39 tv Exp $ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' -@@ -11958,16 +12036,17 @@ kfreebsd*-gnu) +@@ -11958,16 +12044,17 @@ kfreebsd*-gnu) ;; freebsd*) @@ -332,7 +350,7 @@ $NetBSD: patch-ad,v 1.18 2004/10/12 04:41:39 tv Exp $ need_version=yes ;; esac -@@ -12043,15 +12122,22 @@ hpux9* | hpux10* | hpux11*) +@@ -12043,15 +12130,22 @@ hpux9* | hpux10* | hpux11*) postinstall_cmds='chmod 555 $lib' ;; @@ -361,7 +379,7 @@ $NetBSD: patch-ad,v 1.18 2004/10/12 04:41:39 tv Exp $ esac need_lib_prefix=no need_version=no -@@ -12128,11 +12214,11 @@ knetbsd*-gnu) +@@ -12128,11 +12222,11 @@ knetbsd*-gnu) ;; netbsd*) @@ -375,7 +393,7 @@ $NetBSD: patch-ad,v 1.18 2004/10/12 04:41:39 tv Exp $ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else -@@ -12163,10 +12249,10 @@ nto-qnx*) +@@ -12163,10 +12257,10 @@ nto-qnx*) ;; openbsd*) @@ -388,7 +406,7 @@ $NetBSD: patch-ad,v 1.18 2004/10/12 04:41:39 tv Exp $ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then -@@ -13710,9 +13796,11 @@ echo $ECHO_N "checking for $compiler opt +@@ -13710,9 +13804,11 @@ echo $ECHO_N "checking for $compiler opt ;; darwin* | rhapsody*) @@ -401,7 +419,7 @@ $NetBSD: patch-ad,v 1.18 2004/10/12 04:41:39 tv Exp $ ;; msdosdjgpp*) -@@ -13741,6 +13829,11 @@ echo $ECHO_N "checking for $compiler opt +@@ -13741,6 +13837,11 @@ echo $ECHO_N "checking for $compiler opt esac ;; @@ -413,7 +431,7 @@ $NetBSD: patch-ad,v 1.18 2004/10/12 04:41:39 tv Exp $ *) lt_prog_compiler_pic_F77='-fPIC' ;; -@@ -14126,6 +14219,17 @@ EOF +@@ -14126,6 +14227,17 @@ EOF fi ;; @@ -431,7 +449,7 @@ $NetBSD: patch-ad,v 1.18 2004/10/12 04:41:39 tv Exp $ netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' -@@ -14613,6 +14717,21 @@ if test -z "$aix_libpath"; then aix_libp +@@ -14613,6 +14725,21 @@ if test -z "$aix_libpath"; then aix_libp fi ;; @@ -453,7 +471,7 @@ $NetBSD: patch-ad,v 1.18 2004/10/12 04:41:39 tv Exp $ irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -@@ -15004,6 +15123,7 @@ beos*) +@@ -15004,6 +15131,7 @@ beos*) bsdi[45]*) version_type=linux need_version=no @@ -461,7 +479,7 @@ $NetBSD: patch-ad,v 1.18 2004/10/12 04:41:39 tv Exp $ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' -@@ -15118,16 +15238,17 @@ kfreebsd*-gnu) +@@ -15118,16 +15246,17 @@ kfreebsd*-gnu) ;; freebsd*) @@ -485,7 +503,7 @@ $NetBSD: patch-ad,v 1.18 2004/10/12 04:41:39 tv Exp $ need_version=yes ;; esac -@@ -15203,15 +15324,22 @@ hpux9* | hpux10* | hpux11*) +@@ -15203,15 +15332,22 @@ hpux9* | hpux10* | hpux11*) postinstall_cmds='chmod 555 $lib' ;; @@ -514,7 +532,7 @@ $NetBSD: patch-ad,v 1.18 2004/10/12 04:41:39 tv Exp $ esac need_lib_prefix=no need_version=no -@@ -15288,11 +15416,11 @@ knetbsd*-gnu) +@@ -15288,11 +15424,11 @@ knetbsd*-gnu) ;; netbsd*) @@ -528,7 +546,7 @@ $NetBSD: patch-ad,v 1.18 2004/10/12 04:41:39 tv Exp $ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else -@@ -15323,10 +15451,10 @@ nto-qnx*) +@@ -15323,10 +15459,10 @@ nto-qnx*) ;; openbsd*) @@ -541,7 +559,7 @@ $NetBSD: patch-ad,v 1.18 2004/10/12 04:41:39 tv Exp $ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then -@@ -16052,9 +16180,11 @@ echo $ECHO_N "checking for $compiler opt +@@ -16052,9 +16188,11 @@ echo $ECHO_N "checking for $compiler opt ;; darwin* | rhapsody*) @@ -554,7 +572,7 @@ $NetBSD: patch-ad,v 1.18 2004/10/12 04:41:39 tv Exp $ ;; msdosdjgpp*) -@@ -16083,6 +16213,11 @@ echo $ECHO_N "checking for $compiler opt +@@ -16083,6 +16221,11 @@ echo $ECHO_N "checking for $compiler opt esac ;; @@ -566,7 +584,7 @@ $NetBSD: patch-ad,v 1.18 2004/10/12 04:41:39 tv Exp $ *) lt_prog_compiler_pic_GCJ='-fPIC' ;; -@@ -16468,6 +16603,17 @@ EOF +@@ -16468,6 +16611,17 @@ EOF fi ;; @@ -584,7 +602,7 @@ $NetBSD: patch-ad,v 1.18 2004/10/12 04:41:39 tv Exp $ netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' -@@ -16975,6 +17121,21 @@ if test -z "$aix_libpath"; then aix_libp +@@ -16975,6 +17129,21 @@ if test -z "$aix_libpath"; then aix_libp fi ;; @@ -606,7 +624,7 @@ $NetBSD: patch-ad,v 1.18 2004/10/12 04:41:39 tv Exp $ irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -@@ -17366,6 +17527,7 @@ beos*) +@@ -17366,6 +17535,7 @@ beos*) bsdi[45]*) version_type=linux need_version=no @@ -614,7 +632,7 @@ $NetBSD: patch-ad,v 1.18 2004/10/12 04:41:39 tv Exp $ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' -@@ -17480,16 +17642,17 @@ kfreebsd*-gnu) +@@ -17480,16 +17650,17 @@ kfreebsd*-gnu) ;; freebsd*) @@ -638,7 +656,7 @@ $NetBSD: patch-ad,v 1.18 2004/10/12 04:41:39 tv Exp $ need_version=yes ;; esac -@@ -17565,15 +17728,22 @@ hpux9* | hpux10* | hpux11*) +@@ -17565,15 +17736,22 @@ hpux9* | hpux10* | hpux11*) postinstall_cmds='chmod 555 $lib' ;; @@ -667,7 +685,7 @@ $NetBSD: patch-ad,v 1.18 2004/10/12 04:41:39 tv Exp $ esac need_lib_prefix=no need_version=no -@@ -17650,11 +17820,11 @@ knetbsd*-gnu) +@@ -17650,11 +17828,11 @@ knetbsd*-gnu) ;; netbsd*) @@ -681,7 +699,7 @@ $NetBSD: patch-ad,v 1.18 2004/10/12 04:41:39 tv Exp $ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else -@@ -17685,10 +17855,10 @@ nto-qnx*) +@@ -17685,10 +17863,10 @@ nto-qnx*) ;; openbsd*) |