From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2075.outbound.protection.outlook.com [40.107.105.75]) by sourceware.org (Postfix) with ESMTPS id 023F13858023 for ; Wed, 6 Dec 2023 17:51:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 023F13858023 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=axis.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=axis.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 023F13858023 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.105.75 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1701885105; cv=pass; b=Ir2Ox/JRG0Vr/UcF2qeHB3rcohwaaLaxGn5BHpUuaTfg46OybemgIzfE0LRfQqCV3DQtYPm8VoDy3YQFB1rBmy5MVKXRIQcTdUU6+LljBfvfzViORyp2u9fWrHFTC2ZNepGeU6lkBZ7n99H3Xc4WqlDUfljfqxVgs9R1SvPwWos= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1701885105; c=relaxed/simple; bh=V5kTsEgD0t6yBoPrW87kjZUImjEYh41c4sKhMfGXbIo=; h=DKIM-Signature:From:To:Subject:MIME-Version:Message-ID:Date; b=pd31sxdRfcpmR2dzOOrlV0Q2YGvIzSN9wiIyVgkBYuAjR2cHOVODBCgHpKSmnU1+fJXdlo5GxYitz40Vu6pzg09WDtt27cFZwS/ZcEbIEpQOQ5NTyCuv+TlS/CaohZo8ymMi0dLKsDI6lUPvQ0IMqmMjO1jqXpWp1qQMfqPpP54= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Wp5V0Fq7E0trfOtXtXwokCM4f1xczqbb/sK8zMXvpTEkWh9rOd9l70xDRiA/OC/K7iJm+UP//5lp9m0yN3YcTbiICNWxuMpc6bfeX40ITlMHJtoEhCQdOCTWJGHWViCfL88zqYYsP3eR/8xZwxvtjAm+4rhHjAqvlJUkPJl8Fn/hDjeXnp6e+XH9KmwPvXRWcDwJpJ/yaazI6IWk53PLBFOByogZpYqPkVmnEBoZO22oVoIC4YH/Oe+i6okP11QI0rS37FX6YEIzO3KsOwkyHq9MzSkMPe9yU0kW3QCgSuCQYfX34ZWFp+SfsPWO54Gv3yf0D3kreANWiAFfTT1N2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=IzqkOfKvFxzdgX6Yd/9O+j8qgAiICmXcQkiwqRs2wz8=; b=L1iCQr6v1+Oz0epatMaK3JHi9z16xwaPwxggVeYY16N/2KiiZVffj4BrpfMZtCMQcscsUCZRP5rz+dqP2OUTNG+/PwgxH7Y8THI4UZ7/ooUMSgFKCnH0ve7lNa+vCjZn2hV2CCHtBtD7CcCGZjOvYuuyDEDio97w8Rydlb4n8ne4BB9cLYTbUX5jE4V9iG82b61gpHjJfS8dH20BsTIo5MHLQuj4NwWFZtklXNLB4qSO8MuZmVKL/p4QXCObRdnrVEwRLEo7LwyyN08ToE3rVfAANBIZX/awRsohRXaNc+dn0RUUau0tsCzr7APi+awfZ2s+sjKg19/64M1iQiWDzw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 195.60.68.100) smtp.rcpttodomain=sourceware.org smtp.mailfrom=axis.com; dmarc=fail (p=none sp=none pct=100) action=none header.from=axis.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IzqkOfKvFxzdgX6Yd/9O+j8qgAiICmXcQkiwqRs2wz8=; b=gdXuQsl4LBMY/zkqitU14qhq3sSfB2ckW7bGlt63F6sotAI4YONMYz+ckmZzOTKHP0QuRZAZg9yxMA8nnWph9anwATcplDWLsgn69oKrqEWFAH+CeyEWaC8b1NkjerRNa0gNZpQ+ZEEeZrXCxsx5A/DDadslMxCmV8hleg5FVhs= Received: from DUZPR01CA0255.eurprd01.prod.exchangelabs.com (2603:10a6:10:4b5::27) by AM7PR02MB6068.eurprd02.prod.outlook.com (2603:10a6:20b:1a1::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.25; Wed, 6 Dec 2023 17:51:40 +0000 Received: from DB5PEPF00014B9B.eurprd02.prod.outlook.com (2603:10a6:10:4b5:cafe::c0) by DUZPR01CA0255.outlook.office365.com (2603:10a6:10:4b5::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.25 via Frontend Transport; Wed, 6 Dec 2023 17:51:40 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 195.60.68.100) smtp.mailfrom=axis.com; dkim=none (message not signed) header.d=none;dmarc=fail action=none header.from=axis.com; Received-SPF: Fail (protection.outlook.com: domain of axis.com does not designate 195.60.68.100 as permitted sender) receiver=protection.outlook.com; client-ip=195.60.68.100; helo=mail.axis.com; Received: from mail.axis.com (195.60.68.100) by DB5PEPF00014B9B.mail.protection.outlook.com (10.167.8.168) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7068.20 via Frontend Transport; Wed, 6 Dec 2023 17:51:39 +0000 Received: from SE-MAIL21W.axis.com (10.20.40.16) by se-mail01w.axis.com (10.20.40.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Wed, 6 Dec 2023 18:51:39 +0100 Received: from se-mail01w.axis.com (10.20.40.7) by SE-MAIL21W.axis.com (10.20.40.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Wed, 6 Dec 2023 18:51:39 +0100 Received: from se-intmail01x.se.axis.com (10.0.5.60) by se-mail01w.axis.com (10.20.40.7) with Microsoft SMTP Server id 15.1.2375.34 via Frontend Transport; Wed, 6 Dec 2023 18:51:39 +0100 Received: from pchp3.se.axis.com (pchp3.se.axis.com [10.88.21.53]) by se-intmail01x.se.axis.com (Postfix) with ESMTP id 4BD7CF5FA; Wed, 6 Dec 2023 18:51:39 +0100 (CET) Received: by pchp3.se.axis.com (Postfix, from userid 171) id 4BA152041E; Wed, 6 Dec 2023 18:51:39 +0100 (CET) From: Hans-Peter Nilsson To: Subject: [committed 1/2] libgloss/cris: Make C declarations present and match them MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8BIT Message-ID: <20231206175139.4BA152041E@pchp3.se.axis.com> Date: Wed, 6 Dec 2023 18:51:39 +0100 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB5PEPF00014B9B:EE_|AM7PR02MB6068:EE_ X-MS-Office365-Filtering-Correlation-Id: 7812c8be-1abd-46bd-b661-08dbf6840012 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: G3SpNSQqjjcAKWjNgyzOQ9lnApA3LneNnyndyESyLVpyn6V3T7/2gRGJDKdX9ISBg6q6mFnnoaAgvfJb2eR4M0vdaX4a5KRS3jw4Rc0ykRZ6DVe50R9NmbN0f4LZVpcrvaXiy6omtCWlPbsGF1FoNFTQrWcohrqNqMg8ieN/qxrwzWMWplFSnNLMa65BdM9iknld7mzotvsk67CmaeC2CDFTfU3VjYxPYcQ9gsUdkJZ+uzkG+ThBpm0Se//0iuQFStan8KiIuk9waDJ2sd4yrCBRCQ7/I+M3kREkcvnW2J5fUEoMDyPxSwOzxMmzmSXlIDiYpU+yZj9Urw6kXXtfa/+VTjl0qL/+ruhgTPmzWd3K101HXs3JyBXcfpkn13kdQOUc419ZYPH3TTqHlSD1nnLQTNyAlwFQo+rdLwcVgGP9t2Uix5YgaHGobazVVmfCzXmb1m6kDWM81g4rgDVo+1czJWDKBWvWkARG2cCldTDcD6NcpriR4R7StWJ5RHzQa6KDukuNHJ5M57m9V9jA/28QLjzD8GJ6+THixOYMBStRxziJDHE6mBaqLgcsVcKA5doqzxYDkDrHL+kvicMEDlWtNBhKE3VSQS4KJhQ8+yg3HrnQLia5BGu76grStKnCVuoJU44zkfJVsF+7QdxhGQ2M2Rjg4fXF2EaRhXC9eCger6bYpJ4qMGmHRn9gNs/2hWaNuzuFYjJYsBspjd0g2AISVgST1MR0synGfwsxIGwRLD8CfHDvEa9aSsdZBY+aO/YxF84jBggxtcIIrWRduX2hDFEbJltjkcv+c94P0QJODhcRJ2BSu4TiHJXJq6/o X-Forefront-Antispam-Report: CIP:195.60.68.100;CTRY:SE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.axis.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(396003)(346002)(136003)(39850400004)(376002)(230273577357003)(230922051799003)(230173577357003)(82310400011)(64100799003)(186009)(1800799012)(451199024)(46966006)(36840700001)(40470700004)(36860700001)(356005)(478600001)(81166007)(40480700001)(47076005)(82740400003)(426003)(336012)(26005)(6266002)(1076003)(83380400001)(33656002)(8676002)(8936002)(2906002)(5660300002)(41300700001)(6916009)(70586007)(70206006)(42186006)(316002)(40460700003)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: axis.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Dec 2023 17:51:39.9618 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7812c8be-1abd-46bd-b661-08dbf6840012 X-MS-Exchange-CrossTenant-Id: 78703d3c-b907-432f-b066-88f7af9ca3af X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=78703d3c-b907-432f-b066-88f7af9ca3af;Ip=[195.60.68.100];Helo=[mail.axis.com] X-MS-Exchange-CrossTenant-AuthSource: DB5PEPF00014B9B.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR02MB6068 X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,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 List-Id: This is the libgloss part. Recently, there was a change in gcc such that implicit function declarations and type mismatches are now errors, no longer just warnings. Fix by adding and correcting declarations warned about; including the right header or adding a declaration (for "main" in lcrt0.c) and adjust to those types as necessary. --- libgloss/cris/gensyscalls | 15 ++++++++------- libgloss/cris/lcrt0.c | 4 +++- libgloss/cris/linunistd.h | 7 +++++-- libgloss/cris/outbyte.c | 2 +- 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/libgloss/cris/gensyscalls b/libgloss/cris/gensyscalls index c36f2848871c..0b5b0731a725 100644 --- a/libgloss/cris/gensyscalls +++ b/libgloss/cris/gensyscalls @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2005, 2018 Axis Communications. +# Copyright (C) 2005, 2018, 2023 Axis Communications. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -40,13 +40,14 @@ lu='/* -*- buffer-read-only: t -*- #define R(x) return (x); } ' lui="$lu int" +lul="$lu long int" r=") { R (_Sys_" cat > close.c < execve.c < exit.c < link.c < lseek.c < open.c < read.c < rename.c < wait.c < write.c < #ifdef _HAVE_INITFINI_ARRAY #define _init __libc_init_array @@ -99,6 +100,7 @@ extern void _Libdtors (void); extern void __init__start (void) __attribute ((weak)); extern void __aout__ctors (void) __attribute ((weak)); +extern int main (int argc, char **argv, char **env); static void start1 () __asm__ ("__start1") __attribute ((__used__)); static void diff --git a/libgloss/cris/linunistd.h b/libgloss/cris/linunistd.h index 3a6f318a370f..b627670f5ba1 100644 --- a/libgloss/cris/linunistd.h +++ b/libgloss/cris/linunistd.h @@ -1,5 +1,5 @@ /* Support for syscalls for cris*-axis-linux-gnu and simulators - Copyright (C) 1998-2005, 2018 Axis Communications. + Copyright (C) 1998-2005, 2018, 2023 Axis Communications. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -32,10 +32,13 @@ #ifndef _ASM_ELINUX_UNISTD_H_ #define _ASM_ELINUX_UNISTD_H_ +#define _LIBC + /* Our callers might want to use link_warning, so provide it from here. */ #include "../config.h" #include "libnosys/warning.h" +#include #include /* @@ -357,7 +360,7 @@ static inline _syscall0(int,setup) static inline _syscall0(int,sync) static inline _syscall3(int,write,int,fd,const char *,buf,unsigned,count) static inline _syscall1(int,dup,int,fd) -static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp) +static inline _syscall3(int,execve,const char *,file,char *const *,argv,char *const *,envp) static inline _syscall3(int,open,const char *,file,int,flag,int,mode) static inline _syscall1(int,close,int,fd) static inline _syscall1(int,_exit,int,exitcode) diff --git a/libgloss/cris/outbyte.c b/libgloss/cris/outbyte.c index 1cb686b9687b..210339f8ef18 100644 --- a/libgloss/cris/outbyte.c +++ b/libgloss/cris/outbyte.c @@ -1,7 +1,7 @@ /* Low-level kind-of-support for CRIS. Mostly used as a placeholder function. Too small and obvious to warrant a copyright notice. */ -#include +#include void outbyte (int ch) { -- 2.30.2 brgds, H-P