jrouwe / JoltPhysics

A multi core friendly rigid body physics and collision detection library. Written in C++. Suitable for games and VR applications. Used by Horizon Forbidden West.
MIT License
6.65k stars 438 forks source link

Fix compile error: __builtin_bitreverse32 does not exist in gcc ARM version #1186

Closed stephengold closed 3 months ago

stephengold commented 3 months ago
  1. specify std namespace for the signbit() function
  2. avoid using __builtin_bitreverse32() when compiling for ARM with GCC
CLAassistant commented 3 months ago

CLA assistant check
All committers have signed the CLA.

stephengold commented 3 months ago

This pull request is meant to address https://github.com/jrouwe/JoltPhysics/issues/1184

jrouwe commented 3 months ago

Hello, I'm currently on holiday. I'll look at it when I'm back

jrouwe commented 3 months ago

Nevermind, this statement is not true.

jrouwe commented 3 months ago

Thanks for your contribution! I see there are more errors when trying to compile with gcc on armv8 (gcc is not my main compiler platform). I'll see if I can fix those too.

jrouwe commented 3 months ago

390cb1f6fe305a4e9ea6a7048fba61d7d53a07f0 fixes armv8 too.

stephengold commented 3 months ago

Thanks for working with me.

I have some armv8 fixes of my own. I'll take a look at 390cb1f in case it addresses them. Otherwise I'll open a new issue.

jrouwe commented 3 months ago

I assume it's these changes:

https://github.com/jrouwe/JoltPhysics/compare/master...stephengold:JoltPhysics:sg500

If so, then yes those changes should no longer be needed.