From patchwork Sun Jul 29 14:50:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Buclaw X-Patchwork-Id: 950640 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-482605-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gdcproject.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="CYLpMEPK"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41dlxF4Zs7z9ryt for ; Mon, 30 Jul 2018 00:50:24 +1000 (AEST) Received: (qmail 56092 invoked by alias); 29 Jul 2018 14:50:18 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 56075 invoked by uid 89); 29 Jul 2018 14:50:17 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-23.5 required=5.0 tests=AWL, BAYES_05, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=UD:Makefile.in, Makefilein, Makefile.in, makefile.in X-HELO: mail-qt0-f179.google.com Received: from mail-qt0-f179.google.com (HELO mail-qt0-f179.google.com) (209.85.216.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 29 Jul 2018 14:50:08 +0000 Received: by mail-qt0-f179.google.com with SMTP id y19-v6so9681426qto.5 for ; Sun, 29 Jul 2018 07:50:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:from:date:message-id:subject:to:cc; bh=DkBxNoBWDmUOhgJVpyJmMvtjBsCwhtv1iA+cP523A5c=; b=CYLpMEPK5yFidxSJ7BtU/d/0ESYEEn+AU0ny8itRjobUHcEEVkCqqKPYnRAARJ/R6m EwVBWwI2x5B13nWPkICJQpXInZqmFy+xvMPc36BTorsuUQ3MkrbG2N4OhKuU4UScW6FI Bxpc9EdzrrUgU9k3bXtTQnN/vZojsehwJW5KeZid+4rO1IG5FVXPx9r/yJmGl7wiTDzB 6mebhvAfLxKLo396QdEyw8FfHF08F7dFoQ/9XpQtW5TSzRkelGgJh8goS1wK5PeJ2Ym8 HPH5u/qqE+vCzHO3RGmxI17CalDVnz3V6jsLAlxrsXxWjkIprfUuWDna3fa4pt9gT0Zx 8Pfg== MIME-Version: 1.0 Sender: ibuclaw@gmail.com Received: by 2002:ac8:787:0:0:0:0:0 with HTTP; Sun, 29 Jul 2018 07:50:06 -0700 (PDT) From: Iain Buclaw Date: Sun, 29 Jul 2018 16:50:06 +0200 Message-ID: Subject: [PATCH] libbacktrace: Move define of HAVE_ZLIB into check for -lz To: gcc-patches Cc: Ian Lance Taylor X-IsSubscribed: yes This is really to suppress the default action-if-found for AC_CHECK_LIBS. Zlib is not a dependency of libbacktrace, and so it shouldn't be added to LIBS. When looking at the check, saw that could remove the test for ac_cv_lib_z_compress also. Regards Iain 2018-07-29 Iain Buclaw * configure.ac: Move define of HAVE_ZLIB into check for -lz. * Makefile.in: Regenerate. * config.h.in: Likewise. * configure: Likewise. diff --git a/libbacktrace/Makefile.in b/libbacktrace/Makefile.in index f7f849bdeaf..8b5dc3e5b41 100644 --- a/libbacktrace/Makefile.in +++ b/libbacktrace/Makefile.in @@ -16,7 +16,7 @@ @SET_MAKE@ # Makefile.am -- Backtrace Makefile. -# Copyright (C) 2012-2017 Free Software Foundation, Inc. +# Copyright (C) 2012-2018 Free Software Foundation, Inc. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are diff --git a/libbacktrace/config.h.in b/libbacktrace/config.h.in index c19b6e430cb..6205fc55fa5 100644 --- a/libbacktrace/config.h.in +++ b/libbacktrace/config.h.in @@ -34,9 +34,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H -/* Define to 1 if you have the `z' library (-lz). */ -#undef HAVE_LIBZ - /* Define to 1 if you have the header file. */ #undef HAVE_LINK_H diff --git a/libbacktrace/configure b/libbacktrace/configure index 87cadda6c8c..d5a9d79e15c 100755 --- a/libbacktrace/configure +++ b/libbacktrace/configure @@ -12973,19 +12973,11 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5 $as_echo "$ac_cv_lib_z_compress" >&6; } if test "x$ac_cv_lib_z_compress" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBZ 1 -_ACEOF - - LIBS="-lz $LIBS" - -fi - -if test $ac_cv_lib_z_compress = "yes"; then $as_echo "#define HAVE_ZLIB 1" >>confdefs.h fi + if test "$ac_cv_lib_z_compress" = yes; then HAVE_ZLIB_TRUE= HAVE_ZLIB_FALSE='#' diff --git a/libbacktrace/configure.ac b/libbacktrace/configure.ac index 6f7b5eabca6..fd367451602 100644 --- a/libbacktrace/configure.ac +++ b/libbacktrace/configure.ac @@ -426,10 +426,8 @@ AC_SUBST(PTHREAD_CFLAGS) AM_CONDITIONAL(HAVE_PTHREAD, test "$libgo_cv_lib_pthread" = yes) -AC_CHECK_LIB([z], [compress], []) -if test $ac_cv_lib_z_compress = "yes"; then - AC_DEFINE(HAVE_ZLIB, 1, [Define if -lz is available.]) -fi +AC_CHECK_LIB([z], [compress], + [AC_DEFINE(HAVE_ZLIB, 1, [Define if -lz is available.])]) AM_CONDITIONAL(HAVE_ZLIB, test "$ac_cv_lib_z_compress" = yes) dnl Test whether the linker supports the --compress_debug_sections option.