Michael van der Westhuizen:  Patches for Linux.  Fixes http://llvm.org/bugs/show_bug.cgi?id=14648.

llvm-svn: 172435
diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt
index 663467e..b793e6e 100644
--- a/libcxx/CMakeLists.txt
+++ b/libcxx/CMakeLists.txt
@@ -70,7 +70,7 @@
   set(LIBCXX_LIBSUPCXX_INCLUDE_PATHS "${LIBCXX_LIBSUPCXX_INCLUDE_PATHS}"
       CACHE STRINGS
       "Paths to libsupc++ include directories separate by ';'.")
-  set(LIBCXX_CXX_ABI_LIBRARIES stdc++)
+  set(LIBCXX_CXX_ABI_LIBRARIES supc++)
   set(LIBCXX_LIBSUPCXX_FILES
       cxxabi.h
       bits/c++config.h
diff --git a/libcxx/include/__config b/libcxx/include/__config
index 203be76..8617b86 100644
--- a/libcxx/include/__config
+++ b/libcxx/include/__config
@@ -66,6 +66,12 @@
 #  endif
 #endif  // _WIN32
 
+#ifdef __linux__
+#  if defined(__GNUC__) && _GNUC_VER >= 403
+#    define _LIBCP_HAS_IS_BASE_OF
+#  endif
+#endif
+
 #ifdef __sun__
 # include <sys/isa_defs.h>
 # ifdef _LITTLE_ENDIAN
diff --git a/libcxx/test/lit.cfg b/libcxx/test/lit.cfg
index 8121da1..512935c 100644
--- a/libcxx/test/lit.cfg
+++ b/libcxx/test/lit.cfg
@@ -146,7 +146,7 @@
     cxx_has_stdcxx0x_flag = getattr(config, 'cxx_has_stdcxx0x_flag', True)
 
 # Configure extra compiler flags.
-include_paths = ['-I' + libcxx_src_root + '/include']
+include_paths = ['-I' + libcxx_src_root + '/include', '-I' + libcxx_src_root + '/test/support']
 library_paths = ['-L' + libcxx_obj_root + '/lib']
 compile_flags = []
 if cxx_has_stdcxx0x_flag: