config.gcc (c_target_objs): Don't add cygwin2.o.

* config.gcc (c_target_objs)[i?86-*-pe|i?86-*-cygwin*]: Don't add
	cygwin2.o.
	(cxx_target_objs)[i?86-*-pe|i?86-*-cygwin*]: Likewise.
	(extra_gcc_objs)[i?86-*-pe|i?86-*-cygwin*]: Don't add cygwin1.o.
	* config/i386/t-cygwin (cygwin1.o): Delete build rule.
	(cygwin2.o): Likewise.
	* config/i386/cygwin1.c: Delete file.
	* config/i386/cygwin2.c: Likewise.
	* config/i386/cygwin.h (CPP_SPEC): Remove all %{mno-cygwin} specs and
	make all {%!mno-cygwin} ones unconditional.
	(STARTFILE_SPEC): Likewise.
	(REAL_LIBGCC_SPEC): Likewise.
	(LIB_SPEC): Likewise.
	(CXX_WRAP_SPEC): Likewise.
	(LINK_SPEC): Likewise.
	(CYGWIN_MINGW_SUBDIR): Delete now-unused macro definition.
	(CYGWIN_MINGW_SUBDIR_LEN): Likewise.
	(cygwin_gplusplus_include_dir): Delete now-unused array.
	(GPLUSPLUS_INCLUDE_DIR): Don't redefine to point to it.
	(cygwin_gplusplus_tool_include_dir): Delete now-unused array.
	(GPLUSPLUS_TOOL_INCLUDE_DIR): Don't redefine to point to it.
	(cygwin_gplusplus_backward_include_dir): Delete now-unused array.
	(GPLUSPLUS_BACKWARD_INCLUDE_DIR): Don't redefine to point to it.
	(cygwin_local_include_dir): Delete now-unused array.
	(LOCAL_INCLUDE_DIR): Don't redefine to point to it.
	(cygwin_cross_include_dir): Delete now-unused array.
	(CROSS_INCLUDE_DIR): Don't redefine to point to it.
	(cygwin_tool_include_dir): Delete now-unused array.
	(TOOL_INCLUDE_DIR): Don't redefine to point to it.
	(cygwin_standard_include_dir): Delete now-unused array.
	(STANDARD_INCLUDE_DIR): Don't redefine to point to it.
	(GEN_CVT_ARRAY): Delete now-unused macro definition.
	(cvt_to_mingw): Delete now-unused array.
	(mingw_scan): Remove prototype of deleted function.
	(GCC_DRIVER_HOST_INITIALIZATION): Don't define now-unused target macro.
	* config/i386/cygming.opt (mcygwin): Delete target-specific option.
	* doc/invoke.texi (-mcygwin): Don't document removed option.
	(-mno-cygwin): Likewise.

From-SVN: r165119
This commit is contained in:
Dave Korn 2010-10-07 14:44:47 +00:00 committed by Dave Korn
parent a4c37c1616
commit 3edeb30d04
8 changed files with 53 additions and 336 deletions

View File

@ -1,3 +1,44 @@
2010-10-07 Dave Korn <dave.korn.cygwin@gmail.com>
* config.gcc (c_target_objs)[i?86-*-pe|i?86-*-cygwin*]: Don't add
cygwin2.o.
(cxx_target_objs)[i?86-*-pe|i?86-*-cygwin*]: Likewise.
(extra_gcc_objs)[i?86-*-pe|i?86-*-cygwin*]: Don't add cygwin1.o.
* config/i386/t-cygwin (cygwin1.o): Delete build rule.
(cygwin2.o): Likewise.
* config/i386/cygwin1.c: Delete file.
* config/i386/cygwin2.c: Likewise.
* config/i386/cygwin.h (CPP_SPEC): Remove all %{mno-cygwin} specs and
make all {%!mno-cygwin} ones unconditional.
(STARTFILE_SPEC): Likewise.
(REAL_LIBGCC_SPEC): Likewise.
(LIB_SPEC): Likewise.
(CXX_WRAP_SPEC): Likewise.
(LINK_SPEC): Likewise.
(CYGWIN_MINGW_SUBDIR): Delete now-unused macro definition.
(CYGWIN_MINGW_SUBDIR_LEN): Likewise.
(cygwin_gplusplus_include_dir): Delete now-unused array.
(GPLUSPLUS_INCLUDE_DIR): Don't redefine to point to it.
(cygwin_gplusplus_tool_include_dir): Delete now-unused array.
(GPLUSPLUS_TOOL_INCLUDE_DIR): Don't redefine to point to it.
(cygwin_gplusplus_backward_include_dir): Delete now-unused array.
(GPLUSPLUS_BACKWARD_INCLUDE_DIR): Don't redefine to point to it.
(cygwin_local_include_dir): Delete now-unused array.
(LOCAL_INCLUDE_DIR): Don't redefine to point to it.
(cygwin_cross_include_dir): Delete now-unused array.
(CROSS_INCLUDE_DIR): Don't redefine to point to it.
(cygwin_tool_include_dir): Delete now-unused array.
(TOOL_INCLUDE_DIR): Don't redefine to point to it.
(cygwin_standard_include_dir): Delete now-unused array.
(STANDARD_INCLUDE_DIR): Don't redefine to point to it.
(GEN_CVT_ARRAY): Delete now-unused macro definition.
(cvt_to_mingw): Delete now-unused array.
(mingw_scan): Remove prototype of deleted function.
(GCC_DRIVER_HOST_INITIALIZATION): Don't define now-unused target macro.
* config/i386/cygming.opt (mcygwin): Delete target-specific option.
* doc/invoke.texi (-mcygwin): Don't document removed option.
(-mno-cygwin): Likewise.
2010-10-07 Richard Guenther <rguenther@suse.de>
* machmode.h (mode_for_vector): Declare.

View File

@ -1410,9 +1410,8 @@ i[34567]86-*-pe | i[34567]86-*-cygwin*)
target_gtfiles="\$(srcdir)/config/i386/winnt.c"
extra_options="${extra_options} i386/cygming.opt"
extra_objs="winnt.o winnt-stubs.o"
c_target_objs="${c_target_objs} cygwin2.o msformat-c.o"
cxx_target_objs="${cxx_target_objs} cygwin2.o winnt-cxx.o msformat-c.o"
extra_gcc_objs=cygwin1.o
c_target_objs="${c_target_objs} msformat-c.o"
cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o"
if test x$enable_threads = xyes; then
thread_file='posix'
fi

View File

@ -1,6 +1,6 @@
; Cygwin- and MinGW-specific options.
; Copyright (C) 2005, 2007, 2009 Free Software Foundation, Inc.
; Copyright (C) 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
;
; This file is part of GCC.
;
@ -22,10 +22,6 @@ mconsole
Target RejectNegative
Create console application
mcygwin
Target
Use the Cygwin interface
mdll
Target RejectNegative
Generate code for a DLL

View File

@ -25,17 +25,14 @@ along with GCC; see the file COPYING3. If not see
#undef CPP_SPEC
#define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} \
%{mno-win32:%{mno-cygwin: %emno-cygwin and mno-win32 are not compatible}} \
%{mno-cygwin:-D__MSVCRT__ -D__MINGW32__ %{!ansi:%{mthreads:-D_MT}}}\
%{!mno-cygwin:-D__CYGWIN32__ -D__CYGWIN__ %{!ansi:-Dunix} -D__unix__ -D__unix }\
%{mwin32|mno-cygwin:-DWIN32 -D_WIN32 -D__WIN32 -D__WIN32__ %{!ansi:-DWINNT}}\
%{!nostdinc:%{!mno-win32|mno-cygwin:-idirafter ../include/w32api%s -idirafter ../../include/w32api%s}}\
-D__CYGWIN32__ -D__CYGWIN__ %{!ansi:-Dunix} -D__unix__ -D__unix \
%{mwin32:-DWIN32 -D_WIN32 -D__WIN32 -D__WIN32__ %{!ansi:-DWINNT}} \
%{!nostdinc:%{!mno-win32:-idirafter ../include/w32api%s -idirafter ../../include/w32api%s}}\
"
#undef STARTFILE_SPEC
#define STARTFILE_SPEC "\
%{shared|mdll: %{mno-cygwin:dllcrt2%O%s}}\
%{!shared: %{!mdll: %{!mno-cygwin:crt0%O%s} %{mno-cygwin:crt2%O%s}\
%{!shared: %{!mdll: crt0%O%s \
%{pg:gcrt0%O%s}}}\
crtbegin.o%s"
@ -66,10 +63,7 @@ along with GCC; see the file COPYING3. If not see
#endif
#undef REAL_LIBGCC_SPEC
#define REAL_LIBGCC_SPEC \
"%{mno-cygwin: %{mthreads:-lmingwthrd} -lmingw32} \
" SHARED_LIBGCC_SPEC " \
%{mno-cygwin:-lmoldname -lmingwex -lmsvcrt}"
#define REAL_LIBGCC_SPEC SHARED_LIBGCC_SPEC
/* We have to dynamic link to get to the system DLLs. All of libc, libm and
the Unix stuff is in cygwin.dll. The import library is called
@ -80,8 +74,7 @@ along with GCC; see the file COPYING3. If not see
#undef LIB_SPEC
#define LIB_SPEC "\
%{pg:-lgmon} \
%{!mno-cygwin:-lcygwin} \
%{mno-cygwin:%{mthreads:-lmingwthrd} -lmingw32} \
-lcygwin \
%{mwindows:-lgdi32 -lcomdlg32} \
-ladvapi32 -lshell32 -luser32 -lkernel32"
@ -108,7 +101,7 @@ along with GCC; see the file COPYING3. If not see
#define CXX_WRAP_SPEC_OPT "muse-libstdc-wrappers"
#endif
#define CXX_WRAP_SPEC "%{!mno-cygwin:%{" CXX_WRAP_SPEC_OPT ":" CXX_WRAP_SPEC_LIST "}}"
#define CXX_WRAP_SPEC "%{" CXX_WRAP_SPEC_OPT ":" CXX_WRAP_SPEC_LIST "}"
#else /* !defined (USE_CYGWIN_LIBSTDCXX_WRAPPERS) */
@ -123,165 +116,8 @@ along with GCC; see the file COPYING3. If not see
%{shared: %{mdll: %eshared and mdll are not compatible}} \
%{shared: --shared} %{mdll:--dll} \
%{static:-Bstatic} %{!static:-Bdynamic} \
%{shared|mdll: --enable-auto-image-base -e \
%{mno-cygwin:_DllMainCRTStartup@12} \
%{!mno-cygwin:__cygwin_dll_entry@12}}\
%{!mno-cygwin:--dll-search-prefix=cyg -tsaware}"
/* Allocate space for all of the machine-spec-specific stuff.
Allocate enough space for cygwin -> mingw32 munging plus
possible addition of "/mingw". */
#ifndef CYGWIN_MINGW_SUBDIR
#define CYGWIN_MINGW_SUBDIR "/mingw"
#endif
#define CYGWIN_MINGW_SUBDIR_LEN (sizeof (CYGWIN_MINGW_SUBDIR) - 1)
#ifdef GPLUSPLUS_INCLUDE_DIR
char cygwin_gplusplus_include_dir[sizeof (GPLUSPLUS_INCLUDE_DIR) + 1
+ (CYGWIN_MINGW_SUBDIR_LEN)]
= GPLUSPLUS_INCLUDE_DIR;
#undef GPLUSPLUS_INCLUDE_DIR
#define GPLUSPLUS_INCLUDE_DIR ((const char *) cygwin_gplusplus_include_dir)
#ifndef GEN_CVT_ARRAY
#define GEN_CVT_ARRAY
#endif
#endif
#ifdef GPLUSPLUS_TOOL_INCLUDE_DIR
char cygwin_gplusplus_tool_include_dir[sizeof (GPLUSPLUS_TOOL_INCLUDE_DIR) + 1
+ CYGWIN_MINGW_SUBDIR_LEN]
= GPLUSPLUS_TOOL_INCLUDE_DIR;
#undef GPLUSPLUS_TOOL_INCLUDE_DIR
#define GPLUSPLUS_TOOL_INCLUDE_DIR ((const char *) cygwin_gplusplus_tool_include_dir)
#ifndef GEN_CVT_ARRAY
#define GEN_CVT_ARRAY
#endif
#endif
#ifdef GPLUSPLUS_BACKWARD_INCLUDE_DIR
char cygwin_gplusplus_backward_include_dir[sizeof (GPLUSPLUS_BACKWARD_INCLUDE_DIR) + 1
+ CYGWIN_MINGW_SUBDIR_LEN]
= GPLUSPLUS_BACKWARD_INCLUDE_DIR;
#undef GPLUSPLUS_BACKWARD_INCLUDE_DIR
#define GPLUSPLUS_BACKWARD_INCLUDE_DIR ((const char *) cygwin_gplusplus_backward_include_dir)
#ifndef GEN_CVT_ARRAY
#define GEN_CVT_ARRAY
#endif
#endif
#ifdef LOCAL_INCLUDE_DIR
char cygwin_local_include_dir[sizeof (LOCAL_INCLUDE_DIR) + 1
+ CYGWIN_MINGW_SUBDIR_LEN]
= LOCAL_INCLUDE_DIR;
#undef LOCAL_INCLUDE_DIR
#define LOCAL_INCLUDE_DIR ((const char *) cygwin_local_include_dir)
#ifndef GEN_CVT_ARRAY
#define GEN_CVT_ARRAY
#endif
#endif
#ifdef CROSS_INCLUDE_DIR
char cygwin_cross_include_dir[sizeof (CROSS_INCLUDE_DIR) + 1
+ CYGWIN_MINGW_SUBDIR_LEN]
= CROSS_INCLUDE_DIR;
#undef CROSS_INCLUDE_DIR
#define CROSS_INCLUDE_DIR ((const char *) cygwin_cross_include_dir)
#ifndef GEN_CVT_ARRAY
#define GEN_CVT_ARRAY
#endif
#endif
#ifdef TOOL_INCLUDE_DIR
char cygwin_tool_include_dir[sizeof (TOOL_INCLUDE_DIR) + 1
+ CYGWIN_MINGW_SUBDIR_LEN]
= TOOL_INCLUDE_DIR;
#undef TOOL_INCLUDE_DIR
#define TOOL_INCLUDE_DIR ((const char *) cygwin_tool_include_dir)
#ifndef CROSS_DIRECTORY_STRUCTURE
#undef STANDARD_INCLUDE_DIR
#define STANDARD_INCLUDE_DIR "/usr/include"
char cygwin_standard_include_dir[sizeof (STANDARD_INCLUDE_DIR) + 1
+ CYGWIN_MINGW_SUBDIR_LEN]
= STANDARD_INCLUDE_DIR;
#undef STANDARD_INCLUDE_DIR
#define STANDARD_INCLUDE_DIR ((const char *) cygwin_standard_include_dir)
#endif
#ifndef GEN_CVT_ARRAY
#define GEN_CVT_ARRAY
#endif
#endif
#ifndef GEN_CVT_ARRAY
extern char *cvt_to_mingw[];
#else
char *cvt_to_mingw[] =
{
#ifdef GPLUSPLUS_INCLUDE_DIR
cygwin_gplusplus_include_dir,
#endif
#ifdef GPLUSPLUS_TOOL_INCLUDE_DIR
cygwin_gplusplus_tool_include_dir,
#endif
#ifdef GPLUSPLUS_BACKWARD_INCLUDE_DIR
cygwin_gplusplus_backward_include_dir,
#endif
#ifdef LOCAL_INCLUDE_DIR
cygwin_local_include_dir,
#endif
#ifdef CROSS_INCLUDE_DIR
cygwin_cross_include_dir,
#endif
#ifdef TOOL_INCLUDE_DIR
cygwin_tool_include_dir,
#endif
#ifdef STANDARD_INCLUDE_DIR
cygwin_standard_include_dir,
#endif
NULL
};
#undef GEN_CVT_ARRAY
#endif /*GEN_CVT_ARRAY*/
void mingw_scan (unsigned int, const struct cl_decoded_option *,
const char **);
#if 1
#define GCC_DRIVER_HOST_INITIALIZATION \
do \
{ \
mingw_scan (decoded_options_count, decoded_options, &spec_machine); \
} \
while (0)
#else
#define GCC_DRIVER_HOST_INITIALIZATION \
do \
{ \
char *cprefix = concat (tooldir_base_prefix, spec_machine, \
dir_separator_str, NULL); \
if (!IS_ABSOLUTE_PATH (cprefix)) \
cprefix = concat (standard_exec_prefix, spec_machine, dir_separator_str, \
spec_version, dir_separator_str, tooldir_prefix, NULL); \
add_prefix (&exec_prefixes,\
concat (cprefix, "../../../../", spec_machine, "/bin/", NULL), \
"BINUTILS", PREFIX_PRIORITY_LAST, 0, NULL); \
add_prefix (&exec_prefixes, cprefix, \
"BINUTILS", PREFIX_PRIORITY_LAST, 0, NULL); \
add_prefix (&startfile_prefixes,\
concat (standard_startfile_prefix, "w32api", NULL),\
"GCC", PREFIX_PRIORITY_LAST, 0, NULL);\
mingw_scan (decoded_options_count, decoded_options, &spec_machine); \
} \
while (0)
#endif
%{shared|mdll: --enable-auto-image-base -e __cygwin_dll_entry@12} \
--dll-search-prefix=cyg -tsaware"
/* Binutils does not handle weak symbols from dlls correctly. For now,
do not use them unnecessarily in gthr-posix.h. */

View File

@ -1,63 +0,0 @@
/* Helper routines for cygwin-specific command-line parsing.
Contributed by Christopher Faylor (cgf@redhat.com)
Copyright 2003, 2005, 2007, 2008 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/>. */
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "opts.h"
#include <string.h>
void
mingw_scan (unsigned int decoded_options_count,
const struct cl_decoded_option *decoded_options,
const char **spec_machine)
{
unsigned int i;
putenv (xstrdup ("GCC_CYGWIN_MINGW=0"));
for (i = 1; i < decoded_options_count; i++)
switch (decoded_options[i].opt_index)
{
case OPT_mwin32:
if (decoded_options[i].value == 0)
putenv (xstrdup ("GCC_CYGWIN_WIN32=0"));
else
putenv (xstrdup ("GCC_CYGWIN_WIN32=1"));
break;
case OPT_mcygwin:
if (decoded_options[i].value == 0)
{
char *p = strstr (*spec_machine, "-cygwin");
if (p)
{
int len = p - *spec_machine;
char *s = XNEWVEC (char, strlen (*spec_machine) + 3);
memcpy (s, *spec_machine, len);
strcpy (s + len, "-mingw32");
*spec_machine = s;
}
putenv (xstrdup ("GCC_CYGWIN_MINGW=1"));
}
break;
}
return;
}

View File

@ -1,66 +0,0 @@
/* Helper routines for cygwin-specific command-line parsing.
Contributed by Christopher Faylor (cgf@redhat.com)
Copyright 2003, 2007 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/>. */
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "safe-ctype.h"
#include <string.h>
/*
static void remove_w32api (void);
*/
static void add_mingw (void);
static void set_mingw (void) __attribute__ ((constructor));
static void
add_mingw (void)
{
char **av;
char *p;
for (av = cvt_to_mingw; *av; av++)
{
int sawcygwin = 0;
while ((p = strstr (*av, "-cygwin")))
{
char *over = p + sizeof ("-cygwin") - 1;
memmove (over + 1, over, strlen (over));
memcpy (p, "-mingw32", sizeof("-mingw32") - 1);
p = ++over;
while (ISALNUM (*p))
p++;
strcpy (over, p);
sawcygwin = 1;
}
if (!sawcygwin && !strstr (*av, "mingw"))
strcat (*av, CYGWIN_MINGW_SUBDIR);
}
}
static void
set_mingw (void)
{
char *env = getenv ("GCC_CYGWIN_MINGW");
if (env && *env == '1')
add_mingw ();
}

View File

@ -23,16 +23,6 @@
LIBGCC2_INCLUDES += -I$(srcdir)/../winsup/include \
-I$(srcdir)/../winsup/cygwin/include
cygwin1.o: $(srcdir)/config/i386/cygwin1.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(TM_P_H) opts.h
$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
$(srcdir)/config/i386/cygwin1.c
cygwin2.o: $(srcdir)/config/i386/cygwin2.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(TM_P_H)
$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
$(srcdir)/config/i386/cygwin2.c
# Cygwin-specific parts of LIB_SPEC
SHLIB_LC = -lcygwin -ladvapi32 -lshell32 -luser32 -lkernel32

View File

@ -17396,22 +17396,6 @@ instructing the linker to set the PE header subsystem type
required for console applications.
This is the default behavior for Cygwin and MinGW targets.
@item -mcygwin
@opindex mcygwin
This option is available for Cygwin targets. It specifies that
the Cygwin internal interface is to be used for predefined
preprocessor macros, C runtime libraries and related linker
paths and options. For Cygwin targets this is the default behavior.
This option is deprecated and will be removed in a future release.
@item -mno-cygwin
@opindex mno-cygwin
This option is available for Cygwin targets. It specifies that
the MinGW internal interface is to be used instead of Cygwin's, by
setting MinGW-related predefined macros and linker paths and default
library options.
This option is deprecated and will be removed in a future release.
@item -mdll
@opindex mdll
This option is available for Cygwin and MinGW targets. It