wut.ld: make __rpx_start the default entry symbol, remove rpx.specs

ld will now auto-link everything to __rpx_start and pull in the correct 
crt *unless* rpl.specs is given on the commandline
This commit is contained in:
Ash Logan 2019-05-03 18:02:15 +10:00
parent 5528236b56
commit 4374621f4b
5 changed files with 4 additions and 7 deletions

View File

@ -1,2 +0,0 @@
*wut_entry:
--entry=__rpx_start

View File

@ -45,8 +45,7 @@ function(wut_create_rpl target source)
cmake_parse_arguments(RPL "${RPL_OPTIONS}" "${RPL_SINGLE_ARGS}" "${RPL_MULTI_ARGS}" "${ARGN}")
if(RPL_IS_RPX)
set_property(TARGET ${source} APPEND_STRING PROPERTY
LINK_FLAGS "-specs=${WUT_ROOT}/share/rpx.specs")
# Do nothing - the defaults are good for RPX
else()
set(ELF2RPL_FLAGS ${ELF2RPL_FLAGS} --rpl)
set_property(TARGET ${source} APPEND_STRING PROPERTY

View File

@ -8,7 +8,7 @@ MEMORY {
loadmem (rwx) : ORIGIN = 0xC0000000, LENGTH = 128M
}
ENTRY(_start)
ENTRY(__rpx_start)
SECTIONS
{

View File

@ -72,7 +72,7 @@ ifneq ($(strip $(WUT_NO_LDGROUPS)), 1)
endif
# RPX and RPL need slightly different crts (init code)
%.rpx: LDFLAGS += -specs=$(WUT_ROOT)/share/rpx.specs
#%.rpx: LDFLAGS += -specs=$(WUT_ROOT)/share/rpx.specs
%.rpl: LDFLAGS += -specs=$(WUT_ROOT)/share/rpl.specs
# ------------------------------------------------------------------------------

View File

@ -18,7 +18,7 @@ export PATH := $(PORTLIBS_PATH)/wiiu/bin:$(PORTLIBS_PATH)/ppc/bin:$(PATH)
WUT_ROOT ?= $(DEVKITPRO)/wut
RPXSPECS := -specs=$(WUT_ROOT)/share/wut.specs -specs=$(WUT_ROOT)/share/rpx.specs
RPXSPECS := -specs=$(WUT_ROOT)/share/wut.specs
RPLSPECS := -specs=$(WUT_ROOT)/share/wut.specs -specs=$(WUT_ROOT)/share/rpl.specs
MACHDEP = -DESPRESSO -mcpu=750 -meabi -mhard-float