Skip to content

Commit

Permalink
Merge pull request supercollider#66 from danstowell/fix_arm_compile
Browse files Browse the repository at this point in the history
compile fix: don't use x86 SSE compile flags on ARM
  • Loading branch information
danstowell committed Jan 18, 2016
2 parents 72e9346 + 05aecbf commit d905669
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
12 changes: 7 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,13 @@ endif()

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)
add_definitions(-fvisibility=hidden)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse -msse2")
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -msse -msse2")
if(NOT APPLE AND NOT CMAKE_COMPILER_IS_CLANG)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfpmath=sse")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpmath=sse")
IF(NOT ${CMAKE_SYSTEM_PROCESSOR} MATCHES "^arm")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse -msse2")
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -msse -msse2")
if(NOT APPLE AND NOT CMAKE_COMPILER_IS_CLANG)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfpmath=sse")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpmath=sse")
endif()
endif()
if(NATIVE)
add_definitions(-march=native)
Expand Down
8 changes: 5 additions & 3 deletions source/StkInst/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@ if(APPLE OR WIN32)
endif()

if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2 -mstackrealign")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2 -mstackrealign")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
IF(NOT ${CMAKE_SYSTEM_PROCESSOR} MATCHES "^arm")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2 -mstackrealign")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2 -mstackrealign")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
endif()
endif()
if(NOT SYSTEM_STK)
add_definitions("-D_STK_DEBUG_")
Expand Down

0 comments on commit d905669

Please sign in to comment.