libtool-commit
[Top][All Lists]
Advanced

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

[SCM] GNU Libtool branch, master, updated. v2.4.4-16-g97f03a4


From: Gary V. Vaughan
Subject: [SCM] GNU Libtool branch, master, updated. v2.4.4-16-g97f03a4
Date: Fri, 12 Dec 2014 18:48:51 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Libtool".

The branch, master has been updated
       via  97f03a437983f106e41de45a0d1baf5a3ec5f04d (commit)
      from  b49ab52cb34a80aacf88698870649c7761e17c65 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 97f03a437983f106e41de45a0d1baf5a3ec5f04d
Author: Gary V. Vaughan <address@hidden>
Date:   Fri Dec 12 18:35:45 2014 +0000

    libtool: check Sun Pro CXX ABI postdeps at libtool time.
    
    * m4/libtool.m4 (_LT_PREPARE_CC_BASENAME): Factor cc_basename
    calculation into a shell function...
    (_LT_CONFIG_SAVE_COMMAND): ...and expand it into generated
    libtool script.
    (_LT_CC_BASENAME): Adjust accordingly.
    (_LT_FUNC_SUNCC_CSTD_ABI): Remove from here...
    * build-aux/ltmain.in (func_suncc_cstd_abi): ...and reimplement
    here.
    * m4/libtool.m4 (_LT_SYS_HIDDEN_LIBDEPS): Remove postdeps
    augmentation from here...
    * build-aux/ltmain.in (func_mode_link): ...and reimplement here
    just before postdeps are added.
    * NEWS: Update.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 NEWS                |    9 +++++-
 build-aux/ltmain.in |   49 +++++++++++++++++++++++++++++
 m4/libtool.m4       |   84 +++++++++++++++++----------------------------------
 3 files changed, 85 insertions(+), 57 deletions(-)

diff --git a/NEWS b/NEWS
index c2f667b..7b242eb 100644
--- a/NEWS
+++ b/NEWS
@@ -21,13 +21,20 @@ NEWS - list of user-visible changes between releases of GNU 
Libtool
   - Fix a 2.4.4 regression so that libltdl subprojects do not warn
     about missing libltdl/libltdl directory as in prior releases.
 
+  - When using Sun C++ on Solaris or GNU/Linux we used to set libtool's
+    postdeps permanently, based on the contents of $CXX and $CXXFLAGS at
+    configure time, which was brittle and error-prone.  Now, we no
+    longer check for a SunCC ABI at configure time, but augment the
+    postdeps at libtool time based on the current invocation flags on
+    each call.
+
 ** Changes in supported systems or compilers:
 
   - /usr/local prefixed rpaths are now added to the link-line on
     ia64-hp-hpux*, because the default system runtime loader path does
     not contain them.
 
-  - Previously, when using Sun C++ on Solaris or Linux, `-Cstd -Crun`
+  - Previously, when using Sun C++ on Solaris or GNU/Linux, `-Cstd -Crun`
     flags were added to $postdeps unless CXX or CXXFLAGS contained
     `-library=stlport4`.  Newer releases have added other compiler flags
     that are also incompatible with `-Cstd -Crun`, so now we don't add
diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
index 42048df..b901c1b 100644
--- a/build-aux/ltmain.in
+++ b/build-aux/ltmain.in
@@ -4549,6 +4549,24 @@ func_win32_import_lib_p ()
     esac
 }
 
+# func_suncc_cstd_abi
+# !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!!
+# Several compiler flags select an ABI that is incompatible with the
+# Cstd library. Avoid specifying it if any are in CXXFLAGS.
+func_suncc_cstd_abi ()
+{
+    $debug_cmd
+
+    case " $compile_command " in
+    *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" 
-library=stlport4 "*)
+      suncc_use_cstd_abi=no
+      ;;
+    *)
+      suncc_use_cstd_abi=yes
+      ;;
+    esac
+}
+
 # func_mode_link arg...
 func_mode_link ()
 {
@@ -6690,6 +6708,37 @@ func_mode_link ()
          eval $var=\"$tmp_libs\"
        done # for var
       fi
+
+      # Add Sun CC postdeps if required:
+      test CXX = "$tagname" && {
+        case $host_os in
+        linux*)
+          case `$CC -V 2>&1 | sed 5q` in
+          *Sun\ C*) # Sun C++ 5.9
+            func_suncc_cstd_abi
+
+            if test no != "$suncc_use_cstd_abi"; then
+              func_append postdeps ' -library=Cstd -library=Crun'
+            fi
+            ;;
+          esac
+          ;;
+
+        solaris*)
+          func_cc_basename "$CC"
+          case $func_cc_basename_result in
+          CC* | sunCC*)
+            func_suncc_cstd_abi
+
+            if test no != "$suncc_use_cstd_abi"; then
+              func_append postdeps ' -library=Cstd -library=Crun'
+            fi
+            ;;
+          esac
+          ;;
+        esac
+      }
+
       # Last step: remove runtime libs from dependency_libs
       # (they stay in deplibs)
       tmp_libs=
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index 22a7284..f879988 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -103,19 +103,36 @@ dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
 
 
+# _LT_PREPARE_CC_BASENAME
+# -----------------------
+m4_defun([_LT_PREPARE_CC_BASENAME], [
+# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
+func_cc_basename ()
+{
+    for cc_temp in @S|@*""; do
+      case $cc_temp in
+        compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
+        distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
+        \-*) ;;
+        *) break;;
+      esac
+    done
+    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; 
s%^$host_alias-%%"`
+}
+])# _LT_PREPARE_CC_BASENAME
+
+
 # _LT_CC_BASENAME(CC)
 # -------------------
-# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
+# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
+# but that macro is also expanded into generated libtool script, which
+# arranges for $SED and $ECHO to be set by different means.
 m4_defun([_LT_CC_BASENAME],
-[for cc_temp in $1""; do
-  case $cc_temp in
-    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
-    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+[m4_require([_LT_PREPARE_CC_BASENAME])dnl
+AC_REQUIRE([_LT_DECL_SED])dnl
+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
+func_cc_basename $1
+cc_basename=$func_cc_basename_result
 ])
 
 
@@ -736,6 +753,7 @@ _LT_EOF
 ## -------------------------------------- ##
 
 _LT_PREPARE_MUNGE_PATH_LIST
+_LT_PREPARE_CC_BASENAME
 
 _LT_EOF
 
@@ -7423,27 +7441,6 @@ func_stripname_cnf ()
 ])# _LT_FUNC_STRIPNAME_CNF
 
 
-# _LT_FUNC_SUNCC_CSTD_ABI
-# -----------------------
-# func_suncc_cstd_abi
-# Several compiler flags select an ABI that is
-# incompatible with the Cstd library. Avoid specifying
-# it if any are in CXXFLAGS.
-m4_defun([_LT_FUNC_SUNCC_CSTD_ABI], [[
-func_suncc_cstd_abi ()
-{
-    case " $CXX $CXXFLAGS " in
-    *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" 
-library=stlport4 "*)
-      suncc_use_cstd_abi=no
-      ;;
-    *)
-      suncc_use_cstd_abi=yes
-      ;;
-    esac
-} # func_suncc_cstd_abi
-]])# _LT_FUNC_SUNCC_CSTD_ABI
-
-
 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
 # ---------------------------------
 # Figure out "hidden" library dependencies from verbose
@@ -7452,7 +7449,6 @@ func_suncc_cstd_abi ()
 # objects, libraries and library flags.
 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_FUNC_SUNCC_CSTD_ABI])dnl
 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
 # Dependencies to place before and after the object being linked:
 _LT_TAGVAR(predep_objects, $1)=
@@ -7623,30 +7619,6 @@ interix[[3-9]]*)
   _LT_TAGVAR(postdep_objects,$1)=
   _LT_TAGVAR(postdeps,$1)=
   ;;
-
-linux*)
-  case `$CC -V 2>&1 | sed 5q` in
-  *Sun\ C*) # Sun C++ 5.9
-    func_suncc_cstd_abi
-
-    if test no != "$suncc_use_cstd_abi"; then
-      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
-    fi
-    ;;
-  esac
-  ;;
-
-solaris*)
-  case $cc_basename in
-  CC* | sunCC*)
-    func_suncc_cstd_abi
-
-    if test no != "$suncc_use_cstd_abi"; then
-      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
-    fi
-    ;;
-  esac
-  ;;
 esac
 ])
 


hooks/post-receive
-- 
GNU Libtool



reply via email to

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