This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.22-459-gd337ceb


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 C Library master sources".

The branch, master has been updated
       via  d337ceb76d898935560dc264cf2ad36b17017db7 (commit)
      from  6d834d2216bcc733fa04c5a59b5ac6f6f1134f2b (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 -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d337ceb76d898935560dc264cf2ad36b17017db7

commit d337ceb76d898935560dc264cf2ad36b17017db7
Author: Florian Weimer <fweimer@redhat.com>
Date:   Mon Oct 26 09:41:10 2015 +0100

    Use the CXX compiler only if it can create dynamic and static programs
    
    	* configure.ac (CXX): Clear the variable if the C++ toolchain does
    	not support static linking.
    	* configure: Regenerate.

diff --git a/ChangeLog b/ChangeLog
index 041a6eb..30d6dd9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2015-10-26  Florian Weimer  <fweimer@redhat.com>
+
+	* configure.ac (CXX): Clear the variable if the C++ toolchain does
+	not support static linking.
+	* configure: Regenerate.
+
 2015-10-23  Joseph Myers  <joseph@codesourcery.com>
 
 	* math/libm-test.inc (check_float_internal): Do not special-case
diff --git a/configure b/configure
index 8aea992..ff3ad55 100755
--- a/configure
+++ b/configure
@@ -3173,6 +3173,7 @@ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
+# Default, dynamic case.
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -3191,6 +3192,30 @@ else
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+# Static case.
+old_LDFLAGS="$LDFLAGS"
+LDFLAGS="$LDFLAGS -static"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <iostream>
+
+int
+main()
+{
+  std::cout << "Hello, world!";
+  return 0;
+}
+
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+
+else
+  libc_cv_cxx_link_ok=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LDFLAGS="$old_LDFLAGS"
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
diff --git a/configure.ac b/configure.ac
index e502aa5..3c7f6c0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -57,9 +57,26 @@ AC_PROG_CXX
 # It's useless to us if it can't link programs (e.g. missing -lstdc++).
 AC_CACHE_CHECK([whether $CXX can link programs], libc_cv_cxx_link_ok, [dnl
 AC_LANG_PUSH([C++])
+# Default, dynamic case.
 AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
 	       [libc_cv_cxx_link_ok=yes],
 	       [libc_cv_cxx_link_ok=no])
+# Static case.
+old_LDFLAGS="$LDFLAGS"
+LDFLAGS="$LDFLAGS -static"
+AC_LINK_IFELSE([AC_LANG_SOURCE([
+#include <iostream>
+
+int
+main()
+{
+  std::cout << "Hello, world!";
+  return 0;
+}
+])],
+	       [],
+	       [libc_cv_cxx_link_ok=no])
+LDFLAGS="$old_LDFLAGS"
 AC_LANG_POP([C++])])
 AS_IF([test $libc_cv_cxx_link_ok != yes], [CXX=])
 

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

Summary of changes:
 ChangeLog    |    6 ++++++
 configure    |   25 +++++++++++++++++++++++++
 configure.ac |   17 +++++++++++++++++
 3 files changed, 48 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]