From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11570 invoked by alias); 15 Jun 2006 13:51:49 -0000 Received: (qmail 11561 invoked by uid 22791); 15 Jun 2006 13:51:48 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Thu, 15 Jun 2006 13:51:47 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1FqsG4-0004iK-0q; Thu, 15 Jun 2006 09:51:40 -0400 Date: Thu, 15 Jun 2006 13:51:00 -0000 From: Daniel Jacobowitz To: Masaki Muranaka Cc: Andreas Schwab , gdb-patches@sourceware.org Subject: Re: [patch] Failed to build mips64-elf with NLS on OSX Message-ID: <20060615135139.GA17504@nevyn.them.org> Mail-Followup-To: Masaki Muranaka , Andreas Schwab , gdb-patches@sourceware.org References: <9E9B2AC9-6DB7-4D6A-BF9C-2B3E387F67E2@monami-software.com> <6E68F226-6A7E-4DB7-8734-A448045A6129@monami-software.com> <9B7B5DA2-2CC0-49E7-BE07-403B942D11CD@monami-software.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.11+cvs20060403 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/msg00231.txt.bz2 On Thu, Jun 15, 2006 at 08:34:06PM +0900, Masaki Muranaka wrote: > > Still I was confused, but I see somehow. > > On 2006/06/15, at 19:04, Masaki Muranaka wrote: > >internal_error ("../../src/gdb/mips-tdep.c", 273, libintl_gettext > >("bad switch")); > > As Schwab says, dgettext/gettext was regarded as constant by gcc. > The information was put on gcc/builtin.def. > So there is no troubles on some targets which expands _() to dgettext(). > I checked the code generated on Linux. _() was expanded to > dgettext(). > > But the another target which expands _() to libintl_gettext(), > the build will be failed. Because there is no information > about libintl_gettext() in builtin.def. > The code which is generated on MacOSX was so. > > If my understanding is reasonable, -Wformat-nonliteral > should be off in case GDB is built with intl/, right? > (Fixing GCC or intl is also not impossible, but I don't want to) But it's right :-) char *libintl_gettext (const char *) __attribute__((format_arg(1))); That's enough to fix it. The example in the manual is even a dgettext wrapper. It looks like it's been there since ~ 2001. There's already a GNUC version check in libgnuintl.h; adding another one with the appropriate version ought to fix this. -- Daniel Jacobowitz CodeSourcery