Message ID | yddfs0mt0oc.fsf@CeBiTec.Uni-Bielefeld.DE |
---|---|
State | Unresolved |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp1193557vqy; Fri, 1 Dec 2023 07:14:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IFA4Ys9x7rjawpQnYt5jtRUNcuc3XW37Oyx3TLegZovswLwZ7fsAooIAVCoYHSqFpnoWwS9 X-Received: by 2002:a05:622a:13d0:b0:423:85a0:fb79 with SMTP id p16-20020a05622a13d000b0042385a0fb79mr31347814qtk.3.1701443695983; Fri, 01 Dec 2023 07:14:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701443695; cv=pass; d=google.com; s=arc-20160816; b=J+E1Db6RAbNGQTYMnAyA6u6Mr7urTdYqoVP9r/S62GS4yGJXQ+tVhb92yYUiXTVnzB pun1EpB1wUjo5u8DC+Iy4lmhQd0CXnM6Aj64JuFNZHn6EnWX0OZ5KOYiBCAD75rd/WH2 EP00dkBrJPjgFfYbGyRXxav0x4pTadvokuu+wRoUKYRKq32TPqKPfPMlGJvqoFqJQjVv vCFjAIhMioSaJzDbJQ1nab+TmL0JwbjIZq3pgs0QflTsOk+HN5OTorqr7YwNxLwDCeX1 qMa7K8MeKnr30psGRKQONuWx+boA+zhsRkuaQUENYnXMOEVRtYFtkNNbl87tia5J66XE x0dw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version:user-agent :message-id:date:subject:cc:to:from:dkim-signature:arc-filter :dmarc-filter:delivered-to; bh=SnhI9SIjqJBPHl0X8cTyi2hC/XMIJanBPjjiLGft6NQ=; fh=Z9gVjBDDZSLLd8/8PTdKuOxxuRvIRml3PNQKKogjSAQ=; b=rNEFnH3nMyM3iJXT8GVcCGpFI6p/XoNXowQH9I7sXaMIgD0lF7/SOyXJ4qwZEMFbOa 5vQWinWutJz3ucL+dcN/tRe0puqfc5QviNSu9xikRXz7IEGL1bJQnkqp21Ais719OZYJ wpMGgK1AiqL32lm7a5HfXVnaNHpkDSCIn6xlsiF4HdabxmuipY1pKMIUZEWqvYhbtRU7 pD2CD9aJJl24Gb3fFCUQsEWHEOSMBMfoRO6BDxuPesRygAqB4x1rAhKJEkIQbai2+xZD q+Jkx6+Zv+fIeDLjOgh1iGukoo9zfTWDdhc2PObBIPXcDNx2N71fPaDGM49c6uFPJhTM 4Ysw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@cebitec.uni-bielefeld.de header.s=20200306 header.b=jzr1cvab; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id ck8-20020a05622a230800b00423ed2be9ecsi3613544qtb.159.2023.12.01.07.14.55 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 07:14:55 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@cebitec.uni-bielefeld.de header.s=20200306 header.b=jzr1cvab; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B34F2385C420 for <ouuuleilei@gmail.com>; Fri, 1 Dec 2023 15:14:55 +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 58F913858415 for <gcc-patches@gcc.gnu.org>; Fri, 1 Dec 2023 15:14:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 58F913858415 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 58F913858415 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=1701443670; cv=none; b=sH60JAAmDuP2zTkfUEZCmfr77Nz+maNIlXQ2RK7FafEtSn4XBBmI8GwR2kva6RSYxHY9nimWDXIkJB+H84/pYnAVA7XC/Jrb4aEZp4QK4i+rN4ORy6wpLwT+gDPytMRw7/0ndUdAHhA0FMja31Je7xKdGTl/0imGIcvfrBpg9YE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701443670; c=relaxed/simple; bh=/0Yr8DZ1aKaPRgkivEvxdGcgwg5pvwjvNLTxGz9wGIE=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=iL+E3ipjC5V6ldw4YCpec6IlX01gipOUllJncWBKhbBibHNqymVFam3iSl0l/9H8ENeKMgZudxEHSgV9ka3uhQC8G2dJ+eR/sJ29kG9yC1PwWY5EV4PSqUzk3yt0P+SeBaeQkq7bGIUWth+j5fFyp6bnvtP7YQMr13zNcFtMiAw= 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 356C8C9700; Fri, 1 Dec 2023 16:14:28 +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=1701443667; bh=/0Yr8 DZ1aKaPRgkivEvxdGcgwg5pvwjvNLTxGz9wGIE=; b=jzr1cvabSXqXr55Zjs18j pcXvYrdBIvDIsa/IfVlFtcxsP1fOq0nywdp7+MQHeIHVzFaz7FARuAdm7zuKMcyn 34BkJXG/8hRHgMt9Patf/H5QIgepzY0DQZzQCoPUJOEa9I3TIhDKQx6WHCf53rFW wd+a5gSZa1C5Xv3+ohNbMmUaKDzIeEbKWXAS9NnUkg/09PqE7hTOj8t8/nU+taG5 ILPcGMsO88lhnzTg3TMVjZBqlhGWRcshJ92qvN7a8m+NnA56GvaRxqxmXQnW31nK LdTPlS8MRVnhqsuGFyPTwQKtpkxPHddxo2Gc006ZrjnN45FsTKYHytnDFbrvhrtC w== 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 IbSHGeNBtpJF; Fri, 1 Dec 2023 16:14:27 +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 91E9DC9396; Fri, 1 Dec 2023 16:14:27 +0100 (CET) From: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> To: gcc-patches@gcc.gnu.org Cc: Arnaud Charlet <charlet@adacore.com>, Marc =?utf-8?b?UG91bGhpw6hz?= <poulhies@adacore.com>, Iain Sandoe <iain@sandoe.co.uk> Subject: [PATCH] ada: Fix Ada bootstrap on macOS Date: Fri, 01 Dec 2023 16:14:27 +0100 Message-ID: <yddfs0mt0oc.fsf@CeBiTec.Uni-Bielefeld.DE> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1.90 (usg-unix-v) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" 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 <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784093024977809898 X-GMAIL-MSGID: 1784093024977809898 |
Series |
ada: Fix Ada bootstrap on macOS
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | warning | Git am fail log |
Commit Message
Rainer Orth
Dec. 1, 2023, 3:14 p.m. UTC
The recent warning changes broke Ada bootstrap on macOS: adaint.c: In function '__gnat_copy_attribs': adaint.c:3336:10: error: implicit declaration of function 'utimes'; did you mean 'utime'? [-Wimplicit-function-declaration] 3336 | if (utimes (to, tbuf) == -1) { | ^~~~~~ | utime adaint.c: In function '__gnat_kill': adaint.c:3597:3: error: implicit declaration of function 'kill' [-Wimplicit-function-declaration] 3597 | kill (pid, sig); | ^~~~ terminals.c: In function 'allocate_pty_desc': terminals.c:1196:12: error: implicit declaration of function 'openpty'; did you mean 'openat'? [-Wimplicit-function-declaration] 1196 | status = openpty (&master_fd, &slave_fd, NULL, NULL, NULL); | ^~~~~~~ | openat terminals.c: In function '__gnat_setup_winsize': terminals.c:1392:6: error: implicit declaration of function 'kill' [-Wimplicit-function-declaration] 1392 | kill (desc->child_pid, SIGWINCH); | ^~~~ This patch fixes this by including the necessary headers: <sys/time.h> for utimes, <signal.h> for kill, and <util.h> for openpty. With those changes, the build completed on x86_64-apple-darwin2[0-3] (make check still running). Ok for trunk? Rainer
Comments
> On 1 Dec 2023, at 15:14, Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> wrote: > > The recent warning changes broke Ada bootstrap on macOS: > > adaint.c: In function '__gnat_copy_attribs': > adaint.c:3336:10: error: implicit declaration of function 'utimes'; did you mean 'utime'? [-Wimplicit-function-declaration] > 3336 | if (utimes (to, tbuf) == -1) { > | ^~~~~~ > | utime > adaint.c: In function '__gnat_kill': > adaint.c:3597:3: error: implicit declaration of function 'kill' [-Wimplicit-function-declaration] > 3597 | kill (pid, sig); > | ^~~~ > terminals.c: In function 'allocate_pty_desc': > terminals.c:1196:12: error: implicit declaration of function 'openpty'; did you mean 'openat'? [-Wimplicit-function-declaration] > 1196 | status = openpty (&master_fd, &slave_fd, NULL, NULL, NULL); > | ^~~~~~~ > | openat > terminals.c: In function '__gnat_setup_winsize': > terminals.c:1392:6: error: implicit declaration of function 'kill' [-Wimplicit-function-declaration] > 1392 | kill (desc->child_pid, SIGWINCH); > | ^~~~ > > This patch fixes this by including the necessary headers: <sys/time.h> > for utimes, <signal.h> for kill, and <util.h> for openpty. With those > changes, the build completed on x86_64-apple-darwin2[0-3] (make check > still running). > > Ok for trunk? OK from the Darwin side. Iain > > Rainer > > -- > ----------------------------------------------------------------------------- > Rainer Orth, Center for Biotechnology, Bielefeld University > > > 2023-12-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> > > gcc/ada: > * adaint.c [__APPLE__]: Include <signal.h>, <sys/time.h>. > * terminals.c [!_WIN32]: Include <signal.h>. > [__APPLE__]: Include <util.h>. > Fix typos. > > diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c > --- a/gcc/ada/adaint.c > +++ b/gcc/ada/adaint.c > @@ -85,6 +85,8 @@ > > #if defined (__APPLE__) > #include <unistd.h> > +#include <signal.h> > +#include <sys/time.h> > #include <TargetConditionals.h> > #endif > > diff --git a/gcc/ada/terminals.c b/gcc/ada/terminals.c > --- a/gcc/ada/terminals.c > +++ b/gcc/ada/terminals.c > @@ -31,7 +31,7 @@ > > #define ATTRIBUTE_UNUSED __attribute__((unused)) > > -/* First all usupported platforms. Add stubs for exported routines. */ > +/* First all unsupported platforms. Add stubs for exported routines. */ > > #if defined (VMS) || defined (__vxworks) || defined (__Lynx__) \ > || defined (__ANDROID__) || defined (__PikeOS__) || defined(__DJGPP__) > @@ -1089,7 +1089,7 @@ void > { > } > > -#else /* defined(_WIN32, implementatin for all UNIXes */ > +#else /* defined(_WIN32, implementation for all UNIXes */ > > /* First defined some macro to identify easily some systems */ > #if defined (__FreeBSD__) \ > @@ -1104,6 +1104,7 @@ void > #include <errno.h> > #include <stdio.h> > #include <stdlib.h> > +#include <signal.h> > #include <sys/ioctl.h> > #include <termios.h> > #include <fcntl.h> > @@ -1121,6 +1122,9 @@ void > #if defined (__hpux__) > # include <sys/stropts.h> > #endif > +#if defined (__APPLE__) > +# include <util.h> > +#endif > > #define CDISABLE _POSIX_VDISABLE >
Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes: > The recent warning changes broke Ada bootstrap on macOS: > > adaint.c: In function '__gnat_copy_attribs': > adaint.c:3336:10: error: implicit declaration of function 'utimes'; did you mean 'utime'? [-Wimplicit-function-declaration] > 3336 | if (utimes (to, tbuf) == -1) { > | ^~~~~~ > | utime > adaint.c: In function '__gnat_kill': > adaint.c:3597:3: error: implicit declaration of function 'kill' [-Wimplicit-function-declaration] > 3597 | kill (pid, sig); > | ^~~~ > terminals.c: In function 'allocate_pty_desc': > terminals.c:1196:12: error: implicit declaration of function 'openpty'; did you mean 'openat'? [-Wimplicit-function-declaration] > 1196 | status = openpty (&master_fd, &slave_fd, NULL, NULL, NULL); > | ^~~~~~~ > | openat > terminals.c: In function '__gnat_setup_winsize': > terminals.c:1392:6: error: implicit declaration of function 'kill' [-Wimplicit-function-declaration] > 1392 | kill (desc->child_pid, SIGWINCH); > | ^~~~ > > This patch fixes this by including the necessary headers: <sys/time.h> > for utimes, <signal.h> for kill, and <util.h> for openpty. With those > changes, the build completed on x86_64-apple-darwin2[0-3] (make check > still running). > > Ok for trunk? Ok! Thanks, Marc
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c --- a/gcc/ada/adaint.c +++ b/gcc/ada/adaint.c @@ -85,6 +85,8 @@ #if defined (__APPLE__) #include <unistd.h> +#include <signal.h> +#include <sys/time.h> #include <TargetConditionals.h> #endif diff --git a/gcc/ada/terminals.c b/gcc/ada/terminals.c --- a/gcc/ada/terminals.c +++ b/gcc/ada/terminals.c @@ -31,7 +31,7 @@ #define ATTRIBUTE_UNUSED __attribute__((unused)) -/* First all usupported platforms. Add stubs for exported routines. */ +/* First all unsupported platforms. Add stubs for exported routines. */ #if defined (VMS) || defined (__vxworks) || defined (__Lynx__) \ || defined (__ANDROID__) || defined (__PikeOS__) || defined(__DJGPP__) @@ -1089,7 +1089,7 @@ void { } -#else /* defined(_WIN32, implementatin for all UNIXes */ +#else /* defined(_WIN32, implementation for all UNIXes */ /* First defined some macro to identify easily some systems */ #if defined (__FreeBSD__) \ @@ -1104,6 +1104,7 @@ void #include <errno.h> #include <stdio.h> #include <stdlib.h> +#include <signal.h> #include <sys/ioctl.h> #include <termios.h> #include <fcntl.h> @@ -1121,6 +1122,9 @@ void #if defined (__hpux__) # include <sys/stropts.h> #endif +#if defined (__APPLE__) +# include <util.h> +#endif #define CDISABLE _POSIX_VDISABLE