1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
diff -pruN origsrc/gcc-4.5.0/gcc/config/i386/cygwin.h src/gcc-4.5.0/gcc/config/i386/cygwin.h
--- origsrc/gcc-4.5.0/gcc/config/i386/cygwin.h 2010-04-02 20:54:46.000000000 +0100
+++ src/gcc-4.5.0/gcc/config/i386/cygwin.h 2010-04-19 03:58:09.031250000 +0100
@@ -303,3 +303,23 @@ while (0)
/* We should find a way to not have to update this manually. */
#define LIBGCJ_SONAME "cyggcj" /*LIBGCC_EH_EXTN*/ "-11.dll"
+/* Make stack executable to avoid DEP problems with trampolines. */
+#undef CYGWIN_ENABLE_EXECUTE_STACK
+#define CYGWIN_ENABLE_EXECUTE_STACK \
+extern void __enable_execute_stack (void *); \
+void \
+__enable_execute_stack (void *addr) \
+{ \
+ MEMORY_BASIC_INFORMATION b; \
+ if (!VirtualQuery (addr, &b, sizeof(b))) \
+ abort (); \
+ VirtualProtect (b.BaseAddress, b.RegionSize, PAGE_EXECUTE_READWRITE, \
+ &b.Protect); \
+}
+
+#undef ENABLE_EXECUTE_STACK
+#define ENABLE_EXECUTE_STACK CYGWIN_ENABLE_EXECUTE_STACK
+
+#ifdef IN_LIBGCC2
+#include <windows.h>
+#endif
diff -pruN origsrc/gcc-4.5.0/gcc/cppdefault.c src/gcc-4.5.0/gcc/cppdefault.c
--- origsrc/gcc-4.5.0/gcc/cppdefault.c 2007-07-26 09:37:01.000000000 +0100
+++ src/gcc-4.5.0/gcc/cppdefault.c 2010-04-19 04:28:35.406250000 +0100
@@ -39,6 +39,8 @@
# undef STANDARD_INCLUDE_DIR
#else
# undef CROSS_INCLUDE_DIR
+# undef CROSS_INCLUDE_DIR_1
+# undef CROSS_INCLUDE_DIR_2
#endif
const struct default_include cpp_include_defaults[]
@@ -85,6 +87,14 @@ const struct default_include cpp_include
/* One place the target system's headers might be. */
{ CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0 },
#endif
+#ifdef CROSS_INCLUDE_DIR_1
+ /* One more place the target system's headers might be. */
+ { CROSS_INCLUDE_DIR_1, "GCC", 0, 0, 0, 0 },
+#endif
+#ifdef CROSS_INCLUDE_DIR_2
+ /* One more place the target system's headers might be. */
+ { CROSS_INCLUDE_DIR_2, "GCC", 0, 0, 0, 0 },
+#endif
#ifdef TOOL_INCLUDE_DIR
/* Another place the target system's headers might be. */
{ TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0 },
|