--- origsrc/gcc-4.8-20130224/gcc/config/i386/cygwin-w64.h 2013-03-03 23:36:49.242030600 -0600 +++ src/gcc-4.8-20130224/gcc/config/i386/cygwin-w64.h 2013-03-03 23:46:37.374669900 -0600 @@ -70,13 +70,14 @@ along with GCC; see the file COPYING3. /* 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 \ + --wrap _Znwm \ + --wrap _Znam \ --wrap _ZdlPv \ --wrap _ZdaPv \ - --wrap _ZnwjRKSt9nothrow_t \ - --wrap _ZnajRKSt9nothrow_t \ + --wrap _ZnwmRKSt9nothrow_t \ + --wrap _ZnamRKSt9nothrow_t \ --wrap _ZdlPvRKSt9nothrow_t \ --wrap _ZdaPvRKSt9nothrow_t \ " --- origsrc/gcc-4.8-20130224/gcc/configure 2013-02-01 14:26:24.000000000 -0600 +++ src/gcc-4.8-20130224/gcc/configure 2013-03-03 23:54:23.174312100 -0600 @@ -24261,7 +24261,7 @@ fi # wrappers to aid in interposing and redirecting operators new, delete, # etc., as per n2800 #17.6.4.6 [replacement.functions]. Check if we # are configuring for a version of Cygwin that exports the wrappers. - if test x$host = x$target; then + if test x$host = x$target && test x$host_cpu = xi686; then ac_fn_c_check_func "$LINENO" "__wrap__Znaj" "ac_cv_func___wrap__Znaj" if test "x$ac_cv_func___wrap__Znaj" = x""yes; then : gcc_ac_cygwin_dll_wrappers=yes @@ -24270,7 +24270,8 @@ else fi else - # Can't check presence of libc functions during cross-compile, so + # Either we're compiling for x86_64-cygwin, which is new enough, or + # we can't check presence of libc functions during cross-compile, so # we just have to assume we're building for an up-to-date target. gcc_ac_cygwin_dll_wrappers=yes fi --- origsrc/gcc-4.8-20130224/gcc/configure.ac 2013-02-01 14:26:24.000000000 -0600 +++ src/gcc-4.8-20130224/gcc/configure.ac 2013-03-03 23:53:37.503699900 -0600 @@ -3611,10 +3611,11 @@ changequote([,])dnl # wrappers to aid in interposing and redirecting operators new, delete, # etc., as per n2800 #17.6.4.6 [replacement.functions]. Check if we # are configuring for a version of Cygwin that exports the wrappers. - if test x$host = x$target; then + if test x$host = x$target && test x$host_cpu = xi686; then AC_CHECK_FUNC([__wrap__Znaj],[gcc_ac_cygwin_dll_wrappers=yes],[gcc_ac_cygwin_dll_wrappers=no]) else - # Can't check presence of libc functions during cross-compile, so + # Either we're compiling for x86_64-cygwin, which is new enough, or + # we can't check presence of libc functions during cross-compile, so # we just have to assume we're building for an up-to-date target. gcc_ac_cygwin_dll_wrappers=yes fi