Commit 301f4402 by Yaakov Selkowitz Committed by Kai Tietz

config.gcc (*-*-cygwin*): Use __cxa_atexit by default.

2014-08-19  Yaakov Selkowitz  <yselkowi@redhat.com>

	* config.gcc (*-*-cygwin*): Use __cxa_atexit by default.
	(extra_options): Add i386/cygwin.opt.
	* config/i386/cygwin.h (STARTFILE_SPEC): Use crtbeginS.o if shared.
	(CPP_SPEC): Accept -pthread.
	(LINK_SPEC): Ditto.
	(GOMP_SELF_SPECS): Update comment.
	* config/i386/cygwin.opt: New file for -pthread flag.

From-SVN: r214161
parent 8020a4d5
2014-08-19 Yaakov Selkowitz <yselkowi@redhat.com>
* config.gcc (*-*-cygwin*): Use __cxa_atexit by default.
(extra_options): Add i386/cygwin.opt.
* config/i386/cygwin.h (STARTFILE_SPEC): Use crtbeginS.o if shared.
(CPP_SPEC): Accept -pthread.
(LINK_SPEC): Ditto.
(GOMP_SELF_SPECS): Update comment.
* config/i386/cygwin.opt: New file for -pthread flag.
2014-08-19 David Malcolm <dmalcolm@redhat.com> 2014-08-19 David Malcolm <dmalcolm@redhat.com>
* df-core.c (DF_REF_INSN): New, using a checked cast for now. * df-core.c (DF_REF_INSN): New, using a checked cast for now.
......
...@@ -1568,13 +1568,14 @@ i[34567]86-*-cygwin*) ...@@ -1568,13 +1568,14 @@ i[34567]86-*-cygwin*)
xm_file=i386/xm-cygwin.h xm_file=i386/xm-cygwin.h
tmake_file="${tmake_file} i386/t-cygming t-slibgcc" tmake_file="${tmake_file} i386/t-cygming t-slibgcc"
target_gtfiles="\$(srcdir)/config/i386/winnt.c" 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" extra_objs="winnt.o winnt-stubs.o"
c_target_objs="${c_target_objs} msformat-c.o" c_target_objs="${c_target_objs} msformat-c.o"
cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o" cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o"
if test x$enable_threads = xyes; then if test x$enable_threads = xyes; then
thread_file='posix' thread_file='posix'
fi fi
default_use_cxa_atexit=yes
use_gcc_stdint=wrap use_gcc_stdint=wrap
;; ;;
x86_64-*-cygwin*) x86_64-*-cygwin*)
...@@ -1583,13 +1584,14 @@ x86_64-*-cygwin*) ...@@ -1583,13 +1584,14 @@ x86_64-*-cygwin*)
xm_file=i386/xm-cygwin.h xm_file=i386/xm-cygwin.h
tmake_file="${tmake_file} i386/t-cygming t-slibgcc i386/t-cygwin-w64" tmake_file="${tmake_file} i386/t-cygming t-slibgcc i386/t-cygwin-w64"
target_gtfiles="\$(srcdir)/config/i386/winnt.c" 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" extra_objs="winnt.o winnt-stubs.o"
c_target_objs="${c_target_objs} msformat-c.o" c_target_objs="${c_target_objs} msformat-c.o"
cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o" cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o"
if test x$enable_threads = xyes; then if test x$enable_threads = xyes; then
thread_file='posix' thread_file='posix'
fi fi
default_use_cxa_atexit=yes
use_gcc_stdint=wrap use_gcc_stdint=wrap
tm_defines="${tm_defines} TARGET_CYGWIN64=1" tm_defines="${tm_defines} TARGET_CYGWIN64=1"
;; ;;
......
...@@ -32,6 +32,7 @@ along with GCC; see the file COPYING3. If not see ...@@ -32,6 +32,7 @@ along with GCC; see the file COPYING3. If not see
#undef CPP_SPEC #undef CPP_SPEC
#define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} \ #define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} \
%{!ansi:-Dunix} \ %{!ansi:-Dunix} \
%{pthread:-D_REENTRANT} \
%{mwin32:-DWIN32 -D_WIN32 -D__WIN32 -D__WIN32__ %{!ansi:-DWINNT}} \ %{mwin32:-DWIN32 -D_WIN32 -D__WIN32 -D__WIN32__ %{!ansi:-DWINNT}} \
%{!nostdinc:%{!mno-win32:-idirafter ../include/w32api%s -idirafter ../../include/w32api%s}}\ %{!nostdinc:%{!mno-win32:-idirafter ../include/w32api%s -idirafter ../../include/w32api%s}}\
" "
...@@ -40,7 +41,7 @@ along with GCC; see the file COPYING3. If not see ...@@ -40,7 +41,7 @@ along with GCC; see the file COPYING3. If not see
#define STARTFILE_SPEC "\ #define STARTFILE_SPEC "\
%{!shared: %{!mdll: crt0%O%s \ %{!shared: %{!mdll: crt0%O%s \
%{pg:gcrt0%O%s}}}\ %{pg:gcrt0%O%s}}}\
crtbegin.o%s" %{shared:crtbeginS.o%s;:crtbegin.o%s}"
#undef ENDFILE_SPEC #undef ENDFILE_SPEC
#define ENDFILE_SPEC \ #define ENDFILE_SPEC \
...@@ -77,6 +78,7 @@ along with GCC; see the file COPYING3. If not see ...@@ -77,6 +78,7 @@ along with GCC; see the file COPYING3. If not see
#undef LIB_SPEC #undef LIB_SPEC
#define LIB_SPEC "\ #define LIB_SPEC "\
%{pg:-lgmon} \ %{pg:-lgmon} \
%{pthread: } \
-lcygwin \ -lcygwin \
%{mwindows:-lgdi32 -lcomdlg32} \ %{mwindows:-lgdi32 -lcomdlg32} \
-ladvapi32 -lshell32 -luser32 -lkernel32" -ladvapi32 -lshell32 -luser32 -lkernel32"
...@@ -129,7 +131,7 @@ along with GCC; see the file COPYING3. If not see ...@@ -129,7 +131,7 @@ along with GCC; see the file COPYING3. If not see
/* Every program on cygwin links against cygwin1.dll which contains /* Every program on cygwin links against cygwin1.dll which contains
the pthread routines. There is no need to explicitly link them the pthread routines. There is no need to explicitly link them
and the -pthread flag is not recognized. */ and the -pthread flag is accepted only for compatibility. */
#undef GOMP_SELF_SPECS #undef GOMP_SELF_SPECS
#define GOMP_SELF_SPECS "" #define GOMP_SELF_SPECS ""
#undef GTM_SELF_SPECS #undef GTM_SELF_SPECS
......
; Cygwin-specific options.
; Copyright (C) 2013-2014 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
; Retain blank line above
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment