aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface
diff options
context:
space:
mode:
authorDave Korn <dave.korn.cygwin@gmail.com>2011-12-06 20:31:31 +0000
committerDave Korn <davek@gcc.gnu.org>2011-12-06 20:31:31 +0000
commit5fa3ea21352a956a05859c65a2107f019c16013c (patch)
tree6005299b48b36986550a31c13d9a70d4ec01a4ce /gcc/ada/gcc-interface
parent8535715d0fb7c430787c257a9fc14cb34794e676 (diff)
downloadgcc-5fa3ea21352a956a05859c65a2107f019c16013c.zip
gcc-5fa3ea21352a956a05859c65a2107f019c16013c.tar.gz
gcc-5fa3ea21352a956a05859c65a2107f019c16013c.tar.bz2
Makefile.in (LIBGNAT_TARGET_PAIRS [windows targets]): Correctly detect cygwin...
* gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS [windows targets]): Correctly detect cygwin, which no longer has the '32' suffix, and use appropriate implementations of the sockets and memory packages. * sysdep.c (WIN_SETMODE): New define to choose the correct spelling of setmode/_setmode for MinGW and Cygwin, respectively. (__gnat_set_binary_mode [windows targets]): Use the above, and enable the windows version for Cygwin as well as MinGW. (__gnat_set_text_mode [windows targets]): Likewise. (__gnat_ttyname [windows targets]): Provide a Cygwin implementation in addition to the MinGW version. (__gnat_is_windows_xp): Make available to Cygwin as well as MinGW. (__gnat_get_stack_bounds): Likewise. From-SVN: r182065
Diffstat (limited to 'gcc/ada/gcc-interface')
-rw-r--r--gcc/ada/gcc-interface/Makefile.in24
1 files changed, 19 insertions, 5 deletions
diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in
index 32d8e42..f6aac1c 100644
--- a/gcc/ada/gcc-interface/Makefile.in
+++ b/gcc/ada/gcc-interface/Makefile.in
@@ -1580,18 +1580,32 @@ ifeq ($(strip $(filter-out avr none powerpc% eabispe leon% erc32% unknown elf,$(
indepsw.adb<indepsw-gnu.adb
endif
-ifeq ($(strip $(filter-out cygwin32% mingw32% pe,$(osys))),)
- LIBGNAT_TARGET_PAIRS = \
+ifeq ($(strip $(filter-out cygwin% mingw32% pe,$(osys))),)
+ # Cygwin provides a full Posix environment, and so we use the default
+ # versions of s-memory and g-socthi rather than the Windows-specific
+ # MinGW versions. Ideally we would use all the default versions for
+ # Cygwin and none of the MinGW versions, but for historical reasons
+ # the Cygwin port has always been a CygMing frankenhybrid and it is
+ # a long-term project to disentangle them.
+ ifeq ($(strip $(filter-out cygwin%,$(osys))),)
+ LIBGNAT_TARGET_PAIRS = \
+ s-memory.adb<s-memory.adb \
+ g-socthi.ads<g-socthi.ads \
+ g-socthi.adb<g-socthi.adb
+ else
+ LIBGNAT_TARGET_PAIRS = \
+ s-memory.adb<s-memory-mingw.adb \
+ g-socthi.ads<g-socthi-mingw.ads \
+ g-socthi.adb<g-socthi-mingw.adb
+ endif
+ LIBGNAT_TARGET_PAIRS += \
a-dirval.adb<a-dirval-mingw.adb \
a-excpol.adb<a-excpol-abort.adb \
s-gloloc.adb<s-gloloc-mingw.adb \
s-inmaop.adb<s-inmaop-dummy.adb \
- s-memory.adb<s-memory-mingw.adb \
s-taspri.ads<s-taspri-mingw.ads \
s-tasinf.adb<s-tasinf-mingw.adb \
s-tasinf.ads<s-tasinf-mingw.ads \
- g-socthi.ads<g-socthi-mingw.ads \
- g-socthi.adb<g-socthi-mingw.adb \
g-stsifd.adb<g-stsifd-sockets.adb \
g-soliop.ads<g-soliop-mingw.ads \
$(ATOMICS_TARGET_PAIRS)