Hi, Attached are some minor patches, comments?
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35536
--- origsrc/gcc-4.5.1/libjava/gnu/java/nio/channels/natFileChannelPosix.cc 2007-04-02 20:05:50.000000000 -0500 +++ src/gcc-4.5.1/libjava/gnu/java/nio/channels/natFileChannelPosix.cc 2010-10-27 13:39:34.044718100 -0500 @@ -386,7 +386,7 @@ FileChannelImpl::available (void) #if defined (FIONREAD) r = ::ioctl (fd, FIONREAD, &num); - if (r == -1 && errno == ENOTTY) + if (r == -1 && (errno == ENOTTY || errno == EINVAL)) { // If the ioctl doesn't work, we don't care. r = 0;
--- origsrc/gcc-4.5.0/gcc/testsuite/gcc.target/i386/pr25993.c 2008-02-26 01:38:34.000000000 +0000 +++ src/gcc-4.5.0/gcc/testsuite/gcc.target/i386/pr25993.c 2010-04-25 16:17:21.703125000 +0100 @@ -1,5 +1,5 @@ /* { dg-do assemble } */ -/* { dg-skip-if "" { "*-*-darwin*" "*-*-mingw*" } { "*" } { "" } } */ +/* { dg-skip-if "" { "*-*-darwin*" "*-*-mingw*" "*-*-cygwin*" } { "*" } { "" } } */ /* { dg-options "-std=c99 -x assembler-with-cpp" } */ #ifndef __ASSEMBLER__
Accept -pthread and -rdynamic for compatibility with Linux. Add --large-address-aware, and use --tsaware, only with EXEs. --- origsrc/gcc-4.7.2/gcc/config.gcc 2012-09-12 04:03:54.000000000 -0500 +++ src/gcc-4.7.2/gcc/config.gcc 2013-03-11 03:41:03.674656700 -0500 @@ -1417,7 +1417,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" --- origsrc/gcc-4.7.2/gcc/config/i386/cygwin.h 2012-02-13 15:46:38.000000000 -0600 +++ src/gcc-4.7.2/gcc/config/i386/cygwin.h 2013-03-06 00:13:25.986558800 -0600 @@ -22,7 +22,7 @@ along with GCC; see the file COPYING3. #define EXTRA_OS_CPP_BUILTINS() /* Nothing. */ #undef CPP_SPEC -#define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} \ +#define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} %{pthread: } \ -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}}\ @@ -49,11 +49,7 @@ along with GCC; see the file COPYING3. %{static|static-libgcc:-lgcc -lgcc_eh} \ %{!static: \ %{!static-libgcc: \ - %{!shared: \ - %{!shared-libgcc:-lgcc -lgcc_eh} \ - %{shared-libgcc:-lgcc_s -lgcc} \ - } \ - %{shared:-lgcc_s -lgcc} \ + -lgcc_s -lgcc \ } \ } " #else @@ -72,6 +72,7 @@ along with GCC; see the file COPYING3. #undef LIB_SPEC #define LIB_SPEC "\ %{pg:-lgmon} \ + %{pthread: } \ -lcygwin \ %{mwindows:-lgdi32 -lcomdlg32} \ -ladvapi32 -lshell32 -luser32 -lkernel32" @@ -115,7 +116,9 @@ along with GCC; see the file COPYING3. %{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. */ --- origsrc/gcc-4.7.2/gcc/config/i386/cygwin.opt 1969-12-31 18:00:00.000000000 -0600 +++ src/gcc-4.7.2/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
signature.asc
Description: OpenPGP digital signature