Bug 1289239 - Remove autoconf-based C++ compiler validation check. r?chmanchester draft
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 22 Jul 2016 19:13:56 +0900
changeset 392645 7b26a73fcf9a07926cd8e1e432aacd94b44e89a1
parent 392445 251fccc1f62bf0eac569ef4f6717fea61ebadb27
child 392646 d3c961df63348f735edbf78a75b6b7a098d4ed5e
push id24073
push userbmo:mh+mozilla@glandium.org
push dateMon, 25 Jul 2016 22:45:33 +0000
reviewerschmanchester
bugs1289239
milestone50.0a1
Bug 1289239 - Remove autoconf-based C++ compiler validation check. r?chmanchester Python configure is already checking that the C++ compiler is indeed a C++ compiler, no need to double check in old-configure.
build/autoconf/compiler-opts.m4
--- a/build/autoconf/compiler-opts.m4
+++ b/build/autoconf/compiler-opts.m4
@@ -142,28 +142,16 @@ AC_DEFUN([MOZ_COMPILER_OPTS],
 if test "$CLANG_CXX"; then
     ## We disable return-type-c-linkage because jsval is defined as a C++ type but is
     ## returned by C functions. This is possible because we use knowledge about the ABI
     ## to typedef it to a C type with the same layout when the headers are included
     ## from C.
     _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wno-unknown-warning-option -Wno-return-type-c-linkage"
 fi
 
-AC_MSG_CHECKING([whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) actually is a C++ compiler])
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-_SAVE_LIBS=$LIBS
-LIBS=
-AC_TRY_LINK([#include <new>], [int *foo = new int;],,
-            AC_MSG_RESULT([no])
-            AC_MSG_ERROR([$CXX $CXXFLAGS $LDFLAGS failed to compile and link a simple C++ source.]))
-LIBS=$_SAVE_LIBS
-AC_LANG_RESTORE
-AC_MSG_RESULT([yes])
-
 if test -n "$DEVELOPER_OPTIONS"; then
     MOZ_FORCE_GOLD=1
 fi
 
 MOZ_ARG_ENABLE_BOOL(gold,
 [  --enable-gold           Enable GNU Gold Linker when it is not already the default],
     MOZ_FORCE_GOLD=1,
     MOZ_FORCE_GOLD=