From patchwork Tue Sep 14 08:35:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Blinov X-Patchwork-Id: 44979 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8B3E6385842B for ; Tue, 14 Sep 2021 08:36:27 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by sourceware.org (Postfix) with ESMTPS id B13C93858413 for ; Tue, 14 Sep 2021 08:36:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B13C93858413 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com Received: by mail-wr1-x42d.google.com with SMTP id m9so18893730wrb.1 for ; Tue, 14 Sep 2021 01:36:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=from:to:cc:subject:date:message-id; bh=TxY1NDy7/aZA5VIg1EkQggxTGMBXrUVSLdn8NG7dysY=; b=DpjkjNgy99awXfSmyGuqvjyw3hMynwiRRDAr7Nvc1QaD/h6oTp0th2f3D5tdlZqbSK ltXcbustlC7Hku/5hIfxGHvlT5CzDhVCYpHulM79O0QYWrw9psmxwbz1wQu9OCnham6H samlDZ2AmEo0AXmtUUuKnpvYHWBTYyMUuL3LjEk45B+OD259QHZqQbwYax/ZYMmKwqqu qxDgwP846/F3yR3vpVYoANPNm/vZzEi8SFmSI/klG+EZ6B9GFfQHAcWMx6u02u3Kt9Qb 8690A9tc7QmsRpW6SklIIRn9siZTlG5j+ufovM5ACNU4a5JkvGU8WT2liK7NgqrAKXA6 w/4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=TxY1NDy7/aZA5VIg1EkQggxTGMBXrUVSLdn8NG7dysY=; b=kq6alAwbkcQf/nQS/pZpzFHyDBiEqk0ktwN+IFMKljoR4FDgfFKSQfZz7XgZkmYAwf sXxE6CFYWh0LW1DgjjHLfKAODEf6qpitvfBMlSX/4tSERceqaNmjpyFpkNEWpZ7QNQGl IUQIBdq8+1mFJ7cKoUvT5lE83zL+UE8R7k4ULO/qiJ6s4plxBnDtu1NTsBIGha0GScMg rtYy2WRsi+/odEgIvw/9b0FoYT8O3HQgYFru2kRbsluasJmZ91zOXVtegqrj+VujwXF5 kDi5jo6D9PPwvboGFHaFwUtuNXbVYHZ1gdZ28HTtLtl/+jEGd0++1o4rjoQrLxbI1dfD LLsQ== X-Gm-Message-State: AOAM531J278HdgTSgBydepOwKp+dRCpDJm515IG5LtSOQxjWEjyRMUt4 lvUVGk6D+z52hlzZxGP1ozRsexQhfA3sKg== X-Google-Smtp-Source: ABdhPJyB2ER8ilTzuh8+n3wVhHfjH8quNDkFofJXA0VAkkoW9zMLq1mlwk3aTv1BbpKfI6mzWIvvyg== X-Received: by 2002:adf:f188:: with SMTP id h8mr17063392wro.269.1631608566672; Tue, 14 Sep 2021 01:36:06 -0700 (PDT) Received: from fujitsu.sou.embecosm-corp.com ([212.69.42.53]) by smtp.gmail.com with ESMTPSA id v8sm8109184wrt.12.2021.09.14.01.36.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Sep 2021 01:36:06 -0700 (PDT) From: Maxim Blinov To: gcc-patches@gcc.gnu.org Subject: [PATCH v2] analyzer: Define INCLUDE_UNIQUE_PTR Date: Tue, 14 Sep 2021 09:35:57 +0100 Message-Id: <20210914083557.15566-1-maxim.blinov@embecosm.com> X-Mailer: git-send-email 2.17.1 X-Spam-Status: No, score=-13.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Un-break the build for AArch64 Darwin, see PR bootstrap/102242. Build fails with log below: ``` In file included from ../../../gcc-master-wip-apple-si/gcc/analyzer/engine.cc:69: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:678: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/stdexcept:239:5: error: no member named 'fancy_abort' in namespace 'std::__1'; did you mean simply 'fancy_abort'? _VSTD::abort(); ^~~~~~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:852:15: note: expanded from macro '_VSTD' ../../../gcc-master-wip-apple-si/gcc/system.h:777:13: note: 'fancy_abort' declared here extern void fancy_abort (const char *, int, const char *) ^ ``` Judging from the following comment in gcc/system.h, we just need to define INCLUDE_UNIQUE_PTR since commit eafa9d96923 added the inclusion of : ``` /* Some of the headers included by can use "abort" within a namespace, e.g. "_VSTD::abort();", which fails after we use the preprocessor to redefine "abort" as "fancy_abort" below. Given that unique-ptr.h can use "free", we need to do this after "free" is declared but before "abort" is overridden. */ ``` gcc/analyzer/ChangeLog: * engine.cc: Define INCLUDE_UNIQUE_PTR. --- gcc/analyzer/engine.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/analyzer/engine.cc b/gcc/analyzer/engine.cc index 24f0931197d..f21f8e5b78a 100644 --- a/gcc/analyzer/engine.cc +++ b/gcc/analyzer/engine.cc @@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see . */ #include "config.h" +#define INCLUDE_UNIQUE_PTR #include "system.h" #include "coretypes.h" #include "tree.h"