From 795f1881a904eda870e5b108494eda83caaab6b3 Mon Sep 17 00:00:00 2001 From: Sam James Date: Fri, 19 Mar 2021 02:08:07 +0000 Subject: net-analyzer/hydra: don't inject hardening CFLAGS We have these by default in Gentoo. Signed-off-by: Sam James --- .../files/hydra-9.2-respect-cflags-more.patch | 26 ++++++++++++++++++++++ net-analyzer/hydra/hydra-9.2.ebuild | 4 ++++ net-analyzer/hydra/hydra-9999999.ebuild | 4 ++++ 3 files changed, 34 insertions(+) create mode 100644 net-analyzer/hydra/files/hydra-9.2-respect-cflags-more.patch (limited to 'net-analyzer/hydra') diff --git a/net-analyzer/hydra/files/hydra-9.2-respect-cflags-more.patch b/net-analyzer/hydra/files/hydra-9.2-respect-cflags-more.patch new file mode 100644 index 000000000000..8d158640803f --- /dev/null +++ b/net-analyzer/hydra/files/hydra-9.2-respect-cflags-more.patch @@ -0,0 +1,26 @@ +Don't inject hardening CFLAGS. We already have these by default in Gentoo. +--- a/configure ++++ b/configure +@@ -1376,22 +1376,6 @@ if [ -n "$CRYPTO_PATH" ]; then + echo " ... RSA_generate_key()$RSA found" + fi + +-echo "Checking for secure compile option support in $CC ..." +-GCCSEC="no" +-LDSEC="no" +-GCCSECOPT="-fstack-protector-all --param ssp-buffer-size=4 -D_FORTIFY_SOURCE=2" +-echo '#include ' > $TMPC.c +-echo 'int main() { printf(""); return 0; }' >> $TMPC.c +-$CC -pie -fPIE $GCCSEPOPT -o $TMPC $TMPC.c > /dev/null 2> $TMPC.c.err +-test -x $TMPC && GCCSEC="yes" +-grep -q fPI $TMPC.c.err || GCCSECOPT="-pie -fPIE $GCCSECOPT" +-rm -f "$TMPC" +-$CC $GCCSECOPT -Wl,-z,now -Wl,-z,relro -o $TMPC $TMPC.c > /dev/null 2> $TMPC.c.err +-test -x $TMPC && { LDSEC="yes" ; GCCSECOPT="$GCCSECOPT -Wl,-z,now -Wl,-z,relro" ; } +-rm -f $TMPC $TMPC.c $TMPC.c.err +-echo " Compiling... $GCCSEC" +-echo " Linking... $LDSEC" +- + echo + XDEFINES="" + XLIBS="" diff --git a/net-analyzer/hydra/hydra-9.2.ebuild b/net-analyzer/hydra/hydra-9.2.ebuild index 4c57cd8f9bb0..ff6615335797 100644 --- a/net-analyzer/hydra/hydra-9.2.ebuild +++ b/net-analyzer/hydra/hydra-9.2.ebuild @@ -45,6 +45,10 @@ RDEPEND=" DEPEND="${RDEPEND}" BDEPEND="virtual/pkgconfig" +PATCHES=( + "${FILESDIR}"/${PN}-9.2-respect-cflags-more.patch +) + src_prepare() { default diff --git a/net-analyzer/hydra/hydra-9999999.ebuild b/net-analyzer/hydra/hydra-9999999.ebuild index 8745aff71916..7333951b1952 100644 --- a/net-analyzer/hydra/hydra-9999999.ebuild +++ b/net-analyzer/hydra/hydra-9999999.ebuild @@ -44,6 +44,10 @@ RDEPEND=" DEPEND="${RDEPEND}" BDEPEND="virtual/pkgconfig" +PATCHES=( + "${FILESDIR}"/${PN}-9.2-respect-cflags-more.patch +) + src_prepare() { default -- cgit v1.2.3-65-gdbad