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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
--- gcc/config.gcc 2012-09-12 04:03:54.000000000 -0500
+++ gcc/config.gcc 2013-03-11 03:41:03.674656700 -0500
@@ -1438,7 +1438,7 @@ i[34567]86-*-cygwin*)
xm_file=i386/xm-cygwin.h
tmake_file="${tmake_file} i386/t-cygming t-slibgcc"
target_gtfiles="\$(srcdir)/config/i386/winnt.c"
- extra_options="${extra_options} i386/cygming.opt"
+ extra_options="${extra_options} i386/cygming.opt i386/cygwin.opt"
extra_objs="winnt.o winnt-stubs.o"
c_target_objs="${c_target_objs} msformat-c.o"
cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o"
--- gcc/config/i386/cygwin.h (revision 196430)
+++ gcc/config/i386/cygwin.h (working copy)
@@ -18,11 +18,20 @@
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
-#define EXTRA_OS_CPP_BUILTINS() /* Nothing. */
+#define EXTRA_OS_CPP_BUILTINS() \
+ do \
+ { \
+ builtin_define ("__CYGWIN__"); \
+ if (!TARGET_64BIT) \
+ builtin_define ("__CYGWIN32__"); \
+ builtin_define ("__unix__"); \
+ builtin_define ("__unix"); \
+ } \
+ while (0)
#undef CPP_SPEC
#define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} \
- -D__CYGWIN32__ -D__CYGWIN__ %{!ansi:-Dunix} -D__unix__ -D__unix \
+ %{!ansi:-Dunix} %{pthread: } \
%{mwin32:-DWIN32 -D_WIN32 -D__WIN32 -D__WIN32__ %{!ansi:-DWINNT}} \
%{!nostdinc:%{!mno-win32:-idirafter ../include/w32api%s -idirafter ../../include/w32api%s}}\
"
@@ -71,12 +80,14 @@
#undef LIB_SPEC
#define LIB_SPEC "\
%{pg:-lgmon} \
+ %{pthread: } \
-lcygwin \
%{mwindows:-lgdi32 -lcomdlg32} \
-ladvapi32 -lshell32 -luser32 -lkernel32"
/* To implement C++ function replacement we always wrap the cxx
malloc-like operators. See N2800 #17.6.4.6 [replacement.functions] */
+#undef CXX_WRAP_SPEC_LIST
#define CXX_WRAP_SPEC_LIST " \
--wrap _Znwj \
--wrap _Znaj \
@@ -115,7 +126,9 @@
%{shared: --shared} %{mdll:--dll} \
%{static:-Bstatic} %{!static:-Bdynamic} \
%{shared|mdll: --enable-auto-image-base -e __cygwin_dll_entry@12} \
- --dll-search-prefix=cyg -tsaware"
+ --dll-search-prefix=cyg \
+ %{rdynamic: --export-all-symbols} \
+ %{!shared: %{!mdll: --large-address-aware --tsaware}}"
/* Binutils does not handle weak symbols from dlls correctly. For now,
do not use them unnecessarily in gthr-posix.h. */
--- gcc/config/i386/cygwin.opt 1969-12-31 18:00:00.000000000 -0600
+++ gcc/config/i386/cygwin.opt 2013-03-11 03:36:36.556378400 -0500
@@ -0,0 +1,27 @@
+; Cygwin-specific options.
+
+; Copyright (C) 2005, 2007, 2009, 2010, 2011 Free Software Foundation, Inc.
+;
+; This file is part of GCC.
+;
+; GCC is free software; you can redistribute it and/or modify it under
+; the terms of the GNU General Public License as published by the Free
+; Software Foundation; either version 3, or (at your option) any later
+; version.
+;
+; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+; WARRANTY; without even the implied warranty of MERCHANTABILITY or
+; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+; for more details.
+;
+; You should have received a copy of the GNU General Public License
+; along with GCC; see the file COPYING3. If not see
+; <http://www.gnu.org/licenses/>.
+
+pthread
+Driver
+
+rdynamic
+Driver
+
+; Retain blank line above
|