diff --git a/common.mk b/common.mk index 5e041182..6cd0c72d 100644 --- a/common.mk +++ b/common.mk @@ -11,28 +11,28 @@ MAKEFILE_DIR := $(subst \,/,$(MAKEFILE_DIR)) ifeq ($(OS),Windows_NT) # Native Windows - SHELL := $(BIN)/sh.exe - RM := $(BIN)/rm.exe - CP := $(BIN)/cp.exe - MKDIR := $(BIN)/mkdir.exe + SHELL := $(BIN)/sh + RM := $(BIN)/rm + CP := $(BIN)/cp + MKDIR := $(BIN)/mkdir - AR := $(BIN)/ar.exe - CC := $(BIN)/gcc.exe - LD:= $(BIN)/ld.exe - NM:= $(BIN)/nm.exe - OBJCPY := $(BIN)/objcopy.exe - ASMZ80 := $(BIN)/sjasm.exe - MACCER := $(BIN)/mac68k.exe - BINTOS := $(BIN)/bintos.exe - LTO_PLUGIN := --plugin=liblto_plugin-0.dll + AR := $(BIN)/ar + CC := $(BIN)/gcc + LD:= $(BIN)/ld + NM:= $(BIN)/nm + OBJCPY := $(BIN)/objcopy + ASMZ80 := $(BIN)/sjasm + MACCER := $(BIN)/mac68k + BINTOS := $(BIN)/bintos + LTO_PLUGIN := --plugin=liblto_plugin.dll LIBGCC := $(LIB)/libgcc.a else # Native Linux and Docker PREFIX ?= m68k-elf- - SHELL = sh - RM = rm - CP = cp - MKDIR = mkdir + SHELL := sh + RM := rm + CP := cp + MKDIR := mkdir AR := $(PREFIX)ar CC := $(PREFIX)gcc diff --git a/lib/libmd.a b/lib/libmd.a index bf4bbf68..e1f89272 100644 Binary files a/lib/libmd.a and b/lib/libmd.a differ diff --git a/lib/libmd_debug.a b/lib/libmd_debug.a index 704b93e2..049344b3 100644 Binary files a/lib/libmd_debug.a and b/lib/libmd_debug.a differ diff --git a/makefile.gen b/makefile.gen index 79afd9fd..e0c40288 100644 --- a/makefile.gen +++ b/makefile.gen @@ -65,7 +65,7 @@ DEFAULT_FLAGS= $(EXTRA_FLAGS) -DSGDK_GCC -m68000 -Wall -Wextra -Wno-shift-negati FLAGSZ80:= -i$(SRC) -i$(INCLUDE) -i$(RES) -i$(SRC_LIB) -i$(INCLUDE_LIB) -i$(INCLUDE_LIB)/snd #release: FLAGS= $(DEFAULT_FLAGS) -Os -fomit-frame-pointer -fuse-linker-plugin -flto -release: FLAGS= $(DEFAULT_FLAGS) -O3 -fuse-linker-plugin -fno-web -fno-gcse -fomit-frame-pointer -flto +release: FLAGS= $(DEFAULT_FLAGS) -O3 -fuse-linker-plugin -fno-web -fno-gcse -fomit-frame-pointer -flto -flto=auto -ffat-lto-objects release: CFLAGS= $(FLAGS) release: AFLAGS= $(FLAGS) release: LIBMD= $(LIB)/libmd.a @@ -168,7 +168,7 @@ $(OUT)/symbol.txt: $(OUT)/rom.out $(OUT)/rom.out: $(OUT)/sega.o $(OUT)/cmd_ $(LIBMD) $(MKDIR) -p $(dir $@) - $(CC) -m68000 -B$(BIN) -n -T $(GDK)/md.ld -nostdlib $(OUT)/sega.o @$(OUT)/cmd_ $(LIBMD) $(LIBGCC) -o $(OUT)/rom.out -Wl,--gc-sections -flto + $(CC) -m68000 -B$(BIN) -n -T $(GDK)/md.ld -nostdlib $(OUT)/sega.o @$(OUT)/cmd_ $(LIBMD) $(LIBGCC) -o $(OUT)/rom.out -Wl,--gc-sections -flto -flto=auto -ffat-lto-objects $(RM) $(OUT)/cmd_ $(OUT)/cmd_: $(OBJS) diff --git a/makelib.gen b/makelib.gen index 4de1235b..5cad1d60 100644 --- a/makelib.gen +++ b/makelib.gen @@ -37,8 +37,8 @@ DEFAULT_FLAGS_LIB := $(EXTRA_FLAGS) -DSGDK_GCC -m68000 -Wall -Wextra -Wno-array- FLAGSZ80_LIB := -i$(SRC_LIB) -i$(INCLUDE_LIB) -i$(INCLUDE_LIB)/snd -#release: FLAGS_LIB= $(DEFAULT_FLAGS_LIB) -Os -fomit-frame-pointer -fuse-linker-plugin -ffat-lto-objects -flto -release: FLAGS_LIB= $(DEFAULT_FLAGS_LIB) -O3 -fuse-linker-plugin -fno-web -fno-gcse -fomit-frame-pointer -ffat-lto-objects -flto +#release: FLAGS_LIB= $(DEFAULT_FLAGS_LIB) -Os -fomit-frame-pointer -fuse-linker-plugin -flto -flto=auto -ffat-lto-objects +release: FLAGS_LIB= $(DEFAULT_FLAGS_LIB) -O3 -fuse-linker-plugin -fno-web -fno-gcse -fomit-frame-pointer -flto -flto=auto -ffat-lto-objects release: CFLAGS_LIB= $(FLAGS_LIB) release: AFLAGS_LIB= $(FLAGS_LIB) release: $(LIB)/libmd.a diff --git a/sample/benchmark/src/spr_test.c b/sample/benchmark/src/spr_test.c index da5b6413..e141adfe 100644 --- a/sample/benchmark/src/spr_test.c +++ b/sample/benchmark/src/spr_test.c @@ -867,8 +867,8 @@ u16 executeSpritesTest(u16 *scores) PAL_setColors(0, palette, 64, CPU); SYS_enableInts(); - // execute sprite bench - execute(25, 12) / 8; + // execute sprite bench (result not used in score) + execute(25, 12); #endif // LEGACY_SPRITE_ENGINE SPR_logProfil();