Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Masaki Muranaka <monaka@monami-software.com>
To: gdb-patches@sourceware.org
Subject: [patch] Failed to build mips64-elf with NLS on OSX
Date: Thu, 15 Jun 2006 08:12:00 -0000	[thread overview]
Message-ID: <9E9B2AC9-6DB7-4D6A-BF9C-2B3E387F67E2@monami-software.com> (raw)

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



             reply	other threads:[~2006-06-15  8:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-15  8:12 Masaki Muranaka [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9E9B2AC9-6DB7-4D6A-BF9C-2B3E387F67E2@monami-software.com \
    --to=monaka@monami-software.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox