From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32036 invoked by alias); 15 Jun 2006 08:12:16 -0000 Received: (qmail 32028 invoked by uid 22791); 15 Jun 2006 08:12:15 -0000 X-Spam-Check-By: sourceware.org Received: from p12018-ipbffx02marunouchi.tokyo.ocn.ne.jp (HELO mail.pizzafactory.jp) (222.147.75.18) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 15 Jun 2006 08:12:12 +0000 Received: from [192.168.0.2] (unknown [192.168.0.2]) by mail.pizzafactory.jp (Postfix) with ESMTP id DCA3D202EFB2 for ; Thu, 15 Jun 2006 17:12:08 +0900 (JST) Mime-Version: 1.0 (Apple Message framework v750) Content-Transfer-Encoding: 7bit Message-Id: <9E9B2AC9-6DB7-4D6A-BF9C-2B3E387F67E2@monami-software.com> Content-Type: text/plain; charset=SHIFT_JIS; format=flowed To: gdb-patches@sourceware.org From: Masaki Muranaka Subject: [patch] Failed to build mips64-elf with NLS on OSX Date: Thu, 15 Jun 2006 08:12:00 -0000 X-Mailer: Apple Mail (2.750) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-06/txt/msg00224.txt.bz2 Hello, On mainline, it's failed to compile with a lot of warnings like : format not a string literal, argument types not checked : format not a string literal and no format arguments In case building with NLS, _("string") was expanded to gettext("string"), not literal. The patch is to suppress -Wformat-nonliteral when you build with NLS. My environment is OSX (gcc version 4.0.1), configuration is --target=mips64-elf. I've not tested yet but I guess it occurs on the another host and target. - - - - - - - - - - - 2006-06-15 Masaki Muranaka * configure.ac: Remove -Wformat-nonliteral if USE_NLS = yes * configure: regenerate. - - - - - - - - - - - Index: configure =================================================================== RCS file: /cvs/src/src/gdb/configure,v retrieving revision 1.212 diff -u -p -r1.212 configure --- configure 31 May 2006 15:14:36 -0000 1.212 +++ configure 15 Jun 2006 08:05:55 -0000 @@ -20277,8 +20277,11 @@ fi # NOTE: If you add to this list, remember to update # gdb/doc/gdbint.texinfo. build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \ --Wformat -Wparentheses -Wpointer-arith -Wformat-nonliteral \ +-Wformat -Wparentheses -Wpointer-arith \ -Wunused-label -Wunused-function -Wno-pointer-sign" +if test x"$USE_NLS" != xyes; then + build_warnings="$build_warnings -Wformat-nonliteral" +fi # GCC supports -Wuninitialized only with -O or -On, n != 0. if test x${CFLAGS+set} = xset; then Index: configure.ac =================================================================== RCS file: /cvs/src/src/gdb/configure.ac,v retrieving revision 1.33 diff -u -p -r1.33 configure.ac --- configure.ac 31 May 2006 15:14:37 -0000 1.33 +++ configure.ac 15 Jun 2006 08:05:56 -0000 @@ -1104,8 +1104,11 @@ fi # NOTE: If you add to this list, remember to update # gdb/doc/gdbint.texinfo. build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \ --Wformat -Wparentheses -Wpointer-arith -Wformat-nonliteral \ +-Wformat -Wparentheses -Wpointer-arith \ -Wunused-label -Wunused-function -Wno-pointer-sign" +if test x"$USE_NLS" != xyes; then + build_warnings="$build_warnings -Wformat-nonliteral" +fi # GCC supports -Wuninitialized only with -O or -On, n != 0. if test x${CFLAGS+set} = xset; then -- Masaki Muranaka Monami software