mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:27:43 +00:00
Ports: Update dropbear's patches to use git patches
This commit is contained in:
parent
5f986a91c6
commit
a4c404ea9c
8 changed files with 127 additions and 29 deletions
100
Ports/dropbear/patches/0002-Disable-SSP.patch
Normal file
100
Ports/dropbear/patches/0002-Disable-SSP.patch
Normal file
|
@ -0,0 +1,100 @@
|
|||
From 634f30f41971933508832954c142cc6c384d19ed Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Meyer <git@the-space.agency>
|
||||
Date: Thu, 28 Apr 2022 01:50:11 +0000
|
||||
Subject: [PATCH 2/5] Disable SSP
|
||||
|
||||
Co-Authored-By: Yonatan Goldschmidt <yon.goldschmidt@gmail.com>
|
||||
---
|
||||
configure | 46 ----------------------------------------------
|
||||
configure.ac | 17 +----------------
|
||||
2 files changed, 1 insertion(+), 62 deletions(-)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 8374714..8c9eb9a 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -3381,53 +3381,7 @@ fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
fi # non-static
|
||||
- # stack protector. -strong is good but only in gcc 4.9 or later
|
||||
- OLDCFLAGS="$CFLAGS"
|
||||
- TESTFLAGS="-fstack-protector-strong"
|
||||
- CFLAGS="$CFLAGS $TESTFLAGS"
|
||||
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
-/* end confdefs.h. */
|
||||
-
|
||||
-int
|
||||
-main ()
|
||||
-{
|
||||
|
||||
- ;
|
||||
- return 0;
|
||||
-}
|
||||
-_ACEOF
|
||||
-if ac_fn_c_try_compile "$LINENO"; then :
|
||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: Setting $TESTFLAGS" >&5
|
||||
-$as_echo "$as_me: Setting $TESTFLAGS" >&6;}
|
||||
-else
|
||||
-
|
||||
- CFLAGS="$OLDCFLAGS"
|
||||
- TESTFLAGS="-fstack-protector --param=ssp-buffer-size=4"
|
||||
- CFLAGS="$CFLAGS $TESTFLAGS"
|
||||
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
-/* end confdefs.h. */
|
||||
-
|
||||
-int
|
||||
-main ()
|
||||
-{
|
||||
-
|
||||
- ;
|
||||
- return 0;
|
||||
-}
|
||||
-_ACEOF
|
||||
-if ac_fn_c_try_compile "$LINENO"; then :
|
||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: Setting $TESTFLAGS" >&5
|
||||
-$as_echo "$as_me: Setting $TESTFLAGS" >&6;}
|
||||
-else
|
||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: Not setting $TESTFLAGS" >&5
|
||||
-$as_echo "$as_me: Not setting $TESTFLAGS" >&6;}; CFLAGS="$OLDCFLAGS"
|
||||
-
|
||||
-fi
|
||||
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
-
|
||||
-
|
||||
-fi
|
||||
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
# FORTIFY_SOURCE
|
||||
{
|
||||
OLDFLAGS="$CFLAGS"
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 6a19479..28cd987 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -103,22 +103,7 @@ if test "$hardenbuild" -eq 1; then
|
||||
[AC_MSG_NOTICE([Not setting $TESTFLAGS]); LDFLAGS="$OLDLDFLAGS" ]
|
||||
)
|
||||
fi # non-static
|
||||
- # stack protector. -strong is good but only in gcc 4.9 or later
|
||||
- OLDCFLAGS="$CFLAGS"
|
||||
- TESTFLAGS="-fstack-protector-strong"
|
||||
- CFLAGS="$CFLAGS $TESTFLAGS"
|
||||
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
|
||||
- [AC_MSG_NOTICE([Setting $TESTFLAGS])],
|
||||
- [
|
||||
- CFLAGS="$OLDCFLAGS"
|
||||
- TESTFLAGS="-fstack-protector --param=ssp-buffer-size=4"
|
||||
- CFLAGS="$CFLAGS $TESTFLAGS"
|
||||
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
|
||||
- [AC_MSG_NOTICE([Setting $TESTFLAGS])],
|
||||
- [AC_MSG_NOTICE([Not setting $TESTFLAGS]); CFLAGS="$OLDCFLAGS" ]
|
||||
- )
|
||||
- ]
|
||||
- )
|
||||
+
|
||||
# FORTIFY_SOURCE
|
||||
DB_TRYADDCFLAGS([-D_FORTIFY_SOURCE=2])
|
||||
|
||||
--
|
||||
2.36.1
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue