Skip to content

Fix ppc64le Clang build: guard intrinsics already defined as builtins#1073

Open
runlevel5 wants to merge 3 commits intoRobertBeckebans:masterfrom
runlevel5:fix/ppc64le-clang-builtins
Open

Fix ppc64le Clang build: guard intrinsics already defined as builtins#1073
runlevel5 wants to merge 3 commits intoRobertBeckebans:masterfrom
runlevel5:fix/ppc64le-clang-builtins

Conversation

@runlevel5
Copy link
Copy Markdown

On ppc64le, Clang pre-defines __fmadds, __fnmsubs, and __fsels as macros mapping to compiler builtins. Wrap our custom definitions with #ifndef guards so they are skipped when the compiler already provides them.

Fixes #1042

On ppc64le, Clang pre-defines __fmadds, __fnmsubs, and __fsels as
macros mapping to compiler builtins. Wrap our custom definitions
with #ifndef guards so they are skipped when the compiler already
provides them.

Fixes RobertBeckebans#1042
This codebase intentionally uses memset/memcpy on types that are
effectively POD but not technically trivially copyable. Add
-Wno-nontrivial-memcall to the Clang warning flags.
@runlevel5 runlevel5 force-pushed the fix/ppc64le-clang-builtins branch from 1bab306 to 0b60e8f Compare February 8, 2026 12:19
@SRSaunders
Copy link
Copy Markdown

SRSaunders commented Feb 8, 2026

@runlevel5 the conflict comes from the same nontrivial-memcall change I made, which was just merged. I guess we found the same thing! Just revert that commit in your PR and the conflict should disappear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Linux][ppc64le] Failed to compile with clang

2 participants