mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
build, add -flto for all builds if available
This commit is contained in:
parent
f1dbe7642f
commit
b5d8374c6a
1 changed files with 6 additions and 4 deletions
10
Makefile
10
Makefile
|
@ -71,6 +71,8 @@ CFLAGS += $(call chkCCflag, -fno-caller-saves -fno-guess-branch-probability -fno
|
||||||
# very old gcc toolchains may not have these options
|
# very old gcc toolchains may not have these options
|
||||||
CFLAGS += $(call chkCCflag, -fno-tree-loop-if-convert -fipa-pta -fno-ipa-cp)
|
CFLAGS += $(call chkCCflag, -fno-tree-loop-if-convert -fipa-pta -fno-ipa-cp)
|
||||||
endif
|
endif
|
||||||
|
else
|
||||||
|
CFLAGS += $(call chkCCflag, -flto)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# revision info from repository if this not a tagged release
|
# revision info from repository if this not a tagged release
|
||||||
|
@ -149,10 +151,6 @@ all: $(TARGET).opk
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq (,$(filter %mips32r2, $(CFLAGS)))
|
|
||||||
CFLAGS += -DMIPS_USE_SYNCI # mips32r2 clear_cache uses SYNCI instead of a syscall
|
|
||||||
endif
|
|
||||||
|
|
||||||
OBJS += platform/opendingux/inputmap.o
|
OBJS += platform/opendingux/inputmap.o
|
||||||
use_inputmap ?= 1
|
use_inputmap ?= 1
|
||||||
|
|
||||||
|
@ -416,6 +414,10 @@ ifneq (,$(findstring -flto,$(CFLAGS)))
|
||||||
# to avoid saving and reloading it. However, this collides with the use of LTO.
|
# to avoid saving and reloading it. However, this collides with the use of LTO.
|
||||||
pico/32x/memory.o: CFLAGS += -fno-lto
|
pico/32x/memory.o: CFLAGS += -fno-lto
|
||||||
pico/32x/sh2soc.o: CFLAGS += -fno-lto
|
pico/32x/sh2soc.o: CFLAGS += -fno-lto
|
||||||
|
cpu/sh2/compiler.o: CFLAGS += -fno-lto
|
||||||
|
endif
|
||||||
|
ifneq (,$(filter mips64%, $(ARCH))$(filter %mips32r2, $(CFLAGS)))
|
||||||
|
CFLAGS += -DMIPS_USE_SYNCI # mips32r2 clear_cache uses SYNCI instead of a syscall
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue