From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 127541 invoked by alias); 8 Jan 2019 13:28:44 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 127520 invoked by uid 89); 8 Jan 2019 13:28:43 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_PASS,UNSUBSCRIBE_BODY autolearn=ham version=3.3.2 spammy=Processing, multi, 3.1, 2018-2019 X-HELO: dedi548.your-server.de Received: from dedi548.your-server.de (HELO dedi548.your-server.de) (85.10.215.148) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 08 Jan 2019 13:28:40 +0000 Received: from [78.46.172.3] (helo=sslproxy06.your-server.de) by dedi548.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1ggrQr-0004og-C4 for gcc-patches@gcc.gnu.org; Tue, 08 Jan 2019 14:28:37 +0100 Received: from [82.135.62.35] (helo=mail.embedded-brains.de) by sslproxy06.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1ggrQr-000Uks-6e for gcc-patches@gcc.gnu.org; Tue, 08 Jan 2019 14:28:37 +0100 Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 146332A165C for ; Tue, 8 Jan 2019 14:29:08 +0100 (CET) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id bAwBcTPB8D4g for ; Tue, 8 Jan 2019 14:29:07 +0100 (CET) Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id A8FF82A167E for ; Tue, 8 Jan 2019 14:29:07 +0100 (CET) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id BUjA-xq-yZgh for ; Tue, 8 Jan 2019 14:29:07 +0100 (CET) Received: from linux-diu0.suse (unknown [192.168.96.161]) by mail.embedded-brains.de (Postfix) with ESMTP id 88EDD2A0043 for ; Tue, 8 Jan 2019 14:29:07 +0100 (CET) From: Sebastian Huber To: gcc-patches@gcc.gnu.org Subject: [PATCH 1/2] libgomp: Avoid complex dependencies for RTEMS Date: Tue, 08 Jan 2019 13:28:00 -0000 Message-Id: <20190108132835.15505-1-sebastian.huber@embedded-brains.de> X-IsSubscribed: yes X-SW-Source: 2019-01/txt/msg00395.txt.bz2 libgomp/ * config/rtems/affinity-fmt.c: New file. Include affinity-fmt.c, undefining HAVE_GETPID and HAVE_GETHOSTNAME, and mapping fwrite to write. --- libgomp/config/rtems/affinity-fmt.c | 49 +++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 libgomp/config/rtems/affinity-fmt.c diff --git a/libgomp/config/rtems/affinity-fmt.c b/libgomp/config/rtems/affinity-fmt.c new file mode 100644 index 00000000000..e4e14c163e9 --- /dev/null +++ b/libgomp/config/rtems/affinity-fmt.c @@ -0,0 +1,49 @@ +/* Copyright (C) 2018-2019 Free Software Foundation, Inc. + + This file is part of the GNU Offloading and Multi Processing Library + (libgomp). + + Libgomp is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + Under Section 7 of GPL version 3, you are granted additional + permissions described in the GCC Runtime Library Exception, version + 3.1, as published by the Free Software Foundation. + + You should have received a copy of the GNU General Public License and + a copy of the GCC Runtime Library Exception along with this program; + see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + . */ + +#include "libgomp.h" +#include +#include +#include +#ifdef HAVE_UNISTD_H +#include +#endif +#ifdef HAVE_INTTYPES_H +# include /* For PRIx64. */ +#endif +#ifdef HAVE_UNAME +#include +#endif + +/* The HAVE_GETPID and HAVE_GETHOSTNAME configure tests are passing for RTEMS, + but the extra information they give are of little value for the user. + Override the configure test results here. */ +#undef HAVE_GETPID +#undef HAVE_GETHOSTNAME + +/* Avoid the complex fwrite() in favour of the simple write(). */ +#undef fwrite +#define fwrite(ptr, size, nmemb, stream) write (1, (ptr), (nmemb) * (size)) + +#include "../../affinity-fmt.c" -- 2.16.4