-
Notifications
You must be signed in to change notification settings - Fork 387
QNX build support #278
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
eleir9268
wants to merge
6
commits into
pytorch:main
Choose a base branch
from
qnx-ports:qnx_main
base: main
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
QNX build support #278
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
db1a516
Import QNX port
jianyan-li-qnx 80a506b
fix invalid cmakefile evaluation
18218b9
Fixed a ptr comparison.
eleir9268 cb9972e
Added x86_64 support (with gcc package).
eleir9268 cc5efef
Cleanup.
eleir9268 05e5a6b
Add QNX to README.md
eleir9268 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 |
|---|---|---|
|
|
@@ -108,7 +108,7 @@ IF(NOT CMAKE_SYSTEM_NAME) | |
| "Target operating system is not specified. " | ||
| "cpuinfo will compile, but cpuinfo_initialize() will always fail.") | ||
| SET(CPUINFO_SUPPORTED_PLATFORM FALSE) | ||
| ELSEIF(NOT CMAKE_SYSTEM_NAME MATCHES "^(Windows|WindowsStore|CYGWIN|MSYS|Darwin|Linux|Android|FreeBSD)$") | ||
| ELSEIF(NOT CMAKE_SYSTEM_NAME MATCHES "^(Windows|WindowsStore|CYGWIN|MSYS|Darwin|Linux|Android|FreeBSD|QNX)$") | ||
| IF(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.14" AND NOT IS_APPLE_OS) | ||
| MESSAGE(WARNING | ||
| "Target operating system \"${CMAKE_SYSTEM_NAME}\" is not supported in cpuinfo. " | ||
|
|
@@ -160,7 +160,27 @@ ENDIF() | |
| # ---[ cpuinfo library | ||
| SET(CPUINFO_SRCS src/api.c src/cache.c src/init.c src/log.c) | ||
|
|
||
| IF(CPUINFO_SUPPORTED_PLATFORM) | ||
| IF(QNX) | ||
| LIST(APPEND CPUINFO_SRCS | ||
| src/qnx/api.c | ||
| src/arm/uarch.c | ||
| ) | ||
| IF(CPUINFO_TARGET_PROCESSOR MATCHES "^(i[3-6]86|AMD64|x86(_64)?)$") | ||
| LIST(APPEND CPUINFO_SRCS | ||
| src/x86/init.c | ||
| src/x86/info.c | ||
| src/x86/vendor.c | ||
| src/x86/uarch.c | ||
| src/x86/name.c | ||
| src/x86/topology.c | ||
| src/x86/isa.c | ||
| src/x86/cache/init.c | ||
| src/x86/cache/descriptor.c | ||
| src/x86/cache/deterministic.c) | ||
| ENDIF() | ||
| ENDIF() | ||
|
|
||
| IF(CPUINFO_SUPPORTED_PLATFORM AND NOT QNX) | ||
| IF(NOT CMAKE_SYSTEM_NAME STREQUAL "Emscripten" AND (CPUINFO_TARGET_PROCESSOR MATCHES "^(i[3-6]86|AMD64|x86(_64)?)$" OR IOS_ARCH MATCHES "^(i386|x86_64)$")) | ||
| LIST(APPEND CPUINFO_SRCS | ||
| src/x86/init.c | ||
|
|
@@ -807,7 +827,7 @@ IF(CPUINFO_SUPPORTED_PLATFORM AND CPUINFO_BUILD_MOCK_TESTS) | |
| ENDIF() | ||
|
|
||
| # ---[ cpuinfo unit tests | ||
| IF(CPUINFO_SUPPORTED_PLATFORM AND CPUINFO_BUILD_UNIT_TESTS) | ||
| IF(CPUINFO_SUPPORTED_PLATFORM AND CPUINFO_BUILD_UNIT_TESTS AND NOT QNX) | ||
|
Collaborator
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. ditto. if QNX is 'supported' and has unittests, remove AND NOT QNX. |
||
| ADD_EXECUTABLE(init-test test/init.cc) | ||
| CPUINFO_TARGET_ENABLE_CXX11(init-test) | ||
| CPUINFO_TARGET_RUNTIME_LIBRARY(init-test) | ||
|
|
@@ -878,7 +898,7 @@ IF(CPUINFO_SUPPORTED_PLATFORM AND CPUINFO_BUILD_TOOLS) | |
| TARGET_LINK_LIBRARIES(cache-info PRIVATE cpuinfo) | ||
| INSTALL(TARGETS cache-info RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) | ||
|
|
||
| IF(CMAKE_SYSTEM_NAME MATCHES "^(Android|Linux)$" AND CMAKE_SYSTEM_PROCESSOR MATCHES "^(armv[5-8].*|aarch64)$") | ||
| IF(CMAKE_SYSTEM_NAME MATCHES "^(Android|Linux|QNX)$" AND CMAKE_SYSTEM_PROCESSOR MATCHES "^(armv[5-8].*|aarch64)$") | ||
| ADD_EXECUTABLE(auxv-dump tools/auxv-dump.c) | ||
| CPUINFO_TARGET_ENABLE_C99(auxv-dump) | ||
| CPUINFO_TARGET_RUNTIME_LIBRARY(auxv-dump) | ||
|
|
||
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
Oops, something went wrong.
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.
Is this really needed? make QNX like other x86 if you can