Skip to content

Commit 11d38e0

Browse files
committed
Revert "change: Use ELF toolchain and iopfixup to build IRX"
This reverts commit 00f199a.
1 parent 48a0b40 commit 11d38e0

File tree

6 files changed

+12
-48
lines changed

6 files changed

+12
-48
lines changed

Defs.make

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ EE_PKG_CONFIG ?= $(EE_TOOL_PREFIX)pkg-config
3030
# Defintions for the IOP toolchain.
3131
#
3232

33-
IOP_TOOL_PREFIX ?= mipsel-none-elf-
33+
IOP_TOOL_PREFIX ?= mipsel-ps2-irx-
3434
IOP_CC ?= $(IOP_TOOL_PREFIX)gcc
3535
IOP_AS ?= $(IOP_TOOL_PREFIX)as
3636
IOP_LD ?= $(IOP_TOOL_PREFIX)ld

iop/Rules.make

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ ifeq ($(DEBUG),1)
4444
IOP_CFLAGS += -DDEBUG
4545
endif
4646
# Linker flags
47-
IOP_LDFLAGS := -nostdlib -dc -r $(IOP_LDFLAGS)
47+
IOP_LDFLAGS := -nostdlib -s $(IOP_LDFLAGS)
4848

4949
# Additional C compiler flags for GCC >=v5.3.0
5050
# -msoft-float is to "remind" GCC/Binutils that the soft-float ABI is to be used. This is due to a bug, which
@@ -73,17 +73,8 @@ endif
7373
# Assembler flags
7474
IOP_ASFLAGS := $(ASFLAGS_TARGET) -EL -G0 $(IOP_ASFLAGS)
7575

76-
# Default link file
77-
ifeq ($(IOP_LINKFILE),)
78-
IOP_LINKFILE := $(PS2SDKSRC)/iop/startup/src/linkfile
79-
endif
80-
8176
IOP_OBJS := $(IOP_OBJS:%=$(IOP_OBJS_DIR)%)
8277

83-
IOP_BIN_ELF := $(IOP_BIN:.irx=.notiopmod.elf)
84-
85-
IOP_BIN_STRIPPED_ELF := $(IOP_BIN:.irx=.notiopmod.stripped.elf)
86-
8778
# Externally defined variables: IOP_BIN, IOP_OBJS, IOP_LIB
8879

8980
# These macros can be used to simplify certain build rules.
@@ -108,9 +99,6 @@ $(IOP_OBJS_DIR)%.o: $(IOP_SRC_DIR)%.s
10899

109100
.INTERMEDIATE:: $(IOP_LIB)_tmp$(MAKE_CURPID) $(IOP_OBJS_DIR)build-imports.c $(IOP_OBJS_DIR)build-exports.c
110101

111-
$(PS2SDKSRC)/tools/srxfixup/bin/srxfixup: $(PS2SDKSRC)/tools/srxfixup
112-
$(MAKEREC) $<
113-
114102
$(IOP_OBJS_DIR)template-imports.h:
115103
$(DIR_GUARD)
116104
$(PRINTF) '%s\n' "#include \"irx_imports.h\"" > $@
@@ -137,16 +125,9 @@ $(IOP_OBJS_DIR)exports.o: $(IOP_OBJS_DIR)build-exports.c
137125
$(DIR_GUARD)
138126
$(IOP_C_COMPILE) $(IOP_IETABLE_CFLAGS) -c $< -o $@
139127

140-
$(IOP_BIN_ELF): $(IOP_OBJS) $(IOP_LIB_ARCHIVES) $(IOP_ADDITIONAL_DEPS)
141-
$(DIR_GUARD)
142-
$(IOP_C_COMPILE) -T$(IOP_LINKFILE) $(IOP_OPTFLAGS) -o $@ $(IOP_OBJS) $(IOP_LDFLAGS) $(IOP_LIB_ARCHIVES) $(IOP_LIBS)
143-
144-
$(IOP_BIN_STRIPPED_ELF): $(IOP_BIN_ELF)
128+
$(IOP_BIN): $(IOP_OBJS) $(IOP_LIB_ARCHIVES) $(IOP_ADDITIONAL_DEPS)
145129
$(DIR_GUARD)
146-
$(IOP_STRIP) --strip-unneeded --remove-section=.pdr --remove-section=.comment --remove-section=.mdebug.abi32 --remove-section=.gnu.attributes -o $@ $<
147-
148-
$(IOP_BIN): $(IOP_BIN_STRIPPED_ELF) $(PS2SDKSRC)/tools/srxfixup/bin/srxfixup
149-
$(PS2SDKSRC)/tools/srxfixup/bin/srxfixup --irx1 -o $@ $<
130+
$(IOP_C_COMPILE) $(IOP_OPTFLAGS) -o $(IOP_BIN) $(IOP_OBJS) $(IOP_LDFLAGS) $(IOP_LIB_ARCHIVES) $(IOP_LIBS)
150131

151132
$(IOP_LIB)_tmp$(MAKE_CURPID): $(IOP_OBJS)
152133
$(DIR_GUARD)

iop/startup/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ release:
2424
@$(PRINTF) 'Installing %slinkfile into %s/iop/startup\n' $(IOP_SRC_DIR) $(PS2SDK)
2525
$(ECHO) Installing $(IOP_SRC_DIR)linkfile into $(PS2SDK)/iop/startup
2626
cp -f $(IOP_SRC_DIR)linkfile $(PS2SDK)/iop/startup
27-
@$(ECHO) Installing $(IOP_OBJS_DIR)crt0.o into $(PS2DEV)/iop/mipsel-none-elf/lib
28-
cp -f $(IOP_OBJS_DIR)crt0.o $(PS2DEV)/iop/mipsel-none-elf/lib
27+
@$(ECHO) Installing $(IOP_OBJS_DIR)crt0.o into $(PS2DEV)/ee/mipsel-ps2-irx/lib
28+
cp -f $(IOP_OBJS_DIR)crt0.o $(PS2DEV)/iop/mipsel-ps2-irx/lib

samples/Makefile.iopglobal_sample

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ IOP_DBGINFOFLAGS ?= -gdwarf-2 -gz
3838
# for finer-grained control over what goes into each IRX.
3939
IOP_CFLAGS := -D_IOP -fno-builtin -G0 $(IOP_OPTFLAGS) $(IOP_WARNFLAGS) $(IOP_DBGINFOFLAGS) $(IOP_INCS) $(IOP_CFLAGS)
4040
# linker flags
41-
IOP_LDFLAGS := -nostdlib -dc -r $(IOP_LDFLAGS)
41+
IOP_LDFLAGS := -nostdlib -s $(IOP_LDFLAGS)
4242

4343
# Additional C compiler flags for GCC >=v5.3.0
4444
# -msoft-float is to "remind" GCC/Binutils that the soft-float ABI is to be used. This is due to a bug, which
@@ -67,17 +67,8 @@ endif
6767
# Assembler flags
6868
IOP_ASFLAGS := $(ASFLAGS_TARGET) -EL -G0 $(IOP_ASFLAGS)
6969

70-
# Default link file
71-
ifeq ($(IOP_LINKFILE),)
72-
IOP_LINKFILE := $(PS2SDK)/iop/startup/linkfile
73-
endif
74-
7570
IOP_OBJS := $(IOP_OBJS:%=$(IOP_OBJS_DIR)%)
7671

77-
IOP_BIN_ELF := $(IOP_BIN:.irx=.notiopmod.elf)
78-
79-
IOP_BIN_STRIPPED_ELF := $(IOP_BIN:.irx=.notiopmod.stripped.elf)
80-
8172
# Externally defined variables: IOP_BIN, IOP_OBJS, IOP_LIB
8273

8374
# These macros can be used to simplify certain build rules.
@@ -119,17 +110,9 @@ $(IOP_OBJS_DIR)exports.o: $(IOP_OBJS_DIR)build-exports.c
119110
$(DIR_GUARD)
120111
$(IOP_C_COMPILE) $(IOP_IETABLE_CFLAGS) -c $< -o $@
121112

122-
$(IOP_BIN_ELF): $(IOP_OBJS)
123-
$(DIR_GUARD)
124-
$(IOP_C_COMPILE) -T$(IOP_LINKFILE) $(IOP_OPTFLAGS) -o $@ $(IOP_OBJS) $(IOP_LDFLAGS) $(IOP_LIBS)
125-
126-
$(IOP_BIN_STRIPPED_ELF): $(IOP_BIN_ELF)
127-
$(DIR_GUARD)
128-
$(IOP_STRIP) --strip-unneeded --remove-section=.pdr --remove-section=.comment --remove-section=.mdebug.abi32 --remove-section=.gnu.attributes -o $@ $<
129-
130-
$(IOP_BIN): $(IOP_BIN_STRIPPED_ELF)
113+
$(IOP_BIN): $(IOP_OBJS)
131114
$(DIR_GUARD)
132-
iopfixup --irx1 -o $@ $<
115+
$(IOP_C_COMPILE) $(IOP_OPTFLAGS) -o $(IOP_BIN) $(IOP_OBJS) $(IOP_LDFLAGS) $(IOP_LIBS)
133116

134117
$(IOP_LIB): $(IOP_OBJS)
135118
$(DIR_GUARD)

samples/Makefile.pref_sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ EE_RANLIB ?= $(EE_TOOL_PREFIX)ranlib
2929
# Defintions for the IOP toolchain.
3030
#
3131

32-
IOP_TOOL_PREFIX ?= mipsel-none-elf-
32+
IOP_TOOL_PREFIX ?= mipsel-ps2-irx-
3333
IOP_CC ?= $(IOP_TOOL_PREFIX)gcc
3434
IOP_AS ?= $(IOP_TOOL_PREFIX)as
3535
IOP_LD ?= $(IOP_TOOL_PREFIX)ld

samples/ps2dev_iop.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ endif()
2525
SET(CMAKE_SYSTEM_NAME Generic)
2626
SET(CMAKE_SYSTEM_VERSION 1)
2727
SET(CMAKE_SYSTEM_PROCESSOR mips)
28-
SET(CMAKE_C_COMPILER mipsel-none-elf-gcc)
29-
SET(CMAKE_CXX_COMPILER mipsel-none-elf-g++)
28+
SET(CMAKE_C_COMPILER mipsel-ps2-irx-gcc)
29+
SET(CMAKE_CXX_COMPILER mipsel-ps2-irx-g++)
3030
SET(CMAKE_C_COMPILER_WORKS 1) #Hack by f0bes
3131
SET(CMAKE_CXX_COMPILER_WORKS 1) #Hack by f0bes
3232

0 commit comments

Comments
 (0)