From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20841 invoked by alias); 4 Feb 2008 19:40:12 -0000 Received: (qmail 20826 invoked by uid 22791); 4 Feb 2008 19:40:10 -0000 X-Spam-Check-By: sourceware.org Received: from an-out-0708.google.com (HELO an-out-0708.google.com) (209.85.132.247) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 04 Feb 2008 19:39:43 +0000 Received: by an-out-0708.google.com with SMTP id b36so545318ana.111 for ; Mon, 04 Feb 2008 11:39:41 -0800 (PST) Received: by 10.100.253.12 with SMTP id a12mr190504ani.27.1202153981090; Mon, 04 Feb 2008 11:39:41 -0800 (PST) Received: from lucon.org ( [76.126.237.145]) by mx.google.com with ESMTPS id 6sm3791953agd.23.2008.02.04.11.39.37 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 04 Feb 2008 11:39:38 -0800 (PST) Received: by lucon.org (Postfix, from userid 500) id 982F2F828E; Mon, 4 Feb 2008 11:39:35 -0800 (PST) Date: Mon, 04 Feb 2008 19:40:00 -0000 To: Kai Tietz , GDB Cc: Binutils , Brian Dessent , Kai Tietz , Nick Clifton , NightStrike Subject: PATCH: PR 5715: Binutils is broken on 32bit mingw host for 64bit target Message-ID: <20080204193935.GA11945@lucon.org> References: <20080204153803.GA11121@lucon.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) From: "H.J. Lu" Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-02/txt/msg00010.txt.bz2 On Mon, Feb 04, 2008 at 04:50:54PM +0100, Kai Tietz wrote: > "H.J. Lu" wrote on 04.02.2008 16:38:03: > > > On Mon, Feb 04, 2008 at 04:10:05PM +0100, Kai Tietz wrote: > > > Hi H.J., > > > > > > > On Mon, Feb 04, 2008 at 12:02:43PM +0100, Kai Tietz wrote: > > > > > Hi H.J., > > > > > > > > > > I patched bfd/warning.m4. Could you review it. It should diable > the > > > > > -Werror option for host mingw. > > > > > You need to regenerate the configure scripts, because I have > currently > > > no > > > > > ability to re-generate them. > > > > > > > > > > ChangeLog > > > > > > > > > > 2008-02-04 Kai Tietz > > > > > > > > > > * bfd/warning.m4: Disable by default -Werror for mingw. > > > > > * bfd/configure: Regenerate. > > > > > * gas/configure: Regenerate. > > > > > * binutils/configure: Regenerate. > > > > > * ld/configure: Regenerate. > > > > > > > > > > > > > Please mention PR 5715 in your ChangeLog. > > > > > > 2008-02-04 Kai Tietz > > > > > > PR/5715 > > > * bfd/warning.m4: Disable by default -Werror for mingw. > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > It is wrong. > > > > > > +# Disable -Werror by default when using gcc and mingw > > ^^^^^^^^^^^^^ > > It is wrong. > > > +case "${host}" in > > > + *-*-mingw32*) > > > + if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then > > > + GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wno-format" > > > + fi > > > + ;; > > > + *) ;; > > > +esac > > > + > > > > Do you want to use -Wno-format on 64bit mingw? I thought 64bit mingw > > was OK. Otherwise, you will see the same error on 64bit mingw. > > Yes, because this feature is available until gcc 4.4 (AFAICS). If you > don't apply the patch file for gcc 4.3, you will have the same results as > for any mingw target. The patch to gcc affects all mingw targets. > I am applying this patch as an obvious fix. I will check if gdb needs update. H.J. --- bfd/ 2008-02-04 Kai Tietz H.J. Lu PR 5715 * warning.m4: Enable -Wno-format by default when using gcc on mingw. * configure: Regenerated. binutils/ 2008-02-04 H.J. Lu PR 5715 * configure: Regenerated. gas/ 2008-02-04 H.J. Lu PR 5715 * configure: Regenerated. ld/ 2008-02-04 H.J. Lu PR 5715 * configure: Regenerated. opcodes/ 2008-02-04 H.J. Lu PR 5715 * configure: Regenerated. --- binutils/bfd/configure.ll 2008-02-04 11:26:25.000000000 -0800 +++ binutils/bfd/configure 2008-02-04 11:32:07.000000000 -0800 @@ -10609,6 +10609,16 @@ echo "$as_me: error: bad value ${enablev esac fi; +# Enable -Wno-format by default when using gcc on mingw +case "${host}" in + *-*-mingw32*) + if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then + GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wno-format" + fi + ;; + *) ;; +esac + # Enable -Werror by default when using gcc if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then ERROR_ON_WARNING=yes --- binutils/bfd/warning.m4.ll 2007-11-28 17:21:45.000000000 -0800 +++ binutils/bfd/warning.m4 2008-02-04 11:32:00.000000000 -0800 @@ -11,6 +11,16 @@ AC_ARG_ENABLE(werror, *) AC_MSG_ERROR(bad value ${enableval} for --enable-werror) ;; esac]) +# Enable -Wno-format by default when using gcc on mingw +case "${host}" in + *-*-mingw32*) + if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then + GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wno-format" + fi + ;; + *) ;; +esac + # Enable -Werror by default when using gcc if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then ERROR_ON_WARNING=yes --- binutils/binutils/configure.ll 2007-11-28 17:21:00.000000000 -0800 +++ binutils/binutils/configure 2008-02-04 11:32:22.000000000 -0800 @@ -10305,6 +10305,16 @@ echo "$as_me: error: bad value ${enablev esac fi; +# Enable -Wno-format by default when using gcc on mingw +case "${host}" in + *-*-mingw32*) + if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then + GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wno-format" + fi + ;; + *) ;; +esac + # Enable -Werror by default when using gcc if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then ERROR_ON_WARNING=yes --- binutils/gas/configure.ll 2007-11-28 17:20:17.000000000 -0800 +++ binutils/gas/configure 2008-02-04 11:32:24.000000000 -0800 @@ -10325,6 +10325,16 @@ echo "$as_me: error: bad value ${enablev esac fi; +# Enable -Wno-format by default when using gcc on mingw +case "${host}" in + *-*-mingw32*) + if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then + GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wno-format" + fi + ;; + *) ;; +esac + # Enable -Werror by default when using gcc if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then ERROR_ON_WARNING=yes --- binutils/ld/configure.ll 2007-11-28 17:18:17.000000000 -0800 +++ binutils/ld/configure 2008-02-04 11:32:10.000000000 -0800 @@ -3315,6 +3315,16 @@ echo "$as_me: error: bad value ${enablev esac fi; +# Enable -Wno-format by default when using gcc on mingw +case "${host}" in + *-*-mingw32*) + if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then + GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wno-format" + fi + ;; + *) ;; +esac + # Enable -Werror by default when using gcc if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then ERROR_ON_WARNING=yes @@ -4718,13 +4728,13 @@ if test "${lt_cv_nm_interface+set}" = se else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:4721: $ac_compile\"" >&5) + (eval echo "\"\$as_me:4731: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:4724: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:4734: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:4727: output\"" >&5) + (eval echo "\"\$as_me:4737: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -5779,7 +5789,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 5782 "configure"' > conftest.$ac_ext + echo '#line 5792 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -6879,11 +6889,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6882: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6892: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6886: \$? = $ac_status" >&5 + echo "$as_me:6896: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7201,11 +7211,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7204: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7214: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7208: \$? = $ac_status" >&5 + echo "$as_me:7218: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7306,11 +7316,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7309: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7319: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:7313: \$? = $ac_status" >&5 + echo "$as_me:7323: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -7361,11 +7371,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7364: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7374: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:7368: \$? = $ac_status" >&5 + echo "$as_me:7378: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -10158,7 +10168,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10161 "configure" +#line 10171 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10258,7 +10268,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10261 "configure" +#line 10271 "configure" #include "confdefs.h" #if HAVE_DLFCN_H --- binutils/opcodes/configure.ll 2008-02-04 11:24:39.000000000 -0800 +++ binutils/opcodes/configure 2008-02-04 11:32:14.000000000 -0800 @@ -10471,6 +10471,16 @@ echo "$as_me: error: bad value ${enablev esac fi; +# Enable -Wno-format by default when using gcc on mingw +case "${host}" in + *-*-mingw32*) + if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then + GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wno-format" + fi + ;; + *) ;; +esac + # Enable -Werror by default when using gcc if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then ERROR_ON_WARNING=yes