]> Sergey Matveev's repositories - dht-bootstrap.git/commitdiff
Harden build
authorSergey Matveev <stargrave@stargrave.org>
Thu, 10 Nov 2022 14:11:45 +0000 (17:11 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Thu, 10 Nov 2022 14:11:45 +0000 (17:11 +0300)
dht-bootstrap.do

index 4a3dee75624e9022d9ac8758b70401439ea6f7ee..5a898e67e298adeeb43beb25032d5270297d151a 100644 (file)
@@ -1,2 +1,4 @@
 redo-ifchange dht-bootstrap.c
-${CC:-cc} -std=c99 $CFLAGS -o $3 dht-bootstrap.c
+CFLAGS="$CFLAGS -fstack-protector-strong"
+CFLAGS="$CFLAGS -fstack-clash-protection"
+${CC:-cc} -std=c99 $CFLAGS -fPIC -o $3 dht-bootstrap.c -pie -Wl,-z,relro,-z,now