From 549c48b2b327762e87e327a1ba0221810dcac5ab Mon Sep 17 00:00:00 2001 From: neonloop Date: Sun, 15 Aug 2021 16:45:52 +0000 Subject: Fixes profile generation for mame2000 / snes9x2005 --- patches/mame2000/1000-trimui-build.patch | 15 +++++++++------ patches/snes9x2005/1000-trimui-support.patch | 4 ++-- 2 files changed, 11 insertions(+), 8 deletions(-) (limited to 'patches') diff --git a/patches/mame2000/1000-trimui-build.patch b/patches/mame2000/1000-trimui-build.patch index 52492b8..b02c1cc 100644 --- a/patches/mame2000/1000-trimui-build.patch +++ b/patches/mame2000/1000-trimui-build.patch @@ -1,5 +1,5 @@ diff --git a/Makefile b/Makefile -index 4b0667a..8ebaebe 100644 +index 4b0667a..34df34e 100644 --- a/Makefile +++ b/Makefile @@ -335,6 +335,26 @@ else ifeq ($(platform), gcw0) @@ -29,7 +29,7 @@ index 4b0667a..8ebaebe 100644 # Windows MSVC 2010 x64 else ifeq ($(platform), windows_msvc2010_x64) CC = cl.exe -@@ -522,10 +542,19 @@ endif +@@ -522,6 +542,8 @@ endif ifeq ($(DEBUG), 1) CFLAGS += -O0 -g @@ -38,14 +38,17 @@ index 4b0667a..8ebaebe 100644 else CFLAGS += -O2 -DNDEBUG endif +@@ -531,6 +553,13 @@ RM = rm -f + LIBS = -lm + OBJ = obj +ifeq ($(PROFILE), GENERATE) + CFLAGS += -fprofile-generate=./profile/mame2000 -+ LDFLAGS += -lgcov ++ LIBS += -lgcov +else ifeq ($(PROFILE), APPLY) + CFLAGS += -fprofile-use -fprofile-dir=../profile/mame2000 -fbranch-probabilities +endif + - # compiler, linker and utilities - RM = rm -f - LIBS = -lm + ifeq ($(HAVE_RZLIB),) + ZLIB_INCLUDE := -Isrc/zlib + endif diff --git a/patches/snes9x2005/1000-trimui-support.patch b/patches/snes9x2005/1000-trimui-support.patch index 9424312..96dcb78 100644 --- a/patches/snes9x2005/1000-trimui-support.patch +++ b/patches/snes9x2005/1000-trimui-support.patch @@ -1,5 +1,5 @@ diff --git a/Makefile b/Makefile -index b293853..5704da3 100644 +index b293853..bc220bd 100644 --- a/Makefile +++ b/Makefile @@ -282,6 +282,20 @@ else ifeq ($(platform), gcw0) @@ -36,7 +36,7 @@ index b293853..5704da3 100644 + +ifeq ($(PROFILE), GENERATE) + CFLAGS += -fprofile-generate=./profile/snes9x2005 -+ LDFLAGS += -lgcov ++ LIBS += -lgcov +else ifeq ($(PROFILE), APPLY) + CFLAGS += -fprofile-use -fprofile-dir=../profile/snes9x2005 -fbranch-probabilities +endif -- cgit v1.2.3