PSP2: Update for Unity
Jeffrey Pfau jeffrey@endrift.com
Sat, 15 Aug 2015 02:26:47 -0700
2 files changed,
14 insertions(+),
1 deletions(-)
M
src/platform/psp2/CMakeToolchain.txt
→
src/platform/psp2/CMakeToolchain.txt
@@ -10,6 +10,10 @@ else()
set(DEVKITARM ${DEVKITPRO}/devkitARM) endif() +if(NOT DEFINED UNITY) + set(UNITY ON) +endif() + set(toolchain_dir ${DEVKITARM}/psp2) set(toolchain_bin_dir ${toolchain_dir}/bin) set(cross_prefix ${DEVKITARM}/bin/arm-none-eabi-)@@ -24,7 +28,11 @@ set(CMAKE_AR ${cross_prefix}ar CACHE INTERNAL "archiver")
set(CMAKE_C_COMPILER ${cross_prefix}gcc CACHE INTERNAL "c compiler") set(CMAKE_CXX_COMPILER ${cross_prefix}g++ CACHE INTERNAL "cxx compiler") set(CMAKE_ASM_COMPILER ${cross_prefix}gcc CACHE INTERNAL "assembler") -set(common_flags "${arch_flags} -fno-reorder-functions -fno-optimize-sibling-calls ${inc_flags}") +if(NOT UNITY) + set(common_flags "${arch_flags} -fno-reorder-functions -fno-optimize-sibling-calls ${inc_flags}") +else() + set(common_flags "${arch_flags} -fno-gcse -fno-tree-vectorize ${inc_flags}") +endif() set(CMAKE_C_FLAGS ${common_flags} CACHE INTERNAL "c compiler flags") set(CMAKE_ASM_FLAGS ${common_flags} CACHE INTERNAL "c compiler flags") set(CMAKE_CXX_FLAGS ${common_flags} CACHE INTERNAL "cxx compiler flags")
M
src/platform/psp2/psp2-context.c
→
src/platform/psp2/psp2-context.c
@@ -257,3 +257,8 @@ } else {
vita2d_draw_texture_scale(tex, 120, 32, 3.0f, 3.0f); } } + +__attribute__((noreturn, weak)) void __assert_func(const char* file, int line, const char* func, const char* expr) { + printf("ASSERT FAILED: %s in %s at %s:%i\n", expr, func, file, line); + exit(1); +}