[physx] Fix x86 Linux build errors#30014
Merged
dan-shaw merged 1 commit intomicrosoft:masterfrom Mar 20, 2023
Merged
Conversation
dg0yt
reviewed
Mar 4, 2023
As per comments in the source, "some GCC compilers need the compiler flag -malign-double to be set." https://github.com/NVIDIAGameWorks/PhysX/blob/a2c0428acab643e60618c681b501e86f7fd558cc/pxshared/include/foundation/PxPreprocessor.h#L473
LilyWangLL
approved these changes
Mar 6, 2023
dan-shaw
reviewed
Mar 6, 2023
| ELSEIF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") | ||
| SET(PHYSX_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-rtti -fno-exceptions -ffunction-sections -fdata-sections -fno-strict-aliasing ${GCC_WARNINGS}" CACHE INTERNAL "PhysX CXX") | ||
| + | ||
| + # Enable SSE2 and fix double alignment for 32-bit x86 builds |
Contributor
There was a problem hiding this comment.
Can you submit this fix to upstream?
Contributor
Author
There was a problem hiding this comment.
I can, but upstream tends to never accept pull requests and is no longer supported by Nvidia (they have a different repo for their PhysX v5.1.x release which also doesn't really seem to accept pull requests)
Contributor
Author
|
Upstream pull request: NVIDIAGameWorks/PhysX#627 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As per comments in the source, "some GCC compilers need the compiler flag -malign-double to be set."
https://github.com/NVIDIAGameWorks/PhysX/blob/a2c0428acab643e60618c681b501e86f7fd558cc/pxshared/include/foundation/PxPreprocessor.h#L473
./vcpkg x-add-version --alland committing the result.