[tbb-commits] [tor-browser-build/master] Bug 23025: Add some hardening flags to macOS build

gk at torproject.org gk at torproject.org
Wed Oct 18 06:34:45 UTC 2017


commit 6d0193cd71a4969207d7813029722c48a64bb7de
Author: Arthur Edelstein <arthuredelstein at gmail.com>
Date:   Mon Oct 2 10:17:52 2017 -0700

    Bug 23025: Add some hardening flags to macOS build
    
    Added flags:
    -fstack-protector-strong
    -D_FORTIFY_SOURCE=2
    -Werror=format
    -Werror=format-security
---
 projects/firefox/mozconfig-osx-x86_64 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/projects/firefox/mozconfig-osx-x86_64 b/projects/firefox/mozconfig-osx-x86_64
index bc7a30e..9ac3ac8 100644
--- a/projects/firefox/mozconfig-osx-x86_64
+++ b/projects/firefox/mozconfig-osx-x86_64
@@ -5,7 +5,8 @@ TOOLCHAIN_DIR=/var/tmp/dist/macosx-toolchain
 CROSS_CCTOOLS_PATH=$TOOLCHAIN_DIR/cctools
 CROSS_SYSROOT=$TOOLCHAIN_DIR/SDK
 CROSS_PRIVATE_FRAMEWORKS=$CROSS_SYSROOT/System/Library/PrivateFrameworks
-FLAGS="-target x86_64-apple-darwin10 -mlinker-version=136 -B $CROSS_CCTOOLS_PATH/bin -isysroot $CROSS_SYSROOT"
+HARDENING_FLAGS="-Werror=format -Werror=format-security -fstack-protector-strong -D_FORTIFY_SOURCE=2"
+FLAGS="-target x86_64-apple-darwin10 -mlinker-version=136 -B $CROSS_CCTOOLS_PATH/bin -isysroot $CROSS_SYSROOT $HARDENING_FLAGS"
 
 export CC="$TOOLCHAIN_DIR/clang/bin/clang $FLAGS"
 export CXX="$TOOLCHAIN_DIR/clang/bin/clang++ $FLAGS"



More information about the tbb-commits mailing list