]> git.sesse.net Git - ffmpeg/blobdiff - configure
Merge commit '4a64e67988dd01005efb1ae831bff14c1656b573'
[ffmpeg] / configure
index 46a9adef377f60b3d3e1a56beef6d85533d718a8..af322f5a5761714760ea281555dc3befd7ac2b15 100755 (executable)
--- a/configure
+++ b/configure
@@ -2633,6 +2633,10 @@ case "$toolchain" in
         add_cflags  -fprofile-arcs -ftest-coverage
         add_ldflags -fprofile-arcs -ftest-coverage
     ;;
+    hardened)
+        add_cflags -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all
+        add_ldflags -Wl,-z,relro -Wl,-z,now
+    ;;
     ?*)
         die "Unknown toolchain $toolchain"
     ;;
@@ -4529,6 +4533,7 @@ elif enabled gcc; then
     check_cflags -Werror=missing-prototypes
     check_cflags -Werror=return-type
     check_cflags -Werror=vla
+    enabled extra_warnings || check_cflags -Wno-maybe-uninitialized
 elif enabled llvm_gcc; then
     check_cflags -mllvm -stack-alignment=16
 elif enabled clang; then