From patchwork Sun Jan 24 12:53:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikhail Maltsev X-Patchwork-Id: 572244 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 21222140BAB for ; Sun, 24 Jan 2016 23:54:04 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=CtuMq6Y2; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=ai6DuCFtbLA0G7VvxzlqDCytE0tmPOgSAXIkWFJcKE2OdMUZtK VeorSw9gGHWZXHYVV8vk8DzE6fiN/NN4iD7hXoVXN/OBa+i+dJv7EQ3FyuSlqy4m hISE/17R8QZPtpVooiVjXbgPsxW3IUfb8ylLjgNSO7aMUM/oMTpPUNLu8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=E6Fn1w0vOJsZC0iwVzPfxqbini4=; b=CtuMq6Y260S7fO24xBT9 4slMLmB3rjXRSuQF6sYdFiWQTU14/EIusXPTgvQdx6fQcEo9j/Pt7R4Lu7T2qF7s JhgqsAyYF3Cn+SwwNHXBQpRM8nnMoO+FtO25FPJrzcqZB5iV/M86B23UYeLExlLo ofH5GXZZSMF5kMRiPPRdCRc= Received: (qmail 92689 invoked by alias); 24 Jan 2016 12:53:57 -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 92677 invoked by uid 89); 24 Jan 2016 12:53:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1900, H*RU:2a00, Hx-spam-relays-external:1450, Hx-spam-relays-external:2a00 X-HELO: fencepost.gnu.org Received: from fencepost.gnu.org (HELO fencepost.gnu.org) (208.118.235.10) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sun, 24 Jan 2016 12:53:55 +0000 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49491) by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1aNKAz-00084z-6I for gcc-patches@gnu.org; Sun, 24 Jan 2016 07:53:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aNKAo-0004WC-FX for gcc-patches@gnu.org; Sun, 24 Jan 2016 07:53:47 -0500 Received: from mail-lf0-x22c.google.com ([2a00:1450:4010:c07::22c]:34587) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNKAo-0004Vz-6J for gcc-patches@gnu.org; Sun, 24 Jan 2016 07:53:42 -0500 Received: by mail-lf0-x22c.google.com with SMTP id 17so70363044lfz.1 for ; Sun, 24 Jan 2016 04:53:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-type; bh=MWaYiftX+B4PBLRGNE85NPvPycXkpiYTNLLniS+TDqI=; b=lOlG9Fksz/+ram+Y+F6De5J0ghCTSRmK5aL3dW7w86V/OoYbhsdETwfaj80sMIsF9S 6yOrB1FsWxKoJYltq+bJPv4w08S7kM0oekqMv+FjJuFVQxV19YZzN1N4AuQui8zdloLt D1UJIX0hhs6L2gQb2J7yG5GqwFBOogqcUHZEAKWNroAb+ZrTZN0AbtdjoqpKgG0qxZzm k/9B3rEL/1+AgqLRNaiAfnISyurtMwi84j11sBI5YuN0nfLiQIPkUiNtoEKR4haN1YfY pV/DgFcW6Y2xeEFt5U7LQwcY9Z3hNl9typaITJsNMBoiQSbNDWJfcCfC6S1uycwbIANd kJAA== X-Gm-Message-State: AG10YORYJVwsFOXPy/slkDP4ggofPtr7b4QcvS3jd8JlQfwUsmpk1yWVLN3ec+mzRGXwYg== X-Received: by 10.25.86.211 with SMTP id k202mr4553695lfb.69.1453640018570; Sun, 24 Jan 2016 04:53:38 -0800 (PST) Received: from [192.168.123.200] ([77.41.78.126]) by smtp.googlemail.com with ESMTPSA id r63sm2100526lfe.38.2016.01.24.04.53.37 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 24 Jan 2016 04:53:37 -0800 (PST) To: gcc-patches , Jakub Jelinek From: Mikhail Maltsev Subject: [PATCH] PR69329 --with-build-config=bootstrap-asan fails because LSAN_OPTIONS is not honored Message-ID: <56A4C951.3060600@gmail.com> Date: Sun, 24 Jan 2016 15:53:37 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.4.0 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::22c X-IsSubscribed: yes Hi all! --with-build-config=bootstrap-asan build currently fails, because address sanitizer now has memory leak detection enabled by default. bootstrap-asan contains export LSAN_OPTIONS="detect_leaks=0" but unfortunately this environment variable is set in top-level Makefile and is not propagated to Makefile-s in subdirectories. The attached patch fixes this by adding LSAN_OPTIONS to BASE_FLAGS_TO_PASS. It also incorporates Jakub's comments from bugzilla. Bootstrapped and regtested on x86_64-pc-linux-gnu with default configuration and also with "--with-build-config=bootstrap-asan". OK for trunk? diff --git a/Makefile.in b/Makefile.in index 2733c4d..20d1c90 100644 --- a/Makefile.in +++ b/Makefile.in @@ -789,7 +789,8 @@ BASE_FLAGS_TO_PASS = \ $(CXX_FOR_TARGET_FLAG_TO_PASS) \ "TFLAGS=$(TFLAGS)" \ "CONFIG_SHELL=$(SHELL)" \ - "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" + "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \ + $(if $(LSAN_OPTIONS),"LSAN_OPTIONS=$(LSAN_OPTIONS)") # We leave this in just in case, but it is not needed anymore. RECURSE_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) diff --git a/Makefile.tpl b/Makefile.tpl index f7bb77e..2567365 100644 --- a/Makefile.tpl +++ b/Makefile.tpl @@ -590,7 +590,8 @@ BASE_FLAGS_TO_PASS =[+ FOR flags_to_pass +][+ IF optional +] \ $(CXX_FOR_TARGET_FLAG_TO_PASS) \ "TFLAGS=$(TFLAGS)" \ "CONFIG_SHELL=$(SHELL)" \ - "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" + "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \ + $(if $(LSAN_OPTIONS),"LSAN_OPTIONS=$(LSAN_OPTIONS)") # We leave this in just in case, but it is not needed anymore. RECURSE_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS)