cmake: disable default x86/x64 flags on OSes that provide them

This commit is contained in:
Lephenixnoir 2021-02-03 23:17:27 +01:00
parent c3d9b53758
commit 6415476fe3
No known key found for this signature in database
GPG key ID: 1BBA026E13FC0495
2 changed files with 8 additions and 0 deletions

View file

@ -4,6 +4,7 @@
set(CMAKE_SYSTEM_NAME Generic)
set(CMAKE_SYSTEM_VERSION 1)
set(CMAKE_SYSTEM_PROCESSOR sh)
set(FXSDK_PLATFORM fx)
set(FXSDK_PLATFORM_LONG fx9860G)
@ -11,6 +12,9 @@ set(FXSDK_PLATFORM_LONG fx9860G)
set(CMAKE_C_COMPILER sh-elf-gcc)
set(CMAKE_CXX_COMPILER sh-elf-g++)
set(CMAKE_C_FLAGS_INIT "")
set(CMAKE_CXX_FLAGS_INIT "")
add_compile_options(-mb -ffreestanding -nostdlib -Wa,--dsp)
add_link_options(-nostdlib)
link_libraries(-lgcc)

View file

@ -4,6 +4,7 @@
set(CMAKE_SYSTEM_NAME Generic)
set(CMAKE_SYSTEM_VERSION 1)
set(CMAKE_SYSTEM_PROCESSOR sh)
set(FXSDK_PLATFORM cg)
set(FXSDK_PLATFORM_LONG fxCG50)
@ -11,6 +12,9 @@ set(FXSDK_PLATFORM_LONG fxCG50)
set(CMAKE_C_COMPILER sh-elf-gcc)
set(CMAKE_CXX_COMPILER sh-elf-g++)
set(CMAKE_C_FLAGS_INIT "")
set(CMAKE_CXX_FLAGS_INIT "")
add_compile_options(-m4-nofpu -mb -ffreestanding -nostdlib -Wa,--dsp)
add_link_options(-nostdlib)
link_libraries(-lgcc)