[all-commits] [llvm/llvm-project] bee5bc: [ELF] #undef PPC to support GCC powerpc32 build

Fangrui Song via All-commits all-commits at lists.llvm.org
Mon Dec 20 10:13:02 PST 2021

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bee5bc9075a44ae74f57a956ebe6d7ce7aa7524b
  Author: Fangrui Song <i at maskray.me>
  Date:   2021-12-20 (Mon, 20 Dec 2021)

  Changed paths:
    M lld/ELF/Arch/PPC.cpp

  Log Message:
  [ELF] #undef PPC to support GCC powerpc32 build

GCC's powerpc32 port predefines `PPC` as a macro in GNU C++ mode in some configurations (Linux,
FreeBSD, and some others. See `builtin_define_std ("PPC"); ` in gcc/config/rs6000).

% powerpc-linux-gnu-g++ -E -dM -xc++ /dev/null -o - | grep -w PPC
#define PPC 1

Fixes https://bugs.gentoo.org/829599

Reviewed By: thesamesam

Differential Revision: https://reviews.llvm.org/D116017

More information about the All-commits mailing list