From patchwork Fri Aug 30 09:35:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Lapshin X-Patchwork-Id: 96764 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E9019385840E for ; Fri, 30 Aug 2024 09:36:04 +0000 (GMT) X-Original-To: newlib@sourceware.org Delivered-To: newlib@sourceware.org Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on20715.outbound.protection.outlook.com [IPv6:2a01:111:f400:feae::715]) by sourceware.org (Postfix) with ESMTPS id 8D3DF3858D34 for ; Fri, 30 Aug 2024 09:35:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8D3DF3858D34 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=espressif.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=espressif.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8D3DF3858D34 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f400:feae::715 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1725010542; cv=pass; b=ja6ea/UTsBgrYpu9PgKEVzCo5W9idqqk0dT4iZfULx+a3DiqAf2Ewgx+j3G1Mfp3MM3pJhblAXMsH5mzKN0Stuial4aNhXItkTmhg4S6o7TptbTSzKcCwDSWLhNqY3RETBodY6m3q1RzMEfulBusYIA6rA6wB0mAeaFHNUwikP4= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1725010542; c=relaxed/simple; bh=QZVEC9t9bV/FhPKfGhoY/8+hsLqy708D7l0Iw92d2Qc=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=N+ttEhCLtVrh+FQSyf6jVCcUmpcNWol10hgJJcyRu18mzSPtN6aCqWLlHNftWPXz4t+gZ2bK9WMPBrvOtiEVPcunxUpOkPvXT1UuUt8ilJRQKFCdPyBFOyX9ZcYL78xbhuhLYN4P/5fqxtxkkiasFU6tuVeHmYUrKI+xqXqAPYA= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=uaeDQWADsIf3PuihZ64eu7nTl43YklaL/C5lVk6O7oiYYp0xc4dq/IMM2Jo+RfXZ0apxyOxLWb5Mt3dOWvSbAKGAiXNzUwaxk2rfx+zellV+lRujQ6oxrHBAnamKBGYUV3hxqzrKMONjzGJv6/7ded4sIHM3Dk5euYX5XbC6bMbwOkEtMYP3vTZdXqsdFxANKj256hhrMXjLuMupsWP/PltVei3uSnOYN97cRFc8avp8GdnXdTgQy/f1iDwaDf6bQzAAz/j9KrX2k8weGXPXmyNnzRyaSApdpIm2YeG5VpfyGLdaMNBDSP9fXiTsmcfgUkT+NiY4TwCBIH8uYC5Diw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=QZVEC9t9bV/FhPKfGhoY/8+hsLqy708D7l0Iw92d2Qc=; b=ZW0tJToGvlqnDXkr2vsFaVz/nbFYBK2nvHLbULVydRBhLa5WFD5O7CLj/KKOuBGvKGcLg5TRgEE1HfsB8aMJZG7OrVx3m2l91+gTNKPC1YKCCLQRMKvpzIFIVQdw5OO8HykcfkXSZU+1e9caYJmp+Y9YgzIc4D2aghgONhOv3DoODKZ2hJd3zXECfUUkpHlN37opuEwMiPLQwEaQ1R4I4GZSEsbvpJXFJEys6FIgqM+/LYKCnAZXIKhMt+F4oORUyPk3nmyvPLSDItJIUiczF6GCFYIunOyfRqc1stLoSw3JrOSFXXckvaUXNVdCfvkfC8W0msvtFmWGXhNNZCyvsQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=espressif.com; dmarc=pass action=none header.from=espressif.com; dkim=pass header.d=espressif.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=espressifsystems.onmicrosoft.com; s=selector1-espressifsystems-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QZVEC9t9bV/FhPKfGhoY/8+hsLqy708D7l0Iw92d2Qc=; b=2Xg6tn+TGxajNBKRS3m88FQUq2oxy5lsW/kItPJax3lG4VFqaJJptsG7j6auRbrCbcl3kyjJLcd6O73NUrTKh/HjB5w06lJIKQMqWTJ4T6mKZSkKomGpygQoHTSGPd+kEQ/dlIj/1xZMJLzSE/0+x5s52cjMeSfuF07LwAbOAFg= Received: from SEZPR04MB5732.apcprd04.prod.outlook.com (2603:1096:101:74::7) by TYZPR04MB7235.apcprd04.prod.outlook.com (2603:1096:400:45d::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.21; Fri, 30 Aug 2024 09:35:25 +0000 Received: from SEZPR04MB5732.apcprd04.prod.outlook.com ([fe80::28d2:dac0:5545:8ee8]) by SEZPR04MB5732.apcprd04.prod.outlook.com ([fe80::28d2:dac0:5545:8ee8%3]) with mapi id 15.20.7897.027; Fri, 30 Aug 2024 09:35:24 +0000 From: Alexey Lapshin To: "newlib@sourceware.org" CC: Alexey Gerenkov , "vinschen@redhat.com" Subject: [PATCH v2 1/2] newlib: xtensa: remove sys/xtensa. use machine/xtensa Thread-Topic: [PATCH v2 1/2] newlib: xtensa: remove sys/xtensa. use machine/xtensa Thread-Index: AQHa+r/w7jBP7ZYK5EuHLrb/thbV3A== Date: Fri, 30 Aug 2024 09:35:24 +0000 Message-ID: <5c62325468951c4acfeb002da0fcaa41f2f4c4ac.camel@espressif.com> References: <56e73fe36a6758dede169882b54ff62b2188d04e.camel@espressif.com> In-Reply-To: <56e73fe36a6758dede169882b54ff62b2188d04e.camel@espressif.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=espressif.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SEZPR04MB5732:EE_|TYZPR04MB7235:EE_ x-ms-office365-filtering-correlation-id: ce3ba3c5-26a3-45e7-7a3b-08dcc8d71367 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|1800799024|366016|376014|38070700018; x-microsoft-antispam-message-info: =?utf-8?q?AnIv31SlcXi7ntCAfE8HkzzjKfQL2AK?= =?utf-8?q?2sHMXZfFFq3WZTDQkhP2AbWioEYfUhVSmfacLGYKFn45h6XsvmVjfmQ7GbCbL/yUv?= =?utf-8?q?ozURGMi85nDctotM30ARAJJ6HanMsWLT24PFEc0uFt6sjZtpCbjfuItWlI9a4BhGV?= =?utf-8?q?Pb+Wxk9qSoxCEHYh3IcFFm7gYfWDVkOWeBBJtfPQT8Xcmelz5BRGMxAwi4C2Bjwjp?= =?utf-8?q?slHDMleUGJne00+B//1BCBVcuIYRvloukG4z+JIS9k+MSs3Ji3LBG0kZSRHFHqGfQ?= =?utf-8?q?wdFL64qsLRvc+KVCz522tqRCpJL2mPcV4XORZsxlupSA/5MQsD7QNrN2dhoyNriIv?= =?utf-8?q?XDAqYdHJUYpxWsAO5nJS3UvmuxiFmbfa5NGpVNoKDWScCPefopdyUU04BkUGkvk82?= =?utf-8?q?blEuX+g2v2naUxk2U3nq/5QgfbYncP1Tf4CT9eEz6XxDoJsumyAZgkwlK2RFjOcyO?= =?utf-8?q?z+mvYK+RxuOSqUMU5rIw96azXnZ8ntJZidieFwB1XO2eGp7hYSxLU/AomjY1J6B1G?= =?utf-8?q?2y8o1rLeyDZikxdiIg/jhqPA0T9sLnlcdlOiS8mL7j5FPtV8TR0mYPXg4G/m+hX8A?= =?utf-8?q?6uNhVLnLhZN4anWPwBaNCIA8Xe1kgcT/qbpj0pxck3mUmQAnZewWdwJLb7ZQCUDuU?= =?utf-8?q?nHEF+bBvfWANAOkCnIvtMKRBLXuDp+0Nv6/6FM41s9S6ygnkzbEvrRqHA2TuvX+Dl?= =?utf-8?q?j0MrpQTR+2ycEQ4lJRVl2whTHBjL1hNYnsRLma5zEw8OcAptmtXBjkh67TMXNd86P?= =?utf-8?q?W4DPjOzKP3bg+ownUWNreVTD+fgeV0kjBB2DzFQrT6qPAFZFHbGmUutPXbbTSTclD?= =?utf-8?q?eJBSldJttRSG3qdzj3m2pAEWOUjGC8PbbCdURko9SxcFQsoME6xVDAWqh/H1+8I2d?= =?utf-8?q?EKCqzQ4zTbB6gmm5Tj2QokRuh41X0mRAyqisT2tvo5/t0doHrYm+QqNt/Vu+o/Dif?= =?utf-8?q?fhwZXeMs2CJHP7fHxokq3iBZy1jMxxlW44optBfxR80w2ERXvFK7m0rBQnonuRDRG?= =?utf-8?q?JDPFaYcFLLe8PgZFL7QG8yYbUiKsON7Y4bWnVV1zVkQ380jrxlQVMXfR+lPBahk2D?= =?utf-8?q?bVcU/vjIaxbC5IbFT2y6+o0yCZWedSUWu/eo1cqy973zfPb50AuBbCMJOuOVWotWh?= =?utf-8?q?wN22foHOPSOIUT9b49be3QBMZV+HeMJ9Q7qhmPvghU+dd/slcyG2iFKhxTkL50r8A?= =?utf-8?q?W/bsn2YhgyctMTXAH3g0YMkWU3iZqgfLmZ/thxFFyylc2hD21MxAN0imWVVOId82D?= =?utf-8?q?aCs54ssOe6vHPeP2ABgPEW6652jrJqPVl3Y/gkWHMwhuYta8yyr1XBKBVzdc14UeQ?= =?utf-8?q?NN9etjw5lBW4qLCos5OeSHsooQfitgzo4A=3D=3D?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SEZPR04MB5732.apcprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(376014)(38070700018); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?q?jPctEce0mys/lAB3Q/QLbZTEaq6Z?= =?utf-8?q?xqkfmTyaBJAetTRNYbO5TqCz62/gYIiIwdG2tgY2No9mXgzuXMqytLyquu1dqkFX0?= =?utf-8?q?YK1Z2PQYlf/90Ch6/o18Crl4BsJq3ODKGSI3+klUL3k+lNFMQ8kgDtO9FAl1yKsK7?= =?utf-8?q?G99dQcodPtSju06dtKDiB4NhX+KKyAtmOj7r/JOG5y8P7S3nyj1qJzAEKN6NS2qQr?= =?utf-8?q?2qGDZKuPsRMVhPZnfXlTFz/xwuvDouK5oV/heog4YdFXV8CEAwBau09dfWY1Egjae?= =?utf-8?q?yLHo059c+OH1PaBZ9U3H9CMtDmddgZSVcNL775WgGTeYTLwrWPO2wuOY84ux/5tCP?= =?utf-8?q?RaSEHO6DScch1QIYUWpQe3+cm1gYL85hWV2y3U3+FWjugCPdFK1hhCsez4mvhIQpz?= =?utf-8?q?Uba2/f0fcpmE+tcYz2jjPj6Wt0IcJ/5LL5Hx8WsQ5BW6TZEJipvIraeg6c3lwG9dI?= =?utf-8?q?FXVhcqE91Xa9e1zXmAqmZvuGB2fevuZmSK1EmPlxEdHj7jZBf0D3kJibKYoEWNyAG?= =?utf-8?q?2DLfWoTS3SL7wcZpG3fH2tK9p0mVP/DM2ChRrf9fPLiVDKWeogdiOCKsfpaobesyX?= =?utf-8?q?R187tLW9S4JxhGr4preTI8ZcJhMFKaYsEEJtbK7HPs7pDzGuqFXZ0Divbs1cV7u5c?= =?utf-8?q?ig4U/8OFt7uqct75crtz9458DBl56D03KiKeIQWWFD48Dktk1hrxwrPxRufKb4D8q?= =?utf-8?q?8aU30vokWD9ddOA0auRFUWgQRbUYv1j1h9z/zWTpAEbk33wKqeRkHlKYOzw6xwNak?= =?utf-8?q?AkGbwyh4Oba39pnwsZKzaIwKLCJAmLhcbT9+mvhSXCGu8knfmfkRwLVbhDLdF5qmR?= =?utf-8?q?q4JV/1+/fZoIDiciG5WHqCGkw88J8BKVu+XF6UEcCM1B3eO3ZwRbR/GruZNgns4zY?= =?utf-8?q?Qoxj1y6IeQK2PfJ04xM5iogbn+ATHYDGQykvzXKPx4HrNDRmlOwaNf18a8LffFbhC?= =?utf-8?q?yT/QHxCzxZdPsm5ba0OY1/2GVj27ezps+eZQn4FNxLx02TT4Kv/j8RyIPXiO5V5zb?= =?utf-8?q?h6dRFApSdMWsJccxNFaeHjKvqvT8kgiWaZMlF89IWdyOFI1g0WA168X3vmdnKh/a9?= =?utf-8?q?GNQ0inDnj/dSO3LTq3iiYOr/z4tpI3K1d+Hn2E+xgmBA+ynbbHaUji7wOySv5aBMJ?= =?utf-8?q?O3ZR0/AiCHUl1SZoqYuhI4EG1rYPX9LhzpZcvJn/EJzrb9DHpjIaS+Pfuqw1IKng0?= =?utf-8?q?jXg1mA4r3PDYchqNqXfoh0vBA/AGyDPe6NGmWCTmjLlFcK5RQ+eYg25rEy0VemSaS?= =?utf-8?q?TlSWB/Lzt8jaO48y1P7+yCf/42rQ18WWon4mCYqRPbt4A9KCn83LyPsynMBMP8QNU?= =?utf-8?q?ECPleJ3B0vxf4+zzxuIXsDcIUahoQbI4f3TSoZvrzdtYRbNyjrFS2aovhQY/ZjE+u?= =?utf-8?q?Gh7W4StCM95SHPgyNNF9rx0W6o9ZkpeW75yIkkpu8BCRumXy/7v+opPi134mb5MiI?= =?utf-8?q?DT80ioyc+Uaz7XGozGjSNwp1vvYSr+q3W3vWUA3FVfLFPDJzB7BASqOoHqsCKzvMR?= =?utf-8?q?ka5s63+cWAP4iieMbpi6Nu89m4pbVN/dDQ=3D=3D?= Content-ID: <93379FBDC7AA7145B45BDE04A14E86B0@apcprd04.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: espressif.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SEZPR04MB5732.apcprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ce3ba3c5-26a3-45e7-7a3b-08dcc8d71367 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Aug 2024 09:35:24.8589 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 5faf27fd-3557-4294-9545-8ea74a409f39 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: xCk86shSVPHiCrUbI3dLsE3OR9j+CQrFVvf6qYUfpMJp6cSTZi7xladFhQ0o8UzxixAxhvPSXf3cqWlv3Pu92sa5RkD6kkfcqSMPB0+Y8cY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR04MB7235 X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, SPF_HELO_PASS, 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: newlib@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: newlib-bounces~patchwork=sourceware.org@sourceware.org Remove sys/xtensa that is actually duplicate newlib's code. Move used code to machine/xtensa or to libgloss --- libgloss/xtensa/Makefile.inc | 1 + .../sys => libgloss}/xtensa/clibrary_init.c | 6 ++-- newlib/Makefile.am | 6 +++- newlib/configure | 13 -------- newlib/libc/acinclude.m4 | 1 - .../xtensa/include/xtensa/config/core-isa.h | 0 .../include => machine/xtensa/sys}/fenv.h | 6 ++-- newlib/libc/sys/Makefile.inc | 3 -- newlib/libc/sys/xtensa/Makefile.inc | 1 - newlib/libc/sys/xtensa/creat.c | 9 ----- newlib/libc/sys/xtensa/crt0.c | 16 --------- newlib/libc/sys/xtensa/include/unistd.h | 13 -------- newlib/libc/sys/xtensa/isatty.c | 18 ---------- newlib/libc/sys/xtensa/sys/file.h | 33 ------------------- newlib/libm/machine/xtensa/acinclude.m4 | 2 +- 15 files changed, 13 insertions(+), 115 deletions(-) rename {newlib/libc/sys => libgloss}/xtensa/clibrary_init.c (91%) rename newlib/libc/{sys => machine}/xtensa/include/xtensa/config/core-isa.h (100%) rename newlib/libc/{sys/xtensa/include => machine/xtensa/sys}/fenv.h (97%) delete mode 100644 newlib/libc/sys/xtensa/Makefile.inc delete mode 100644 newlib/libc/sys/xtensa/creat.c delete mode 100644 newlib/libc/sys/xtensa/crt0.c delete mode 100644 newlib/libc/sys/xtensa/include/unistd.h delete mode 100644 newlib/libc/sys/xtensa/isatty.c delete mode 100644 newlib/libc/sys/xtensa/sys/file.h -- 2.43.0 diff --git a/libgloss/xtensa/Makefile.inc b/libgloss/xtensa/Makefile.inc index b4c818732..5cdb4ef39 100644 --- a/libgloss/xtensa/Makefile.inc +++ b/libgloss/xtensa/Makefile.inc @@ -22,6 +22,7 @@ multilibtool_DATA += \ %D%/crt1-boards.o %C%_libgloss_a_SOURCES = \ + %D%/clibrary_init.c \ %D%/sleep.S \ %D%/syscalls.c \ %D%/window-vectors.S diff --git a/newlib/libc/sys/xtensa/clibrary_init.c b/libgloss/xtensa/clibrary_init.c similarity index 91% rename from newlib/libc/sys/xtensa/clibrary_init.c rename to libgloss/xtensa/clibrary_init.c index 24d4cf94c..b8c7d3a6a 100644 --- a/newlib/libc/sys/xtensa/clibrary_init.c +++ b/libgloss/xtensa/clibrary_init.c @@ -1,6 +1,6 @@ /* Copyright (c) 2003-2006 Tensilica Inc. ALL RIGHTS RESERVED. - Redistribution and use in source and binary forms, with or without + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright @@ -29,8 +29,8 @@ const char * __progname = 0; void __clibrary_init (int argc, char **argv, char **envp, - void (*init)(void), - void (*fini)(void)) + void (*init)(void), + void (*fini)(void)) { if (argv != 0) __progname = *argv; diff --git a/newlib/Makefile.am b/newlib/Makefile.am index 4ab36b8d8..87a7f8597 100644 --- a/newlib/Makefile.am +++ b/newlib/Makefile.am @@ -233,7 +233,11 @@ stmp-targ-include: config.status fi $(AM_V_at)s=machine/$(machine_dir)/machine d=machine $(TARG_INCLUDE_CP_DIR) $(AM_V_at)s=machine/$(machine_dir)/sys d=sys $(TARG_INCLUDE_CP_DIR) - $(AM_V_at)s=machine/$(machine_dir)/include d= $(TARG_INCLUDE_CP_DIR) + $(AM_V_at)for i in $(call rwildcard,$(srcdir)/libc/machine/$(machine_dir)/include/,*.h); do \ + f=`echo $$i | sed s:^$(srcdir)/libc/machine/$(machine_dir)/include/::`; \ + $(MKDIR_P) targ-include/`dirname $$f`; \ + cp $$i targ-include/$$f; \ + done $(AM_V_at)s=sys/$(sys_dir)/include d= $(TARG_INCLUDE_CP_DIR) $(AM_V_at)for i in $(call rwildcard,$(srcdir)/libc/sys/$(sys_dir)/include/,*.h); do \ f=`echo $$i | sed s:^$(srcdir)/libc/sys/$(sys_dir)/include/::`; \ diff --git a/newlib/configure b/newlib/configure index 14ed85e30..cb4747880 100755 --- a/newlib/configure +++ b/newlib/configure @@ -777,8 +777,6 @@ HAVE_LONG_DOUBLE_FALSE HAVE_LONG_DOUBLE_TRUE HAVE_LIBC_SYS_Z8KSIM_DIR_FALSE HAVE_LIBC_SYS_Z8KSIM_DIR_TRUE -HAVE_LIBC_SYS_XTENSA_DIR_FALSE -HAVE_LIBC_SYS_XTENSA_DIR_TRUE HAVE_LIBC_SYS_W65_DIR_FALSE HAVE_LIBC_SYS_W65_DIR_TRUE HAVE_LIBC_SYS_TIRTOS_DIR_FALSE @@ -5513,13 +5511,6 @@ fi else HAVE_LIBC_SYS_W65_DIR_TRUE='#' HAVE_LIBC_SYS_W65_DIR_FALSE= -fi - if test "${sys_dir}" = xtensa; then - HAVE_LIBC_SYS_XTENSA_DIR_TRUE= - HAVE_LIBC_SYS_XTENSA_DIR_FALSE='#' -else - HAVE_LIBC_SYS_XTENSA_DIR_TRUE='#' - HAVE_LIBC_SYS_XTENSA_DIR_FALSE= fi if test "${sys_dir}" = z8ksim; then HAVE_LIBC_SYS_Z8KSIM_DIR_TRUE= @@ -7708,10 +7699,6 @@ if test -z "${HAVE_LIBC_SYS_W65_DIR_TRUE}" && test -z "${HAVE_LIBC_SYS_W65_DIR_F as_fn_error $? "conditional \"HAVE_LIBC_SYS_W65_DIR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${HAVE_LIBC_SYS_XTENSA_DIR_TRUE}" && test -z "${HAVE_LIBC_SYS_XTENSA_DIR_FALSE}"; then - as_fn_error $? "conditional \"HAVE_LIBC_SYS_XTENSA_DIR\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${HAVE_LIBC_SYS_Z8KSIM_DIR_TRUE}" && test -z "${HAVE_LIBC_SYS_Z8KSIM_DIR_FALSE}"; then as_fn_error $? "conditional \"HAVE_LIBC_SYS_Z8KSIM_DIR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 diff --git a/newlib/libc/acinclude.m4 b/newlib/libc/acinclude.m4 index 48a7dee51..52a6c57cf 100644 --- a/newlib/libc/acinclude.m4 +++ b/newlib/libc/acinclude.m4 @@ -23,7 +23,6 @@ m4_foreach_w([SYS_DIR], [ sh sysmec sysnec810 sysnecv850 sysvi386 sysvnecv70 tic80 tirtos w65 - xtensa z8ksim ], [AM_CONDITIONAL([HAVE_LIBC_SYS_]m4_toupper(SYS_DIR)[_DIR], test "${sys_dir}" = SYS_DIR)]) diff --git a/newlib/libc/sys/xtensa/include/xtensa/config/core-isa.h b/newlib/libc/machine/xtensa/include/xtensa/config/core-isa.h similarity index 100% rename from newlib/libc/sys/xtensa/include/xtensa/config/core-isa.h rename to newlib/libc/machine/xtensa/include/xtensa/config/core-isa.h diff --git a/newlib/libc/sys/xtensa/include/fenv.h b/newlib/libc/machine/xtensa/sys/fenv.h similarity index 97% rename from newlib/libc/sys/xtensa/include/fenv.h rename to newlib/libc/machine/xtensa/sys/fenv.h index 2fa76f758..69c94f0cf 100644 --- a/newlib/libc/sys/xtensa/include/fenv.h +++ b/newlib/libc/machine/xtensa/sys/fenv.h @@ -26,8 +26,8 @@ OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _FENV_H -#define _FENV_H +#ifndef _SYS_FENV_H +#define _SYS_FENV_H #ifdef __cplusplus extern "C" { @@ -85,4 +85,4 @@ int fegetexcept(void); } #endif -#endif +#endif // _SYS_FENV_H diff --git a/newlib/libc/sys/Makefile.inc b/newlib/libc/sys/Makefile.inc index 24d8407d5..9f8758934 100644 --- a/newlib/libc/sys/Makefile.inc +++ b/newlib/libc/sys/Makefile.inc @@ -64,9 +64,6 @@ endif if HAVE_LIBC_SYS_W65_DIR include %D%/w65/Makefile.inc endif -if HAVE_LIBC_SYS_XTENSA_DIR -include %D%/xtensa/Makefile.inc -endif if HAVE_LIBC_SYS_Z8KSIM_DIR include %D%/z8ksim/Makefile.inc endif diff --git a/newlib/libc/sys/xtensa/Makefile.inc b/newlib/libc/sys/xtensa/Makefile.inc deleted file mode 100644 index ddee58ae1..000000000 --- a/newlib/libc/sys/xtensa/Makefile.inc +++ /dev/null @@ -1 +0,0 @@ -libc_a_SOURCES += %D%/creat.c %D%/isatty.c %D%/clibrary_init.c diff --git a/newlib/libc/sys/xtensa/creat.c b/newlib/libc/sys/xtensa/creat.c deleted file mode 100644 index 21e6a1874..000000000 --- a/newlib/libc/sys/xtensa/creat.c +++ /dev/null @@ -1,9 +0,0 @@ -/* creat() "system call" (copied from libc/posix/creat.c) */ - -#include - -int -creat (const char *path, mode_t mode) -{ - return open (path, O_WRONLY | O_CREAT | O_TRUNC, mode); -} diff --git a/newlib/libc/sys/xtensa/crt0.c b/newlib/libc/sys/xtensa/crt0.c deleted file mode 100644 index 11725dca5..000000000 --- a/newlib/libc/sys/xtensa/crt0.c +++ /dev/null @@ -1,16 +0,0 @@ -/* Dummy crt0 code. */ - -/* Copyright (c) 2003 by Tensilica Inc. ALL RIGHTS RESERVED. - These coded instructions, statements, and computer programs are the - copyrighted works and confidential proprietary information of Tensilica Inc. - They may not be modified, copied, reproduced, distributed, or disclosed to - third parties in any manner, medium, or form, in whole or in part, without - the prior written consent of Tensilica Inc. */ - -/* Xtensa systems normally use a crt1 file associated with a particular - linker support package (LSP). There is no need for this crt0 file, - except that the newlib makefiles require it to exist if there is a - sys/xtensa directory. The directory exists only to hold the header - files for the Xtensa ISS semihosting "platform". */ - -void crt0_unused (void) {} diff --git a/newlib/libc/sys/xtensa/include/unistd.h b/newlib/libc/sys/xtensa/include/unistd.h deleted file mode 100644 index 4f6fd29a4..000000000 --- a/newlib/libc/sys/xtensa/include/unistd.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef _UNISTD_H_ -#define _UNISTD_H_ - -# include - -#ifndef L_SET -/* Old BSD names for the same constants; just for compatibility. */ -#define L_SET SEEK_SET -#define L_INCR SEEK_CUR -#define L_XTND SEEK_END -#endif - -#endif /* _UNISTD_H_ */ diff --git a/newlib/libc/sys/xtensa/isatty.c b/newlib/libc/sys/xtensa/isatty.c deleted file mode 100644 index fe64209b9..000000000 --- a/newlib/libc/sys/xtensa/isatty.c +++ /dev/null @@ -1,18 +0,0 @@ -/* isatty.c */ - -/* Dumb implementation so programs will at least run. */ - -#include -#include - -int -_isatty_r (struct _reent *ptr, int fd) -{ - struct stat buf; - - if (_fstat_r (ptr, fd, &buf) < 0) - return 0; - if (S_ISCHR (buf.st_mode)) - return 1; - return 0; -} diff --git a/newlib/libc/sys/xtensa/sys/file.h b/newlib/libc/sys/xtensa/sys/file.h deleted file mode 100644 index 48a2ca06d..000000000 --- a/newlib/libc/sys/xtensa/sys/file.h +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (c) 2005-2006 Tensilica Inc. ALL RIGHTS RESERVED. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL TENSILICA - INCORPORATED BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#include - -/* Alternate names for values for the WHENCE argument to `lseek'. - These are the same as SEEK_SET, SEEK_CUR, and SEEK_END, respectively. */ -#ifndef L_SET -#define L_SET 0 /* Seek from beginning of file. */ -#define L_INCR 1 /* Seek from current position. */ -#define L_XTND 2 /* Seek from end of file. */ -#endif diff --git a/newlib/libm/machine/xtensa/acinclude.m4 b/newlib/libm/machine/xtensa/acinclude.m4 index 4d242e057..fc5001da0 100644 --- a/newlib/libm/machine/xtensa/acinclude.m4 +++ b/newlib/libm/machine/xtensa/acinclude.m4 @@ -2,7 +2,7 @@ AC_CACHE_CHECK([for XCHAL_HAVE_FP_SQRT], newlib_cv_xchal_have_fp_sqrt, [dnl AC_PREPROC_IFELSE([AC_LANG_PROGRAM( [[#define _LIBM // targ-include does not exist yet, use relative path -#include "../sys/xtensa/include/xtensa/config/core-isa.h" +#include "../machine/xtensa/include/xtensa/config/core-isa.h" #if (!XCHAL_HAVE_FP_SQRT) # error "Have not XCHAL_HAVE_FP_SQRT" #endif