diff options
Diffstat (limited to 'games-emulation/mednafen/files/mednafen-0.9.41-remove-cflags.patch')
-rw-r--r-- | games-emulation/mednafen/files/mednafen-0.9.41-remove-cflags.patch | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/games-emulation/mednafen/files/mednafen-0.9.41-remove-cflags.patch b/games-emulation/mednafen/files/mednafen-0.9.41-remove-cflags.patch new file mode 100644 index 000000000000..a0a52997a27b --- /dev/null +++ b/games-emulation/mednafen/files/mednafen-0.9.41-remove-cflags.patch @@ -0,0 +1,57 @@ +Remove flags that subvert user choice in Gentoo + +--- a/configure.ac ++++ b/configure.ac +@@ -88,21 +88,7 @@ + AC_CHECK_LIB([z], [zlibVersion], ZLIB_LIBS="-lz", AC_MSG_ERROR([*** zlib not found!])) + AC_SUBST([ZLIB_LIBS]) + +-dnl -fno-fast-math and -fno-unsafe-math-optimizations to make sure it's disabled, as the fast-math feature on certain older +-dnl versions of gcc produces horribly broken code(and even when it's working correctly, it can have somewhat unpredictable effects). +-dnl +-dnl -fno-aggressive-loop-optimizations because I don't trust gcc's aggressive loop optimizations, and there miiight be old code +-dnl in Mednafen that would cause problems. +-dnl +-dnl -fomit-frame-pointer is required for some x86 inline assembly to compile. +-dnl + OPTIMIZER_FLAGS="" +-AX_CFLAGS_GCC_OPTION([-fno-fast-math], OPTIMIZER_FLAGS) +-AX_CFLAGS_GCC_OPTION([-fno-unsafe-math-optimizations], OPTIMIZER_FLAGS) +-AX_CFLAGS_GCC_OPTION([-fno-aggressive-loop-optimizations], OPTIMIZER_FLAGS) +-AX_CFLAGS_GCC_OPTION([-fno-ipa-icf], OPTIMIZER_FLAGS) +-AX_CFLAGS_GCC_OPTION([-fomit-frame-pointer], OPTIMIZER_FLAGS) +- + dnl + dnl Aggressively try to disable PIC and PIE, as it has a significant performance overhead and will + dnl break some code(with compile-time failures or run-time assert()s triggering). +@@ -110,12 +95,6 @@ + dnl Use -fwrapv instead of -fno-strict-overflow; -fno-strict-overflow is buggy on gcc and does not work as documented/implied. + dnl + CODEGEN_FLAGS="" +-AX_CFLAGS_GCC_OPTION([-fno-pic], CODEGEN_FLAGS) +-AX_CFLAGS_GCC_OPTION([-fno-pie], CODEGEN_FLAGS) +-AX_CFLAGS_GCC_OPTION([-fno-PIC], CODEGEN_FLAGS) +-AX_CFLAGS_GCC_OPTION([-fno-PIE], CODEGEN_FLAGS) +-AX_CFLAGS_GCC_OPTION([-nopie], CODEGEN_FLAGS) +-AX_CFLAGS_GCC_OPTION([-no-pie], CODEGEN_FLAGS) + AX_CFLAGS_GCC_OPTION([-fwrapv], CODEGEN_FLAGS) + AX_CFLAGS_GCC_OPTION([-fjump-tables], CODEGEN_FLAGS) + +@@ -139,9 +118,6 @@ + # Used as needed in Makefile.am: + # + NO_STACK_PROTECTOR_FLAGS="" +-AX_CFLAGS_GCC_OPTION([-fno-stack-protector], NO_STACK_PROTECTOR_FLAGS) +-AX_CFLAGS_GCC_OPTION([-fno-stack-protector-all], NO_STACK_PROTECTOR_FLAGS) +-AX_CFLAGS_GCC_OPTION([-fno-stack-protector-strong], NO_STACK_PROTECTOR_FLAGS) + AC_SUBST(NO_STACK_PROTECTOR_FLAGS) + + # ----------------------------------- +@@ -165,7 +141,6 @@ + # Begin ss flags + # + SS_EXTRA_FLAGS="" +-AX_CFLAGS_GCC_OPTION([-mtune=haswell], SS_EXTRA_FLAGS) + AC_SUBST(SS_EXTRA_FLAGS) + # + # End ss flags |