From 21a92a8a559ba27907290bafd181e490101a4fcb Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sat, 13 Jul 2019 06:27:35 +0000 Subject: This reverts commit 632a36bfcfc8273c1861f04ff6758d863c47c784. Some targets such as Python 2.7.16 still use VERSION in their builds. Without VERSION defined, the source code has syntax errors. Reverting as it will probably break many other things. Noticed by Sterling Augustine llvm-svn: 365992 --- clang/lib/Frontend/InitPreprocessor.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'clang/lib/Frontend/InitPreprocessor.cpp') diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp index a02c266..1741ba5 100644 --- a/clang/lib/Frontend/InitPreprocessor.cpp +++ b/clang/lib/Frontend/InitPreprocessor.cpp @@ -604,6 +604,12 @@ static void InitializePredefinedMacros(const TargetInfo &TI, // Support for #pragma redefine_extname (Sun compatibility) Builder.defineMacro("__PRAGMA_REDEFINE_EXTNAME", "1"); + // As sad as it is, enough software depends on the __VERSION__ for version + // checks that it is necessary to report 4.2.1 (the base GCC version we claim + // compatibility with) first. + Builder.defineMacro("__VERSION__", "\"4.2.1 Compatible " + + Twine(getClangFullCPPVersion()) + "\""); + // Initialize language-specific preprocessor defines. // Standard conforming mode? -- cgit v1.1