diff --git a/share/wut.cmake b/share/wut.cmake index 9643800..ab57920 100644 --- a/share/wut.cmake +++ b/share/wut.cmake @@ -45,18 +45,16 @@ function(wut_create_rpl target source) cmake_parse_arguments(RPL "${RPL_OPTIONS}" "${RPL_SINGLE_ARGS}" "${RPL_MULTI_ARGS}" "${ARGN}") if(RPL_IS_RPX) - target_link_libraries(${source} - coreinit - wutcrt) + set_property(TARGET ${source} APPEND_STRING PROPERTY + LINK_FLAGS "-specs=${WUT_ROOT}/share/rpx.specs") else() set(ELF2RPL_FLAGS ${ELF2RPL_FLAGS} --rpl) - target_link_libraries(${source} - coreinit - wutcrtrpl) + set_property(TARGET ${source} APPEND_STRING PROPERTY + LINK_FLAGS "-specs=${WUT_ROOT}/share/rpl.specs") endif() target_link_libraries(${source} - coreinit) + wut) add_custom_target(${target} ALL COMMAND ${CMAKE_STRIP} -g ${source} diff --git a/share/wut.toolchain.cmake b/share/wut.toolchain.cmake index 9d7f908..09c3e95 100644 --- a/share/wut.toolchain.cmake +++ b/share/wut.toolchain.cmake @@ -53,7 +53,7 @@ set(WUT_C_FLAGS "-mcpu=750 -meabi -mhard-float -Wl,-q -D__WIIU__ -D__ set(CMAKE_C_FLAGS "${WUT_C_FLAGS}" CACHE STRING "") set(CMAKE_CXX_FLAGS "${WUT_C_FLAGS}" CACHE STRING "") set(CMAKE_ASM_FLAGS "${WUT_C_FLAGS}" CACHE STRING "") -set(CMAKE_EXE_LINKER_FLAGS "-Wl,-z,nocopyreloc -T \"${WUT_ROOT}/share/wut.ld\" \"-L${WUT_ROOT}/lib\"" CACHE STRING "") +set(CMAKE_EXE_LINKER_FLAGS "\"-L${WUT_ROOT}/lib\" \"-L${WUT_ROOT}/lib/stubs\" -specs=${WUT_ROOT}/share/wut.specs" CACHE STRING "") # Setup root to exclude host system headers + libraries set(CMAKE_FIND_ROOT_PATH "${DEVKITPPC}" "${DEVKITPRO}/tools" "${DEVKITPRO}/portlibs/wiiu" "${DEVKITPRO}/portlibs/ppc" "${WUT_ROOT}/share")