From patchwork Sun Oct 1 01:12:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 820226 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-463277-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="M9rtIQcW"; 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 3y4S322P0Cz9t2r for ; Sun, 1 Oct 2017 12:13:02 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:mime-version:content-type; q=dns; s=default; b=EdCblt/UjUNGxA9qvMoOoP2hmYtzLzFJmwbsVUXQxrvjJqCOnO q1pIko7N1nEGMosVqi0NzwS9a0Km6khl4RwamW9DaU0n99sfpZLAsVs2iOrMg47G 6eMdNIok4NVhcVCHMB0DsC1+uJLYhMsSc4GBykBtuAnXvTU0xV4PzHU0Y= 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:date :from:to:cc:subject:message-id:mime-version:content-type; s= default; bh=hmmlNfvJJVwrd4RkAy4brIKuSZA=; b=M9rtIQcWkp6jNMFvXq20 4pAJhLb9QDAb+olLfX23oXfmHo0LkV0fBBfSmO9Unq9YAzzM4poRj+FtdOispzGj DyiHPDulBGxC+dLlf2KyrV3neeWVqgtezsIyJRfoR7Y2lkD+v1ZrYdxiQ2J4j+BR 5410LSWAt20XKULNAV6U6Tg= Received: (qmail 94923 invoked by alias); 1 Oct 2017 01:12:52 -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 94503 invoked by uid 89); 1 Oct 2017 01:12:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.4 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1107 X-HELO: mail-oi0-f65.google.com Received: from mail-oi0-f65.google.com (HELO mail-oi0-f65.google.com) (209.85.218.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 01 Oct 2017 01:12:50 +0000 Received: by mail-oi0-f65.google.com with SMTP id p126so4465411oih.9 for ; Sat, 30 Sep 2017 18:12:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=J5r0UHgKUT9ZdJIA7iyhBh6xC5/eSgT0eCd+Cb2kBSM=; b=Na29m/KD+Dzpbeu7Ba9vOGxVkCCrFj8M347rWe/GVgL0ROA0BYrGuUOIZB9fv/ZKDE eTRHm2H1xM251IUhgM1cVfAQlUU7EM8/tYcCpYCBLEm6AdWK4+HoOitnugmkUTnRGGlu 48Z+vWemr5OtEGJAVEkOuADSIaP/+V9tm3NIJYE9B2jinKeYgArKJwHdJ+skxZr1su0f 9CiDEwsZfp8XoDugwXm3jO3PUhe3TCq73ou+q9v3wtp7jZBgKwaNia4CxfO9Stxvom23 eB/bL8z539ipA/Ti7nyXyXJcAnahiLyGXD8d1nu7bG6TPmVCOBY4WDL4M05PPLGUG2rZ 1VEQ== X-Gm-Message-State: AMCzsaXHSvCpbhHLFhr2e1kiHVaJhnFPIEiZkChWcRb0zkZB7ukouNq4 WhrWW2tt1TPENu0yh5J3ClkNf77p X-Google-Smtp-Source: AOwi7QDWcaQ5Nt6Hx9/hMqxLtEHGd4OzzaiD7z2e7XtTtGawMaO9Bs6Vc8uq2IWI/lsGqfnixgJPmQ== X-Received: by 10.202.8.79 with SMTP id 76mr4139556oii.199.1506820368651; Sat, 30 Sep 2017 18:12:48 -0700 (PDT) Received: from gnu-efi-2.localdomain ([172.56.7.192]) by smtp.gmail.com with ESMTPSA id o12sm3775978oti.47.2017.09.30.18.12.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 30 Sep 2017 18:12:48 -0700 (PDT) Received: by gnu-efi-2.localdomain (Postfix, from userid 1000) id 6F49B1C2CD4; Sat, 30 Sep 2017 18:12:39 -0700 (PDT) Date: Sat, 30 Sep 2017 18:12:39 -0700 From: "H.J. Lu" To: gcc-patches@gcc.gnu.org, Maxim Ostapenko Cc: Jakub Jelinek Subject: [PATCH] Add anitizer_linux_x86_64.lo if __x86_64__ is defined by $CC Message-ID: <20171001011239.GA13105@gmail.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.0 (2017-09-02) X-IsSubscribed: yes Since size of "void *" is 4 bytes for x32, check if __x86_64__ is defined by $CC, instead of if test x$ac_cv_sizeof_void_p = x8; then to decide wether anitizer_linux_x86_64.lo should be used. I am testing this on i686 and x86-64. OK for trunk and GCC 7 branch if there are no regression? Please upstream it for me if appropriate. Thanks. H.J. --- PR sanitizer/82379 * configure.tgt (ANITIZER_COMMON_TARGET_DEPENDENT_OBJECTS): Set to anitizer_linux_x86_64.lo if __x86_64__ is defined by $CC. --- libsanitizer/configure.tgt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libsanitizer/configure.tgt b/libsanitizer/configure.tgt index 82e8a5513c5..573e3b482e9 100644 --- a/libsanitizer/configure.tgt +++ b/libsanitizer/configure.tgt @@ -27,6 +27,8 @@ case "${target}" in TSAN_SUPPORTED=yes LSAN_SUPPORTED=yes TSAN_TARGET_DEPENDENT_OBJECTS=tsan_rtl_amd64.lo + fi + if echo "int x = __x86_64__;" | $CC -c -x c -o /dev/null - > /dev/null 2>&1; then SANITIZER_COMMON_TARGET_DEPENDENT_OBJECTS=sanitizer_linux_x86_64.lo fi ;;