diff options
author | Jonathan Yong <10walls@gmail.com> | 2017-08-07 11:40:08 +0000 |
---|---|---|
committer | Jonathan Yong <jyong@gcc.gnu.org> | 2017-08-07 11:40:08 +0000 |
commit | c8f34527b1c941f81e41df66e5d7cc2aedb453df (patch) | |
tree | 29c6f2d9190db98aa9783ebf47a8f4c11067f070 | |
parent | d5e2c91a26b85184400e3881baaeda27ade84ef9 (diff) | |
download | gcc-c8f34527b1c941f81e41df66e5d7cc2aedb453df.zip gcc-c8f34527b1c941f81e41df66e5d7cc2aedb453df.tar.gz gcc-c8f34527b1c941f81e41df66e5d7cc2aedb453df.tar.bz2 |
Share mingw fset-stack-executable with cygwin
This patch is in use by Cygwin for years, upstream to GCC.
* gcc/config/i386/mingw.opt (fset-stack-executable): Removed.
* gcc/config/i386/cygming.opt (fset-stack-executable): Moved
from mingw.opt.
* gcc/config/i386/cygwin.h: Define CHECK_EXECUTE_STACK_ENABLED.
* ligcc/config.host (*-cygwin): Include file from mingw
config/i386/enable-execute-stack-mingw32.c
From-SVN: r250914
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/i386/cygming.opt | 4 | ||||
-rw-r--r-- | gcc/config/i386/cygwin.h | 4 | ||||
-rw-r--r-- | gcc/config/i386/mingw.opt | 4 | ||||
-rw-r--r-- | libgcc/ChangeLog | 5 | ||||
-rw-r--r-- | libgcc/config.host | 3 |
6 files changed, 23 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1b6c5ff..440f6da 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2017-08-07 Jonathan Yong <10walls@gmail.com> + + * config/i386/mingw.opt (fset-stack-executable): Removed. + * config/i386/cygming.opt (fset-stack-executable): Moved + from mingw.opt. + * config/i386/cygwin.h: Define CHECK_EXECUTE_STACK_ENABLED. + 2017-08-07 Segher Boessenkool <segher@kernel.crashing.org> * print-rtl.c (print_exp): Print NOT as "~" instead of as "!". diff --git a/gcc/config/i386/cygming.opt b/gcc/config/i386/cygming.opt index 2d7c7d2..abe5932 100644 --- a/gcc/config/i386/cygming.opt +++ b/gcc/config/i386/cygming.opt @@ -50,6 +50,10 @@ muse-libstdc-wrappers Target Condition({defined (USE_CYGWIN_LIBSTDCXX_WRAPPERS)}) Compile code that relies on Cygwin DLL wrappers to support C++ operator new/delete replacement. +fset-stack-executable +Common Report Var(flag_setstackexecutable) Init(1) Optimization +For nested functions on stack executable permission is set. + posix Driver diff --git a/gcc/config/i386/cygwin.h b/gcc/config/i386/cygwin.h index a4683b4..7e34bb7 100644 --- a/gcc/config/i386/cygwin.h +++ b/gcc/config/i386/cygwin.h @@ -153,3 +153,7 @@ along with GCC; see the file COPYING3. If not see #endif #define LIBGCC_SONAME "cyggcc_s" LIBGCC_EH_EXTN "-1.dll" +/* Make stack executable to avoid DEP problems with trampolines. */ +#define HAVE_ENABLE_EXECUTE_STACK +#undef CHECK_EXECUTE_STACK_ENABLED +#define CHECK_EXECUTE_STACK_ENABLED flag_setstackexecutable diff --git a/gcc/config/i386/mingw.opt b/gcc/config/i386/mingw.opt index 210c14f..97a9baa 100644 --- a/gcc/config/i386/mingw.opt +++ b/gcc/config/i386/mingw.opt @@ -28,8 +28,4 @@ Wpedantic-ms-format C ObjC C++ ObjC++ Var(warn_pedantic_ms_format) Init(1) Warning Warn about none ISO msvcrt scanf/printf width extensions. -fset-stack-executable -Common Report Var(flag_setstackexecutable) Init(1) Optimization -For nested functions on stack executable permission is set. - ; Need to retain blank line above. diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 14aed0b..14d20fb 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,8 @@ +2017-08-07 Jonathan Yong <10walls@gmail.com> + + * config.host (*-cygwin): Include file from mingw + config/i386/enable-execute-stack-mingw32.c + 2017-08-01 Jerome Lambourg <lambourg@adacore.com> Doug Rupp <rupp@adacore.com> Olivier Hainque <hainque@adacore.com> diff --git a/libgcc/config.host b/libgcc/config.host index 9556c77..546b12b 100644 --- a/libgcc/config.host +++ b/libgcc/config.host @@ -324,6 +324,9 @@ case ${host} in i[34567]86-*-mingw* | x86_64-*-mingw*) enable_execute_stack=config/i386/enable-execute-stack-mingw32.c ;; +i[34567]86-*-cygwin* | x86_64-*-cygwin*) + enable_execute_stack=config/i386/enable-execute-stack-mingw32.c + ;; *) enable_execute_stack=enable-execute-stack-empty.c; ;; |