This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Failed to build mips64-elf with NLS on OSX


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]