forked from id-Software/Enemy-Territory
-
Notifications
You must be signed in to change notification settings - Fork 21
Support PowerPC64 architecture #85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
runlevel5
wants to merge
2
commits into
etfdevs:master
Choose a base branch
from
runlevel5:support-ppc64
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -54,6 +54,8 @@ check_type_size("void*" CMAKE_SIZEOF_VOID_P) | |
| set(X86_64 OFF) | ||
| set(ARM32 OFF) | ||
| set(ARM64 OFF) | ||
| set(PPC64 OFF) | ||
| set(PPC64LE OFF) | ||
| if(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm") | ||
| set(ARM32 ON) | ||
| set(Architecture "arm") | ||
|
|
@@ -75,7 +77,11 @@ check_type_size("void*" CMAKE_SIZEOF_VOID_P) | |
| elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "powerpc") | ||
| set(Architecture "ppc") | ||
| elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "powerpc64") | ||
| set(PPC64 ON) | ||
| set(Architecture "ppc64") | ||
| elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64le") | ||
| set(PPC64LE ON) | ||
| set(Architecture "ppc64le") | ||
| else() | ||
| set(Architecture "${CMAKE_SYSTEM_PROCESSOR}") | ||
| endif() | ||
|
|
@@ -113,6 +119,10 @@ if(APPLE AND X86_64) | |
| set(compiler_flags_release ${compiler_flags_global}) | ||
| elseif(X86_64) | ||
| set(compiler_flags_release ${compiler_flags_global}) | ||
| elseif(PPC64LE) | ||
| set(compiler_flags_release ${compiler_flags_global} -mcpu=power8) | ||
| elseif(PPC64) | ||
| set(compiler_flags_release ${compiler_flags_global} -mcpu=powerpc64) | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fallback to generic 64bit PPC64 if not LE |
||
| else() | ||
| if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
| set(compiler_flags_release ${compiler_flags_global} -march=i686 -Winline -ffast-math -fomit-frame-pointer -finline-functions) | ||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3616,14 +3616,11 @@ static void Sys_GetProcessorId( char *vendor ) | |
| Com_sprintf( vendor, 128, "%s %s", ARCH_STRING, (const char*)getauxval( AT_PLATFORM ) ); | ||
| #endif | ||
| #endif // !arm32 | ||
| } | ||
|
|
||
| #if idppc || idppc64 | ||
| static void Sys_GetProcessorId( char *vendor ) | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To address the build error: |
||
| { | ||
| Com_sprintf( vendor, 100, "%s", ARCH_STRING ); | ||
| } | ||
| Com_sprintf( vendor, 100, "%s", ARCH_STRING ); | ||
| #endif | ||
| } | ||
|
|
||
| #endif // __linux__ | ||
|
|
||
|
|
||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
POWER8 is the first to support Little Endian. This is the lowest common value for all CPUs that supports LE for example POWER8, POWER9 and POWER10
ref: https://www.ibm.com/docs/en/openxl-c-and-cpp-aix/17.1.0?topic=options-mcpu