From patchwork Tue Nov 13 21:28:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: libbacktrace patch committed: Only add -Werror for target library From: Ian Taylor X-Patchwork-Id: 198787 Message-Id: To: gcc-patches@gcc.gnu.org Date: Tue, 13 Nov 2012 13:28:09 -0800 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 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