Skip to content
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

Support E2K (MCST Elbrus 2000) #381

Merged
merged 1 commit into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 8 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,15 @@ IF(MSVC)

ELSEIF(CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64le")

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mcpu=native")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mcpu=native")

ELSEIF(CMAKE_SYSTEM_PROCESSOR STREQUAL "e2k")

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mtune=native")

ELSEIF(CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2 -mfpmath=sse")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2 -mfpmath=sse")

ENDIF()

Expand Down Expand Up @@ -134,6 +138,8 @@ IF(CONFIG_LINUX_PACKAGING_SUPPORT)
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "arm64")
ELSEIF(CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64le")
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "ppc64el")
ELSEIF(CMAKE_SYSTEM_PROCESSOR STREQUAL "e2k")
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "e2k")
ELSE()
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64")
ENDIF()
Expand Down
3 changes: 3 additions & 0 deletions inc/shared/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
#elif __powerpc64__ && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
#define CPUSTRING "ppc64le"
#define BUILDSTRING "Linux"
#elif __e2k__
#define CPUSTRING "e2k"
#define BUILDSTRING "Linux"
#else
#define CPUSTRING "x86"
#define BUILDSTRING "Linux"
Expand Down
8 changes: 7 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,13 @@ IF(IS_64_BIT)
PROPERTIES
LIBRARY_OUTPUT_NAME "gameppc64le"
RUNTIME_OUTPUT_NAME "gameppc64le"
)
)
ELSEIF(CMAKE_SYSTEM_PROCESSOR STREQUAL "e2k")
SET_TARGET_PROPERTIES(game
PROPERTIES
LIBRARY_OUTPUT_NAME "gamee2k"
RUNTIME_OUTPUT_NAME "gamee2k"
)
ELSE()
SET_TARGET_PROPERTIES(game
PROPERTIES
Expand Down