1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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
|