SameBoy | Accurate GB/GBC emulator |
| download: https://git.y1.nz/archives/sameboy.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit b8d6bb7fd2dd1e93cde949bd5f15d709fa54b1be parent c2341110248b78ab82cef0322dcd5199b9246563 Author: Lior Halphon <LIJI32@gmail.com> Date: Thu, 11 May 2023 01:42:46 +0300 Automatic detection of -Oz support Diffstat:
| M | Makefile | 9 | ++++++--- |
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile @@ -120,11 +120,9 @@ ifeq ($(shell $(CC) -x c -c $(NULL) -o $(NULL) -Werror -Wpartial-availability 2> WARNINGS += -Wpartial-availability endif -SIZE_FLAG := z # GCC's implementation of this warning has false positives, so we skip it ifneq ($(shell $(CC) --version 2>&1 | grep "gcc"), ) WARNINGS += -Wno-maybe-uninitialized -SIZE_FLAG := s endif CFLAGS += $(WARNINGS) @@ -219,7 +217,12 @@ CFLAGS += -g else ifeq ($(CONF), release) CFLAGS += -O3 -ffast-math -DNDEBUG # The frontend code is not time-critical, prefer reducing the size for less memory use and better cache utilization -FRONTEND_CFLAGS += -O$(SIZE_FLAG) +ifeq ($(shell $(CC) -x c -c $(NULL) -o $(NULL) -Werror -Oz 2> $(NULL); echo $$?),0) +FRONTEND_CFLAGS += -Oz +else +FRONTEND_CFLAGS += -Os +endif + STRIP := strip CODESIGN := true ifeq ($(PLATFORM),Darwin)
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.