Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [patch] Failed to build mips64-elf with NLS on OSX
@ 2006-06-15  8:12 Masaki Muranaka
  2006-06-15  8:22 ` Andreas Schwab
  0 siblings, 1 reply; 8+ messages in thread
From: Masaki Muranaka @ 2006-06-15  8:12 UTC (permalink / raw)
  To: gdb-patches

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 <monaka@monami-software.com>

	* 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



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-06-16  0:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-15  8:12 [patch] Failed to build mips64-elf with NLS on OSX Masaki Muranaka
2006-06-15  8:22 ` Andreas Schwab
2006-06-15  9:12   ` Masaki Muranaka
2006-06-15  9:24     ` Andreas Schwab
2006-06-15 10:04       ` Masaki Muranaka
2006-06-15 11:34         ` Masaki Muranaka
2006-06-15 13:51           ` Daniel Jacobowitz
2006-06-16  0:42             ` Masaki Muranaka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox