From patchwork Mon Dec 4 10:33:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 81272 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 DEA1C3857C62 for ; Mon, 4 Dec 2023 10:33:43 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp.CeBiTec.Uni-Bielefeld.DE (smtp.CeBiTec.Uni-Bielefeld.DE [129.70.160.84]) by sourceware.org (Postfix) with ESMTPS id 1A1093858C5E for ; Mon, 4 Dec 2023 10:33:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1A1093858C5E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=CeBiTec.Uni-Bielefeld.DE Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cebitec.uni-bielefeld.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1A1093858C5E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=129.70.160.84 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701686009; cv=none; b=OB3HEDBJohNBaqHSkgffzN0Av7nJ60Ix3+8DKgPZGtKbwe42v/HStqScZ+4wnzLyMZAQc2TdQhdNsTOQ2HMeIUxYl0TzNniw7Nz+TgizNrk7l06qzfDcRI0Xo83Md/ziPXBwE5X6k3hrVt593rdC53Qfg1hk/9QnY9TRMXNGH30= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701686009; c=relaxed/simple; bh=1hg6SW1h/VykDc/0+IHJlDH4N4I2YfL8CB5TP406Wgk=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=wPLaC9W+b/i4sk3f2dWeLrLCm0TCpNSO1QbVLCiwg6tn8D6kRKItQceOkFbDvcUXwSYNmD1BNo3LL9pv0Ww7+ZHA62Y1tFmmL/WpU//vfX6chZiVdFISTPAtXnk16ZI9MYIKwWliGxQ2uU8KbUBrLUJzwRNn8N6a8EUtJ4DfmWw= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from localhost (localhost [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 2036B6013F; Mon, 4 Dec 2023 11:33:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= cebitec.uni-bielefeld.de; h=content-type:content-type :mime-version:user-agent:message-id:date:date:subject:subject :from:from:received:received; s=20200306; t=1701686006; bh=1hg6S W1h/VykDc/0+IHJlDH4N4I2YfL8CB5TP406Wgk=; b=fgwibU7ICHPhu3m2oMOi0 NywnXxJlbOS2SbJsqVH2Fyv3d9JLJjhEFGOeHkxmXAXszI1XG/LfpNxtcioqg9Qa ScYUHJkUb1a970eHPVFDuczwAOfF/LIG0MQ6n5hYaAs/XE4KKpEw3EUotFZ+JViy nprs406pgvdQIIonoILHTQa6b7X9XQVYApKnzl7yXQH/SIlIIp8KTxdSaqiOB8jG laWx/DiT5WSiz0ZHXQ324ThUksKHE+RNewU98irCwObGDKHWUktsReBpzp3WAz9p E5ddfZrSC5mRwj04sKakGTam+jRABVQjQxmZFOutPjsh5heh8Tz4hwI/iiGuOApZ g== X-Virus-Scanned: amavisd-new at cebitec.uni-bielefeld.de Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (smtp.cebitec.uni-bielefeld.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id GyF9VS4H-1EW; Mon, 4 Dec 2023 11:33:26 +0100 (CET) Received: from manam.CeBiTec.Uni-Bielefeld.DE (p4fddb508.dip0.t-ipconnect.de [79.221.181.8]) (Authenticated sender: ro) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPSA id B269ACF963; Mon, 4 Dec 2023 11:33:26 +0100 (CET) From: Rainer Orth To: gcc-patches@gcc.gnu.org Cc: Arnaud Charlet , Marc =?utf-8?b?UG91bGhpw6hz?= Subject: [PATCH] ada: Fix Ada bootstrap on Solaris Date: Mon, 04 Dec 2023 11:33:26 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1.90 (usg-unix-v) MIME-Version: 1.0 X-Spam-Status: No, score=-3791.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, 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+patchwork=sourceware.org@gcc.gnu.org The recent warning patches broke Ada bootstrap on Solaris: adaint.c: In function '__gnat_kill': adaint.c:3597:3: error: implicit declaration of function 'kill' [-Wimplicit-function-declaration] 3597 | kill (pid, sig); | ^~~~ expect.c: In function '__gnat_expect_poll': expect.c:409:5: error: implicit declaration of function 'memset' [-Wimplicit-function-declaration] 409 | FD_ZERO (&rset); | ^~~~~~~ expect.c:55:1: note: include '' or provide a declaration of 'memset' 54 | #include +++ |+#include 55 | #endif I'm now including the necessary headers: for kill and for memset. However, I found the GNAT C sources to be an incredible and hard to untangle maze: instead of using autoconf, they are generously sprinkled with deeply nested platform macros, so I may well have included the headers in an inappropriate place. Bootstrapped without regressions on i386-pc-solaris2.11, sparc-sun-solaris2.11, x86_64-pc-linux-gnu, and x86_64-apple-darwin23.1.0. Ok for trunk? Rainer # HG changeset patch # Parent 5cf4f08be31b5169b377de570ac0ab0f159161af ada: Fix Ada bootstrap on Solaris diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c --- a/gcc/ada/adaint.c +++ b/gcc/ada/adaint.c @@ -243,6 +243,7 @@ UINT __gnat_current_ccs_encoding; #define DIR_SEPARATOR '\\' #else +#include #include #endif diff --git a/gcc/ada/expect.c b/gcc/ada/expect.c --- a/gcc/ada/expect.c +++ b/gcc/ada/expect.c @@ -41,6 +41,7 @@ #include "adaint.h" #include +#include #if defined (__vxworks) && defined (__RTP__) # include