This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH][cygming] Share mingw fset-stack-executable with cygwin


This patch is in use by Cygwin for years, upstream to GCC.
Committed to trunk.

       	* 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
       	* libgcc/config.host (*-cygwin): Include file from mingw
       	config/i386/enable-execute-stack-mingw32.c

--
Index: gcc/config/i386/cygming.opt
===================================================================
--- gcc/config/i386/cygming.opt	(revision 250913)
+++ gcc/config/i386/cygming.opt	(working copy)
@@ -50,6 +50,10 @@
 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

Index: gcc/config/i386/cygwin.h
===================================================================
--- gcc/config/i386/cygwin.h	(revision 250913)
+++ gcc/config/i386/cygwin.h	(working copy)
@@ -153,3 +153,7 @@
 #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
Index: gcc/config/i386/mingw.opt
===================================================================
--- gcc/config/i386/mingw.opt	(revision 250913)
+++ gcc/config/i386/mingw.opt	(working copy)
@@ -28,8 +28,4 @@
 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.
Index: libgcc/config.host
===================================================================
--- libgcc/config.host	(revision 250913)
+++ libgcc/config.host	(working copy)
@@ -324,6 +324,9 @@
 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;
   ;;

Attachment: signature.asc
Description: OpenPGP digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]