pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/devel Fix C++ linkage on modern NetBSD ELF by using a ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8916b99d7b1c
branches:  trunk
changeset: 483404:8916b99d7b1c
user:      tv <tv%pkgsrc.org@localhost>
date:      Thu Nov 11 22:29:03 2004 +0000

description:
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.

diffstat:

 devel/libtool-base/Makefile             |   4 +-
 devel/libtool/distinfo                  |   6 +-
 devel/libtool/patches/manual-libtool.m4 |  38 ++++++++++++----
 devel/libtool/patches/patch-ab          |  76 ++++++++++++++++++++------------
 devel/libtool/patches/patch-ad          |  76 ++++++++++++++++++++------------
 5 files changed, 127 insertions(+), 73 deletions(-)

diffs (truncated from 700 to 300 lines):

diff -r cea84f160ee4 -r 8916b99d7b1c devel/libtool-base/Makefile
--- a/devel/libtool-base/Makefile       Thu Nov 11 21:46:43 2004 +0000
+++ b/devel/libtool-base/Makefile       Thu Nov 11 22:29:03 2004 +0000
@@ -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 -r cea84f160ee4 -r 8916b99d7b1c devel/libtool/distinfo
--- a/devel/libtool/distinfo    Thu Nov 11 21:46:43 2004 +0000
+++ b/devel/libtool/distinfo    Thu Nov 11 22:29:03 2004 +0000
@@ -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 -r cea84f160ee4 -r 8916b99d7b1c devel/libtool/patches/manual-libtool.m4
--- a/devel/libtool/patches/manual-libtool.m4   Thu Nov 11 21:46:43 2004 +0000
+++ b/devel/libtool/patches/manual-libtool.m4   Thu Nov 11 22:29:03 2004 +0000
@@ -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 @@
    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 @@
        _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 @@
    # 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 @@
        ;;
      *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 @@
      *)
        _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 @@
        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 @@
        ;;
  
      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 @@
      *)
        _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*)
        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 -r cea84f160ee4 -r 8916b99d7b1c devel/libtool/patches/patch-ab
--- a/devel/libtool/patches/patch-ab    Thu Nov 11 21:46:43 2004 +0000
+++ b/devel/libtool/patches/patch-ab    Thu Nov 11 22:29:03 2004 +0000
@@ -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 @@
    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 @@
        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 @@
    # 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 @@
        ;;
      *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 @@
      *)
        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 @@
        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 @@
    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 @@
        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 @@
    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 @@
      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 @@
    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 @@
        ;;
  
      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 @@
      *)
        lt_prog_compiler_pic_F77='-fPIC'
        ;;
-@@ -14221,6 +14314,17 @@ EOF
+@@ -14221,6 +14322,17 @@ EOF
        fi
        ;;
  
@@ -431,7 +449,7 @@
      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 @@
      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*)



Home | Main Index | Thread Index | Old Index