--- origsrc/gcc-4.7.2/gcc/config/i386//cygming.opt 2011-04-01 15:43:22.000000000 +0100 +++ src/gcc-4.7.2/gcc/config/i386//cygming.opt 2012-11-01 20:56:56.406250000 +0000 @@ -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 --- origsrc/gcc-4.7.2/gcc/config/i386//cygwin.h 2012-11-01 20:55:58.250000000 +0000 +++ src/gcc-4.7.2/gcc/config/i386//cygwin.h 2012-11-01 20:11:22.000000000 +0000 @@ -140,3 +140,7 @@ along with GCC; see the file COPYING3. /* We should find a way to not have to update this manually. */ #define LIBGCJ_SONAME "cyggcj" /*LIBGCC_EH_EXTN*/ "-13.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 --- origsrc/gcc-4.7.2/gcc/config/i386//mingw.opt 2011-04-01 15:43:22.000000000 +0100 +++ src/gcc-4.7.2/gcc/config/i386//mingw.opt 2012-11-01 20:57:00.296875000 +0000 @@ -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. --- origsrc/gcc-4.7.2/libgcc//config.host 2012-11-01 20:55:58.234375000 +0000 +++ src/gcc-4.7.2/libgcc//config.host 2012-11-01 20:11:20.000000000 +0000 @@ -273,6 +273,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; ;;