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  <i...@google.com>

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


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
 

Reply via email to