From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id mL/UFGfz2mEUcwEAgWs5BA (envelope-from ) for ; Sun, 09 Jan 2022 15:38:31 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id gGgKEmfz2mGDzAAA9RJhRA (envelope-from ) for ; Sun, 09 Jan 2022 15:38:31 +0100 Received: from mail.notmuchmail.org (yantan.tethera.net [135.181.149.255]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D9DF529AC0 for ; Sun, 9 Jan 2022 15:38:30 +0100 (CET) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id DD7725F6E7; Sun, 9 Jan 2022 14:38:16 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 3DCB95F5E1 for ; Sun, 9 Jan 2022 14:38:14 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id A70EA5FC42; Sun, 9 Jan 2022 09:38:13 -0500 (EST) Received: (nullmailer pid 3682807 invoked by uid 1000); Sun, 09 Jan 2022 14:38:10 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: [PATCH v2 1/4] configure: check for ASAN support Date: Sun, 9 Jan 2022 10:38:02 -0400 Message-Id: <20220109143805.3682660-2-david@tethera.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220109143805.3682660-1-david@tethera.net> References: <20220109143805.3682660-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: LMM4ZZL5Z4NRRZFWZDQ2XN2YTZTOK73I X-Message-ID-Hash: LMM4ZZL5Z4NRRZFWZDQ2XN2YTZTOK73I X-MailFrom: bremner@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-Country: DE ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1641739111; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post; bh=mSTwFowlqN6IUMcMvCh2VeAZu55qy5yBdLoB/8ebIgs=; b=qk5fNo3ArE6SNpMGBDWJMr6ee1T8Eun300xd0sXWAiZXVGofxKWH5eM0W6tlhE0ouIPtbu BqPmaX1KE4V+R+R5JppX7mzqn7FlpLE/Lq+xB7qNr5dH2JUEGglEW80U97qb0deSTOQJr5 Xtq/sMj3qQbGLoqMstZYO1sT14myMPQvXvDwdoREXiq1Bf0P4yFu4G2IVAyP/Y+ZKVukwW ZbRq/JL7VblSyN9KY/CxDMuofrSd5ayp5jIGtmmdQB4aDzq/2b31wabZkZCcMIBYkbbkc7 tc4tzqLLU6koGWDR1pnRYlBdBn11xcBDP4fdzyQyLS0vWsh+v50yNVhS5ugeQg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1641739111; a=rsa-sha256; cv=none; b=mRamkIe6EPhjg7iX37OnLYb04/JcAv30jH1CAwDu8u9Vc3/bvCCAV1HaFElvUiQdncLEMg krFEOV1gjtYgwaC/atcXUnV/l285VXfJuhcFRokeHlTK+jRjl0xEYuPZSiiKXgZq74wBYQ Y8CyJcyrRXz5U1aMpBcUFhYFPfopQd+a1We+YmgX4Lv/QTPWgVi7704J/noE2oE87aq44z 2yMSKiFCgkhUSuLWbMlH3+RAik3Io8h1+MY3bC7crpwDd+3WB/JJd99lP4o4YL69E7BzOC T8sB69R2Ayh2bskRw2TcoACSpaJYGyZzvbpYY6HRDl/U8yx0/VP+5SffeWyxJw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -1.33 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: D9DF529AC0 X-Spam-Score: -1.33 X-Migadu-Scanner: scn1.migadu.com X-TUID: vJGKMYjQDpMR This will allow conditionally running tests that use the address sanitizer. --- configure | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/configure b/configure index e7bb7edc..07e0cefb 100755 --- a/configure +++ b/configure @@ -400,6 +400,18 @@ EOF exit 1 fi +printf "C compiler supports address sanitizer... " +test_cmdline="${CC} ${CFLAGS} ${CPPFLAGS} -fsanitize=address minimal.c ${LDFLAGS} -o minimal" +if ${test_cmdline} >/dev/null 2>&1 && ./minimal +then + printf "Yes.\n" + have_asan=1 +else + printf "Nope, skipping those tests.\n" + have_asan=0 +fi +unset test_cmdline + printf "Reading libnotmuch version from source... " cat > _libversion.c < @@ -1538,6 +1550,9 @@ NOTMUCH_GMIME_X509_CERT_VALIDITY=${gmime_x509_cert_validity} # Whether GMime can verify signatures when decrypting with a session key: NOTMUCH_GMIME_VERIFY_WITH_SESSION_KEY=${gmime_verify_with_session_key} +# Does the C compiler support the address sanitizer +NOTMUCH_HAVE_ASAN=${have_asan} + # do we have man pages? NOTMUCH_HAVE_MAN=$((have_sphinx)) -- 2.34.1