diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst --- a/clang/docs/ReleaseNotes.rst +++ b/clang/docs/ReleaseNotes.rst @@ -181,6 +181,9 @@ ``$prefix/lib/clang/$CLANG_MAJOR_VERSION`` and can be queried using ``clang -print-resource-dir``, just like before. +- To match GCC, ``__ppc64__`` is no longer defined on PowerPC64 targets. Use + ``__powerpc64__`` instead. + What's New in Clang |release|? ============================== Some of the major new features and improvements to Clang are listed diff --git a/clang/lib/Basic/Targets/PPC.cpp b/clang/lib/Basic/Targets/PPC.cpp --- a/clang/lib/Basic/Targets/PPC.cpp +++ b/clang/lib/Basic/Targets/PPC.cpp @@ -281,7 +281,6 @@ if (PointerWidth == 64) { Builder.defineMacro("_ARCH_PPC64"); Builder.defineMacro("__powerpc64__"); - Builder.defineMacro("__ppc64__"); Builder.defineMacro("__PPC64__"); } else if (getTriple().isOSAIX()) { // The XL compilers on AIX define _ARCH_PPC64 for both 32 and 64-bit modes. diff --git a/clang/test/Preprocessor/init-ppc64.c b/clang/test/Preprocessor/init-ppc64.c --- a/clang/test/Preprocessor/init-ppc64.c +++ b/clang/test/Preprocessor/init-ppc64.c @@ -198,7 +198,6 @@ // PPC64:#define __WCHAR_WIDTH__ 32 // PPC64:#define __WINT_TYPE__ int // PPC64:#define __WINT_WIDTH__ 32 -// PPC64:#define __ppc64__ 1 // PPC64:#define __ppc__ 1 // // RUN: %clang_cc1 -E -dM -ffreestanding -triple=powerpc64le-none-none -target-cpu pwr7 -fno-signed-char < /dev/null | FileCheck -match-full-lines -check-prefix PPC64LE %s @@ -403,7 +402,6 @@ // PPC64LE:#define __WCHAR_WIDTH__ 32 // PPC64LE:#define __WINT_TYPE__ int // PPC64LE:#define __WINT_WIDTH__ 32 -// PPC64LE:#define __ppc64__ 1 // PPC64LE:#define __ppc__ 1 // // RUN: %clang_cc1 -E -dM -ffreestanding -triple=powerpc64-none-none -target-cpu 630 -fno-signed-char < /dev/null | FileCheck -match-full-lines -check-prefix PPC630 %s @@ -865,7 +863,6 @@ // PPC64-AIX:#define __WINT_WIDTH__ 32 // PPC64-AIX:#define __powerpc64__ 1 // PPC64-AIX:#define __powerpc__ 1 -// PPC64-AIX:#define __ppc64__ 1 // PPC64-AIX:#define __ppc__ 1 // // RUN: %clang_cc1 -E -dM -ffreestanding -triple=powerpc64-unknown-linux-gnu -fno-signed-char < /dev/null | FileCheck -match-full-lines -check-prefix PPC64-LINUX %s @@ -1064,7 +1061,6 @@ // PPC64-LINUX:#define __WINT_WIDTH__ 32 // PPC64-LINUX:#define __powerpc64__ 1 // PPC64-LINUX:#define __powerpc__ 1 -// PPC64-LINUX:#define __ppc64__ 1 // PPC64-LINUX:#define __ppc__ 1 // RUN: %clang_cc1 -E -dM -ffreestanding -fgnuc-version=4.2.1 -triple=powerpc64-unknown-linux-gnu < /dev/null | FileCheck -match-full-lines -check-prefix PPC64-ELFv1 %s