From patchwork Tue Jan 8 13:28:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Huber X-Patchwork-Id: 1021903 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-493626-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=embedded-brains.de Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="d37vmHGw"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43YtPw3Gbjz9sCr for ; Wed, 9 Jan 2019 00:28:51 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id; q=dns; s=default; b=L0RZA78TrsGBLvM M2eimnLNhZUbCXHNQWEMfhaj9kUSSuwuwe1pp4zbodu3eptDJl2TU37DAIWM8fiQ 7iRYuxbGU38Avw3Eko9Zxpzzs6TFLTn+pw07loJheMtdy7hpBm2sbLPzOyITYmqg axrKB2sahsNZ7P+TRR9looI4hydg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id; s=default; bh=xdNJg7nF5Z0zQuQ1HqE4w QqXtxo=; b=d37vmHGwFyJ5vPWDV6FwOB5PTE0az71oiqY6xamPHUrIQ6l/7N1Y9 B4GUzu1qyYy6q6PrJ4kpw4vuMLDb2EysoFN2EK93WGxuYp3B0TjKuchX+owtJugb 97TqsAATurxfdPPbxC4fDAUEuVRK6L9rPfrWp142DFY5Vq69lDTwYQ= 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-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@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, 8 Jan 2019 14:28:34 +0100 Message-Id: <20190108132835.15505-1-sebastian.huber@embedded-brains.de> X-IsSubscribed: yes 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"