Merge branch 'hardened-stdenv' into staging
Closes #12895 Amazing work by @globin & @fpletz getting hardened compiler flags by enabled default on the whole package set
This commit is contained in:
@@ -10,6 +10,8 @@ stdenv.mkDerivation {
|
||||
|
||||
nativeBuildInputs = [ perl ];
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
meta = {
|
||||
homepage = http://ccrypt.sourceforge.net/;
|
||||
description = "Utility for encrypting and decrypting files and streams with AES-256";
|
||||
|
||||
@@ -12,6 +12,8 @@ stdenv.mkDerivation rec {
|
||||
buildInputs = [ libfprint gtk2 ];
|
||||
nativeBuildInputs = [ pkgconfig autoreconfHook ];
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = "http://www.freedesktop.org/wiki/Software/fprint/fprint_demo/";
|
||||
description = "A simple GTK+ application to demonstrate and test libfprint's capabilities";
|
||||
|
||||
@@ -13,6 +13,8 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "08q92sfdvkz47rx6qjn7qv57cmlpy7i7rgddapq5384mb413vjds";
|
||||
};
|
||||
|
||||
patches = [ ./gcc5.patch ];
|
||||
|
||||
postPatch = ''
|
||||
sed -ri -e '
|
||||
s!^(#define\s+CFG_[A-Z]+_NAME\s+).*/!\1"'"$out"'/etc/john/!
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
diff --git a/src/common.h b/src/common.h
|
||||
--- a/src/common.h
|
||||
+++ b/src/common.h
|
||||
@@ -31,7 +31,9 @@ typedef unsigned long long ARCH_WORD_64;
|
||||
#define is_aligned(PTR, CNT) ((((ARCH_WORD)(const void *)(PTR))&(CNT-1))==0)
|
||||
|
||||
#ifdef __GNUC__
|
||||
-#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7) || defined(__INTEL_COMPILER)
|
||||
+#if __GNUC__ >= 5
|
||||
+#define MAYBE_INLINE __attribute__((gnu_inline)) inline
|
||||
+#elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7) || defined(__INTEL_COMPILER)
|
||||
#define MAYBE_INLINE __attribute__((always_inline)) inline
|
||||
#elif __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
|
||||
#define MAYBE_INLINE __attribute__((always_inline))
|
||||
@@ -12,12 +12,15 @@ stdenv.mkDerivation rec {
|
||||
|
||||
patches = [ ./tboot-add-well-known-secret-option-to-lcp_writepol.patch ];
|
||||
|
||||
hardeningDisable = [ "pic" "stackprotector" ];
|
||||
|
||||
configurePhase = ''
|
||||
for a in lcptools utils tb_polgen; do
|
||||
substituteInPlace $a/Makefile --replace /usr/sbin /sbin
|
||||
done
|
||||
substituteInPlace docs/Makefile --replace /usr/share /share
|
||||
'';
|
||||
|
||||
installFlags = "DESTDIR=$(out)";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
||||
Reference in New Issue
Block a user