aboutsummarylogtreecommitdiffstats
path: root/compilerflags.patch
blob: 6d896c71b3792a4fe811379f99ced2ea8e670327 (plain)
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
diff --git a/Source/autotools/SetupCompilerFlags.m4 b/Source/autotools/SetupCompilerFlags.m4
index 2141818..c5c50b5 100644
--- a/Source/autotools/SetupCompilerFlags.m4
+++ b/Source/autotools/SetupCompilerFlags.m4
@@ -1,7 +1,7 @@
 # Use C99 as the language standard for C code.
 CFLAGS="$CFLAGS -pthread -std=c99"
 # Use the C++11 standard. Do not warn about C++11 incompatibilities.
-CXXFLAGS="$CXXFLAGS -pthread -std=c++11 -Wno-c++11-compat"
+CXXFLAGS="$CXXFLAGS -pthread -std=c++20 -Wno-template-id-cdtor -Wno-implicit-fallthrough -Wno-deprecated-copy -Wno-deprecated-declarations -Wno-register"
 
 # Clang requires suppression of unused arguments warnings.
 if test "$c_compiler" = "clang"; then
@@ -46,13 +46,6 @@ fi
 if test "$enable_optimizations" = "yes"; then
     CXXFLAGS="$CXXFLAGS -O2"
     CFLAGS="$CFLAGS -O2"
-
-    if test "$c_compiler" = "gcc"; then
-        CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2"
-    fi
-    if test "$cxx_compiler" = "g++"; then
-        CXXFLAGS="$CXXFLAGS -D_FORTIFY_SOURCE=2"
-    fi
 else
     CXXFLAGS="$CXXFLAGS -O0"
     CFLAGS="$CFLAGS -O0"