enable -flto compiler flag

This commit is contained in:
Joshua Peisach
2024-05-31 07:59:23 -04:00
parent fd9d589adc
commit cdc6de0b3a
4 changed files with 5 additions and 9 deletions

View File

@@ -36,9 +36,9 @@ DIR_LIBS = \
LIBS = mxml freetype png bz2 z db fat wiiuse bte ogc m
MACHDEP = -g -DGEKKO -mrvl -mcpu=750 -meabi -mhard-float
CFLAGS = $(MACHDEP) -Os -Wall -DBASE_ADDR=$(BASE_ADDR) $(DIR_INCLUDES:%=-I%)
CFLAGS = $(MACHDEP) -Os -Wall -DBASE_ADDR=$(BASE_ADDR) -flto $(DIR_INCLUDES:%=-I%)
# using -Os for the stub makes it dependent on libgcc
CFLAGS_STUB = $(MACHDEP) -O2 -Wall -DBASE_ADDR=$(BASE_ADDR) $(DIR_INCLUDES:%=-I%)
CFLAGS_STUB = $(MACHDEP) -O2 -Wall -DBASE_ADDR=$(BASE_ADDR) -flto $(DIR_INCLUDES:%=-I%)
ASFLAGS = -D_LANGUAGE_ASSEMBLY -DHW_RVL
LDFLAGS_STUB = $(MACHDEP) -Wl,--section-start,.init=0x80001800 -nostartfiles -nodefaultlibs
LDFLAGS_APP = $(MACHDEP) -specs=newrvl.spec -Wl,--section-start,.init=$(BASE_ADDR) \
@@ -227,4 +227,3 @@ gdb:
debug:
$(GDB) -n $(TARGET_APP)_nopax.elf -x gdb.txt

View File

@@ -1,4 +1,4 @@
CFLAGS += -Wall -Wextra -Os -g -pipe
CFLAGS += -Wall -Wextra -Os -g -pipe -flto
ifeq ($(WIN32), 1)
PREFIX ?= i586-mingw32msvc-
@@ -50,4 +50,3 @@ osx:
$(MAKE) clean
/opt/toolchains/i686-apple-darwin9-10.4/bin/i686-apple-darwin9-lipo -create $(BIN)_ppc $(BIN)_intel -output $(BIN)
rm $(BIN)_ppc $(BIN)_intel

View File

@@ -1,4 +1,4 @@
CFLAGS = -Wall -W -Os -g
CFLAGS = -Wall -W -Os -g -flto
TARGET = wiipax
OBJS = LzFind.o LzmaEnc.o LzmaDec.o lzma.o main.o
OBJS += stub_mini.o stub_mini_debug.o
@@ -11,4 +11,3 @@ include ../../common.mk
install: all
install -m 755 $(TARGET) $(WIIDEV)/bin

View File

@@ -1,7 +1,7 @@
include ../../broadway.mk
CFLAGS += -mno-eabi -mno-sdata -O2 -ffreestanding
CFLAGS += -Wall -Wextra
CFLAGS += -Wall -Wextra -flto
DEFINES =
LDFLAGS += -nostartfiles -nodefaultlibs
@@ -63,4 +63,3 @@ release:
$(Q)$(MAKE) DKPPCCHANNEL=1 NDEBUG=1 clean
.PHONY: release