From patchwork Fri Jun 7 14:27:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Martin X-Patchwork-Id: 1945132 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=nasilyan.com header.i=@nasilyan.com header.a=rsa-sha256 header.s=xce2voaxvxhmx73p47whqmbxwwvd7qkl header.b=qnkIve+E; dkim=pass (1024-bit key; unprotected) header.d=amazonses.com header.i=@amazonses.com header.a=rsa-sha256 header.s=uku4taia5b5tsbglxyj6zym32efj7xqv header.b=QD/WwWYD; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vwk9b5nDnz20Q5 for ; Sat, 8 Jun 2024 00:29:38 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0ADE1393D2F8 for ; Fri, 7 Jun 2024 14:28:23 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from a5-159.smtp-out.eu-west-1.amazonses.com (a5-159.smtp-out.eu-west-1.amazonses.com [54.240.5.159]) by sourceware.org (Postfix) with ESMTPS id 6A2CF39317E4 for ; Fri, 7 Jun 2024 14:27:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6A2CF39317E4 Authentication-Results: sourceware.org; dmarc=fail (p=quarantine dis=none) header.from=nasilyan.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=eu-west-1.amazonses.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 6A2CF39317E4 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=54.240.5.159 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1717770483; cv=none; b=Np65/CI2Ily5niU+gls3tZ/Y26J/dbYq2ekF77syCQOoF7HJ4ES6e2iVdQn+Fz21bW4d1mt9WEt2L/2I/RSA5ITJbIwCQjveJcrmIg1rPHso4bxYbSzr4FVNbsdI/N1wA3/Eex/5283bjhPx28GCdU7gjl8xb1gLPsPZyIZzaIU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1717770483; c=relaxed/simple; bh=4WFF2VDz8LAT6czbMI6CgvycBMQGN8LuR9GiR1WUUlw=; h=DKIM-Signature:DKIM-Signature:Subject:From:To:Date:Mime-Version: Message-ID; b=NevmXIBdrte5gymvrJ0JpNa8X1dgGHxiUxxb/L0tME0/hEPIiZ6/IBqLRwu4dDrriZF1LenOWECpOBp5eIQKhTha3fK5D9m5oNKc4um7viRQttcFIi4SiVkPLGn+PWEaC7ld6Q76fZ6YTYwljXUCAt6SpB5MJmDE2g2Tv8upPbw= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=xce2voaxvxhmx73p47whqmbxwwvd7qkl; d=nasilyan.com; t=1717770469; h=Subject:From:To:Cc:Date:Mime-Version:Content-Type:Content-Transfer-Encoding:References:Message-Id; bh=4WFF2VDz8LAT6czbMI6CgvycBMQGN8LuR9GiR1WUUlw=; b=qnkIve+ETTvC/E3J/2u7Mvc3tLWMn/9p9C4M9hJXMXy9rAWXfEOv0n9cyP3FYNQf piM55vVeZWY3uo7vK+5PXyy5fIiVf/msZruNokW+ZSOUVT93G55aX4WAM5w4Ik7HZaH vI8/Z68yq7fZo0xN3kvxj2uTqoI1FdqBMerxX9bI= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=uku4taia5b5tsbglxyj6zym32efj7xqv; d=amazonses.com; t=1717770469; h=Subject:From:To:Cc:Date:Mime-Version:Content-Type:Content-Transfer-Encoding:References:Message-Id:Feedback-ID; bh=4WFF2VDz8LAT6czbMI6CgvycBMQGN8LuR9GiR1WUUlw=; b=QD/WwWYDnULcMKYQqV/i1Ujta1s4TwkmQ8imXFSZMc7+ScQM52BLxznK3ChLgRhV Va0V69MpPoew1QcFiW0//NZVtu+4n/hPI8q/v8ziT8z+dL7rYaY+zEqdg2pvMDHzB2t TEJtWl07vFzmcKaKuCo2UhR37bVibC3K+LphHbi8= Subject: [PATCH] lto: Fix build on MacOS From: =?utf-8?q?Simon_Martin?= To: =?utf-8?q?gcc-patches=40gcc=2Egnu=2Eorg?= Cc: =?utf-8?q?mjires=40suse=2Ecz?= Date: Fri, 7 Jun 2024 14:27:49 +0000 Mime-Version: 1.0 References: <20240607142746.9950-1-simon@nasilyan.com> X-Mailer: Amazon WorkMail Thread-Index: AQHauObeTVhKSpmBQQmm9GQUGxv+3A== Thread-Topic: [PATCH] lto: Fix build on MacOS X-Original-Mailer: git-send-email 2.44.0 X-Wm-Sent-Timestamp: 1717770468 Message-ID: <0102018ff3193f2b-c2986265-c170-40b0-b2fd-f9adc3e0be73-000000@eu-west-1.amazonses.com> Feedback-ID: ::1.eu-west-1.b24dn6frgCi6dh20skzbuMRr7UL8M6Soir/3ogtEjHQ=:AmazonSES X-SES-Outgoing: 2024.06.07-54.240.5.159 X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org The build fails on x86_64-apple-darwin19.6.0 starting with 5b6d5a886ee because vector is included after system.h and runs into poisoned identifiers. This patch fixes this by defining INCLUDE_VECTOR before including system.h. Validated by doing a full build on x86_64-apple-darwin19.6.0. gcc/lto/ChangeLog: * lto-partition.cc: Define INCLUDE_VECTOR to avoid running into poisoned identifiers. --- gcc/lto/lto-partition.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/lto/lto-partition.cc b/gcc/lto/lto-partition.cc index 44b457d0b2a..2238650fa0e 100644 --- a/gcc/lto/lto-partition.cc +++ b/gcc/lto/lto-partition.cc @@ -18,6 +18,7 @@ along with GCC; see the file COPYING3. If not see . */ #include "config.h" +#define INCLUDE_VECTOR #include "system.h" #include "coretypes.h" #include "target.h" @@ -38,7 +39,6 @@ along with GCC; see the file COPYING3. If not see #include "lto-partition.h" #include -#include vec ltrans_partitions;