Patchwork libbacktrace patch committed: Only add -Werror for target library

login
register
mail settings
Submitter Ian Taylor
Date Nov. 13, 2012, 9:28 p.m.
Message ID <mcrk3tp8a6u.fsf@google.com>
Download mbox | patch
Permalink /patch/198787/
State New
Headers show

Comments

Ian Taylor - Nov. 13, 2012, 9:28 p.m.
PR 55312 points out that libbacktrace is adding -Werror incorrectly.  We
should not be adding it when built as a host library, because we don't
know the characteristics of the host compiler.  We should only add it
when built as a target library.  This patch implements that.
Bootstrapped and ran libbacktrace testsuite on
x86_64-unknown-linux-gnu.  Committed to mainline.

Ian


2012-11-13  Ian Lance Taylor  <iant@google.com>

	PR other/55312
	* configure.ac: Only add -Werror if building a target library.
	* configure: Rebuild.

Patch

Index: configure.ac
===================================================================
--- configure.ac	(revision 193484)
+++ configure.ac	(working copy)
@@ -120,7 +120,7 @@  ACX_PROG_CC_WARNING_OPTS([-W -Wall -Wwri
 			  -Wmissing-format-attribute -Wcast-qual],
 			  [WARN_FLAGS])
 
-if test "x$GCC" = "xyes"; then
+if test -n "${with_target_subdir}"; then
   WARN_FLAGS="$WARN_FLAGS -Werror"
 fi