Define _GNU_SOURCE in C++ mode so that clang works with GNU libstdc++.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80289 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Frontend/InitPreprocessor.cpp b/lib/Frontend/InitPreprocessor.cpp
index 466cbaf..5550547 100644
--- a/lib/Frontend/InitPreprocessor.cpp
+++ b/lib/Frontend/InitPreprocessor.cpp
@@ -313,6 +313,8 @@
       //   C++ translation unit.
       DefineBuiltinMacro(Buf, "__cplusplus=199711L");
     DefineBuiltinMacro(Buf, "__private_extern__=extern");
+    // Ugly hack to work with GNU libstdc++.
+    DefineBuiltinMacro(Buf, "_GNU_SOURCE=1");
   }
   
   // Filter out some microsoft extensions when trying to parse in ms-compat