From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id 6FC443858C53 for ; Thu, 19 Jan 2023 21:53:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6FC443858C53 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.97,230,1669104000"; d="scan'208";a="94113617" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 19 Jan 2023 13:53:12 -0800 IronPort-SDR: rcR8KcmKnFlmc9ZdhCz6INSq312OktV6E2sgWbXQLH+316M6RpIF9kUNnqSTAS7dRHFJLNrmAA dkgdSfICaGvXMhGS6bJ6zhY1C7welcS6B9ger8fZrOSoFqTmO7R3OXiIj7hvoxdkGGN3SwCUOJ ZKaScGuR9FMgGEvLG02O9SJ3XoqB0Cdx4xxDhmT+LZFyn2A742NAn876RbF/fgobtDIUtw4y91 tccULi6KYBZANDPMC3g/ULRyBbMTf7gRnvC8gNmLqSmQbHK+uQaE1KUSCoGZFhVd1Fiwm8B7aU 49E= From: Thomas Schwinge To: CC: , Thomas Schwinge Subject: [PATCH] nvptx: Provide stub 'gettimeofday' Date: Thu, 19 Jan 2023 22:52:57 +0100 Message-ID: <20230119215257.2001787-1-thomas@codesourcery.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,SPF_HELO_PASS,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 List-Id: Instead of them FAILing due to 'unresolved symbol gettimeofday', this makes PASS a number of GCC 'gfortran.dg' test cases, for example. --- newlib/libc/machine/nvptx/misc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/newlib/libc/machine/nvptx/misc.c b/newlib/libc/machine/nvptx/m= isc.c index ef76eaae1..897ddc807 100644 --- a/newlib/libc/machine/nvptx/misc.c +++ b/newlib/libc/machine/nvptx/misc.c @@ -16,6 +16,8 @@ #include #include #include +#include + #undef errno extern int errno; @@ -29,6 +31,11 @@ fstat (int fd, struct stat *buf) { return -1; } +int +gettimeofday (struct timeval *tv, void *tz) { + return -1; +} + int isatty (int fd) { return fd =3D=3D 1; -- 2.25.1 ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=DFe 201, 8= 0634 M=FCnchen; Gesellschaft mit beschr=E4nkter Haftung; Gesch=E4ftsf=FChre= r: Thomas Heurung, Frank Th=FCrauf; Sitz der Gesellschaft: M=FCnchen; Regis= tergericht M=FCnchen, HRB 106955