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]

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


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



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