Message ID | Y/zI+Vt0kL68AFHm@guest.guest |
---|---|
State | Accepted |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2475006wrd; Mon, 27 Feb 2023 07:15:53 -0800 (PST) X-Google-Smtp-Source: AK7set8nY3QZPncn5Qy8dlt1VZYYZ0zuz5xQh9oPwAESqrTCvR4G8uQQQY2bkJbmf/wmiAsbRq+g X-Received: by 2002:a17:906:6403:b0:8f8:1501:be60 with SMTP id d3-20020a170906640300b008f81501be60mr9407802ejm.7.1677510953748; Mon, 27 Feb 2023 07:15:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677510953; cv=none; d=google.com; s=arc-20160816; b=G4gBskPT/UBzYagymb1KbKGsxHhTLb1UnFMPuNlA3m60bqm88Sc4mbb8Yk18o6ySqh 62vYhClkxR9goV1BIBTU6iRFT9vz0CzORbJiTFI0J87GpFHwL1UsS+qTQdDcbhOiTIJV lx50yqYfG96j9cxmpYv8fbFIOPfsKsqyGLvgz+cedZjS6AUId31X371hFrSweXX4UmRM 2RgD5RHV/MxSXugB697ovEBxXhOfZOxkt8IA3DM1h6jPMnkJsJtr6s8ZghwYSAesbMXq s7DTI57hsLgn21hzY9zQO42SpJMuxJISUIwDXzpa8HLjHTcKbiWU2/MeWSetQ5z9go6j gbDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-disposition:mime-version:message-id:subject:cc:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=tz/mJCuLvhEXYM5+7ubydNDFIqNacsYkKqRLCssDunM=; b=irfI4nOAg1NVGqhNoyTjFZqZur2JiI2sS+0HUezBwLdZJ7pecZLY9ozucDZSDDKHRd 61MMPuhK0wt0hUFdHdAnGt3wviwmj0brNtsKGIujT5rnLF2Bz3Ix99wJIybF0tuv3PKj fHtWK5BwQT2jIJYfqTddHrMlEgKVkKejV+pYj3sdbvV8nCHC49Be/Pn2us7rEGCnFVrT KF3QMgI2OKCK8TIReAc+Tlnj1DGhXEhSiIHwQIrKLgzKqrUE9tAHEC+0tDM7PqtDxv1K HV75Z8LAAftKWFDe0J602rtvOeZF03C+wWoIG7Jt6EuGeW4KebGwKbUtOgH1WqP50kpr pS4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=hXkIjn2u; 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"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id qn11-20020a170907210b00b008d8313a36b4si8071842ejb.315.2023.02.27.07.15.53 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Feb 2023 07:15:53 -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=@gcc.gnu.org header.s=default header.b=hXkIjn2u; 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"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 845773858C78 for <ouuuleilei@gmail.com>; Mon, 27 Feb 2023 15:15:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 845773858C78 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677510952; bh=tz/mJCuLvhEXYM5+7ubydNDFIqNacsYkKqRLCssDunM=; h=Date:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=hXkIjn2usH5xsNmvE9HOp+Wp42XRTXlfKUwEAy1Nu0/4M958i47cv3E8BLm7fUSLj r7tZ54n3kojimrVp5QnppW9aZsawvf3mO542ejKkvN97X8YSsF6FgVoyCwbD44peFu wPlriKfNeacx4WRorfnc3fv20p1e2tf4GEOUtpi4= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-qt1-x82a.google.com (mail-qt1-x82a.google.com [IPv6:2607:f8b0:4864:20::82a]) by sourceware.org (Postfix) with ESMTPS id B5B843858D39 for <gcc-patches@gcc.gnu.org>; Mon, 27 Feb 2023 15:15:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B5B843858D39 Received: by mail-qt1-x82a.google.com with SMTP id c19so6896504qtn.13 for <gcc-patches@gcc.gnu.org>; Mon, 27 Feb 2023 07:15:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=tz/mJCuLvhEXYM5+7ubydNDFIqNacsYkKqRLCssDunM=; b=oNJ7/66J6FLsdo+9oXdCL0Guz+h94d4wUY7j8W9ZTDAwpUyfaGPRXB/5XtWwTsACxp AsHc/YjP8loL1h7sJQSwmZu13YyU9JpgV5DRYdBqmFhQYMOnp86SpBOoG/iHwmIHdn7K 3SD9jPwHKru+XcKfJXN1vPBHkn03los9o1RuBigmq8pxy4i/naH5atbZuktFc8jpSgnP jR6mN+bgC5D4/9Z5NVcx4q0w47qjTiJA+S7StmErLMDxYjr80+hXzOkn/ceD1F/GIZvE sf1+HwgzV+SsVcuY4U1driKzAFxaRN9/corpF5IfUffMBuNxGtZMN7Oid6hsipDKfTIi yCOw== X-Gm-Message-State: AO0yUKXKsvReeqN8MhkLMUCSwSvVNZFlkw0Zt/Gqc/LQHzhnmjhehhlz wwq5QVuirpUqRuR0tscMdGHtAwoFxbw= X-Received: by 2002:a05:622a:f:b0:3b9:b619:42c1 with SMTP id x15-20020a05622a000f00b003b9b61942c1mr25756692qtw.27.1677510906880; Mon, 27 Feb 2023 07:15:06 -0800 (PST) Received: from guest.guest ([2001:19f0:5:4a87:5400:3ff:feba:e632]) by smtp.gmail.com with ESMTPSA id v22-20020a05622a131600b003b8558eabd0sm4862693qtk.23.2023.02.27.07.15.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Feb 2023 07:15:06 -0800 (PST) Date: Mon, 27 Feb 2023 23:15:05 +0800 To: gcc-patches@gcc.gnu.org Cc: Arnaud Charlet <charlet@adacore.com>, Eric Botcazou <ebotcazou@adacore.com>, Marc =?utf-8?b?UG91bGhpw6hz?= <poulhies@adacore.com> Subject: [ada] fix unknown type name 'cpu_set_t' Message-ID: <Y/zI+Vt0kL68AFHm@guest.guest> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP 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.29 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> From: =?utf-8?b?5a6L5Yas55SfIHZpYSBHY2MtcGF0Y2hlcw==?= <gcc-patches@gcc.gnu.org> Reply-To: =?utf-8?b?5a6L5Yas55Sf?= <dongsheng.song@gmail.com> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758997725806139858?= X-GMAIL-MSGID: =?utf-8?q?1758997725806139858?= |
Series |
[ada] fix unknown type name 'cpu_set_t'
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
宋冬生
Feb. 27, 2023, 3:15 p.m. UTC
Hi, When building ada with musl, I encountered the following error: ---------------- make[7]: Entering directory '/opt/gcc-build/gcc/build/gcc/ada/rts' /opt/gcc-build/gcc/build/./gcc/xgcc -B/opt/gcc-build/gcc/build/./gcc/ -B/opt/gcc-13/aarch64-linux-musl/usr/aarch64-linux-musl/bin/ -B/opt/gcc-13/aarch64-linux-musl/usr/aarch64-linux-musl/lib/ -isystem /opt/gcc-13/aarch64-linux-musl/usr/aarch64-linux-musl/include -isystem /opt/gcc-13/aarch64-linux-musl/usr/aarch64-linux-musl/sys-include --sysroot=/opt/gcc-13/aarch64-linux-musl/usr/aarch64-linux-musl/sys-root -c -DCROSS_DIRECTORY_STRUCTURE -DIN_GCC -W -Wall -g -O2 -g -O2 -fexceptions -DIN_RTS -DHAVE_GETIPINFO -fPIC -fno-lto \ -iquote . -iquote .. -iquote ../.. -iquote /opt/gcc-build/gcc/gcc/ada -iquote /opt/gcc-build/gcc/gcc -I/opt/gcc-build/gcc/include -I./../.. adadecode.c -o adadecode.o In file included from adadecode.c:37: adaint.h:324:8: error: unknown type name 'cpu_set_t' 324 | extern cpu_set_t *__gnat_cpu_alloc (size_t); | ^~~~~~~~~ ---------------- It can be seen from the man pages[1] that this error is caused by not defining `_GNU_SOURCE`, so I recommend the following fix: [1] https://man7.org/linux/man-pages/man3/CPU_SET.3.html Please help commit if appropriate.
Comments
On Feb 27 2023, 宋冬生 via Gcc-patches wrote: > diff --git a/gcc/ada/adaint.h b/gcc/ada/adaint.h > index 987432c93..fa8ddaf13 100644 > --- a/gcc/ada/adaint.h > +++ b/gcc/ada/adaint.h > @@ -319,6 +319,9 @@ extern void *__gnat_lwp_self (void); > > /* Routines for interface to required CPU set primitives */ > > +#ifndef _GNU_SOURCE > +#define _GNU_SOURCE > +#endif > #include <sched.h> > > extern cpu_set_t *__gnat_cpu_alloc (size_t); Feature test macros must always be defined before any system header is included.
diff --git a/gcc/ada/adaint.h b/gcc/ada/adaint.h index 987432c93..fa8ddaf13 100644 --- a/gcc/ada/adaint.h +++ b/gcc/ada/adaint.h @@ -319,6 +319,9 @@ extern void *__gnat_lwp_self (void); /* Routines for interface to required CPU set primitives */ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif #include <sched.h> extern cpu_set_t *__gnat_cpu_alloc (size_t);