From patchwork Wed Oct 29 06:58:26 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Mailhol X-Patchwork-Id: 122906 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 6650A3858C41 for ; Wed, 29 Oct 2025 06:59:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6650A3858C41 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=KtdryxEW X-Original-To: newlib@sourceware.org Delivered-To: newlib@sourceware.org Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by sourceware.org (Postfix) with ESMTPS id 54CBD3858D29 for ; Wed, 29 Oct 2025 06:58:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 54CBD3858D29 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 54CBD3858D29 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=172.105.4.254 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1761721135; cv=none; b=YMHHyVzSoI2PSHT5dIGxJAEUcOCgNOatmpDMdva7W0CCQIsKR8GA56IQ5u1UdT6bAej3kswDsmhj/WcDcBEOIqh7aI1ylX7kpVsY4/HNGTJvAsuqetxw7AI961L/dvTXIQMcekYJv919Zt4eIwtBwQWeFGiMR2YEJi2b/4MJ53k= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1761721135; c=relaxed/simple; bh=Vhn3qR/pSJxB+3JT3zcH8QUmv7wp7PokndffKfHwFyg=; h=DKIM-Signature:From:Date:Subject:MIME-Version:Message-Id:To; b=DazDcY/vOrs4zsOw5BRpqKn3JZuw0O4CxSIbjbfnZ1NuVWoua6ojXYVwNpe/nsNtTIdAq0zrXnkSd/kqIcCtdp84ASFzGsDOtfF41raWzAePF3L3XbLVWfUHQD7DxV12gZe1wzIqW8OonaGmwBhqrytuQexnyjMF8HjUda+8LSQ= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 54CBD3858D29 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id C2F4160328 for ; Wed, 29 Oct 2025 06:58:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D994EC4CEF7; Wed, 29 Oct 2025 06:58:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1761721134; bh=Vhn3qR/pSJxB+3JT3zcH8QUmv7wp7PokndffKfHwFyg=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=KtdryxEWmO4s6dPoRO905jylM1DhTU/Mp211MeW3AWWqlgIrgyHBeGoa829pNpRtg fl+FDaddqP3VQ/+sVi7ta+fM0GRu0cyNKgXasuCdm2Kkw7UmQ8FGcIbjgIgXormA5P h+kb2WmcyCS4MAuPa/qg0aRdXL4x/PXC0nvMys2pREBsYjCg1+6jV2LKBVvjqC+B6Y LADdpya8WF/ZikWJDjZscPLllpKj/UMBLbX84CekoP81XPAtSEvv4R7J/ixhVUqjD7 zbXuyePaG+Q+ynluW3Ic88YgGmCJLXaLbnzd75qyT3AZF8pQ15mXjRKa3/xapyRDHs svRkSStZMP4lA== From: Vincent Mailhol Date: Wed, 29 Oct 2025 07:58:26 +0100 Subject: [PATCH 1/6] libgloss: i386: cygmon-gmon.c: add missing libc headers MIME-Version: 1.0 Message-Id: <20251029-fix-libgloss-i386-compile-issues-v1-1-26edcb02f69c@kernel.org> References: <20251029-fix-libgloss-i386-compile-issues-v1-0-26edcb02f69c@kernel.org> In-Reply-To: <20251029-fix-libgloss-i386-compile-issues-v1-0-26edcb02f69c@kernel.org> To: newlib@sourceware.org Cc: Vincent Mailhol X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=1666; i=mailhol@kernel.org; h=from:subject:message-id; bh=Vhn3qR/pSJxB+3JT3zcH8QUmv7wp7PokndffKfHwFyg=; b=owGbwMvMwCV2McXO4Xp97WbG02pJDJmMu6XkWyNNrzslKdyyM0lrOXrS8FVM5uGrDNbPAlW0T AsvzantKGVhEONikBVTZFlWzsmt0FHoHXboryXMHFYmkCEMXJwCMJE9PIwM56SFfll1r7v6c+/6 hu3a52N2HXNhFuT3X5DOGR6Yuc3kDSPDo4Lo4yErVRfunMl4f4/3l06j/l0ZsiuOv93/KWPi4YN cHAA= X-Developer-Key: i=mailhol@kernel.org; a=openpgp; fpr=ED8F700574E67F20E574E8E2AB5FEB886DBB99C2 X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_NONE, 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 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 Add includes for stdlib.h, string.h and unistd.h. This resolves below GCC errors: cygmon-gmon.c: In function 'monstartup': cygmon-gmon.c:109:21: error: implicit declaration of function 'sbrk' [-Wimplicit-function-declaration] 109 | buffer = (char *) sbrk (monsize); | ^~~~ cygmon-gmon.c:112:7: error: implicit declaration of function 'write'; did you mean 'fwrite'? [-Wimplicit-function-declaration] 112 | write (2, MSG , sizeof(MSG)); | ^~~~~ | fwrite cygmon-gmon.c:115:3: error: implicit declaration of function 'bzero' [-Wimplicit-function-declaration] 115 | bzero (buffer, monsize); | ^~~~~ cygmon-gmon.c: In function '_mcount': cygmon-gmon.c:224:7: error: implicit declaration of function 'atexit' [-Wimplicit-function-declaration] 224 | atexit(_mcleanup); | ^~~~~~ cygmon-gmon.c:66:1: note: 'atexit' is defined in header ''; this is probably fixable by adding '#include ' 65 | #include "cygmon-gmon.h" +++ |+#include 66 | Signed-off-by: Vincent Mailhol --- libgloss/i386/cygmon-gmon.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libgloss/i386/cygmon-gmon.c b/libgloss/i386/cygmon-gmon.c index 3c15b70d3..ac3af30a6 100644 --- a/libgloss/i386/cygmon-gmon.c +++ b/libgloss/i386/cygmon-gmon.c @@ -62,6 +62,10 @@ static char sccsid[] = "@(#)gmon.c 5.3 (Berkeley) 5/22/91"; #include #endif +#include +#include +#include + #include "cygmon-gmon.h" /* From patchwork Wed Oct 29 06:58:27 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Mailhol X-Patchwork-Id: 122910 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 AF84C3858D2A for ; Wed, 29 Oct 2025 07:04:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AF84C3858D2A Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=YU/ZNcCB X-Original-To: newlib@sourceware.org Delivered-To: newlib@sourceware.org Received: from sea.source.kernel.org (sea.source.kernel.org [IPv6:2600:3c0a:e001:78e:0:1991:8:25]) by sourceware.org (Postfix) with ESMTPS id B61A13858D2A for ; Wed, 29 Oct 2025 06:58:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B61A13858D2A Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B61A13858D2A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2600:3c0a:e001:78e:0:1991:8:25 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1761721136; cv=none; b=pB6pVroZKOOyCqbGt9Xik8z1GI54Y81qp8rwHRe59BHeR73KAut+gldj1WNNAXIuv2l1sW0WMRoeRxQoj9+sxVTiQEiGz3e7BvFdQ2SIx7pDFo5NUHc3RKVjl8gMh7JAq8vQYSfGwSc6V0zbIltsxpGPP265iUbAzTTwgWOk+1M= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1761721136; c=relaxed/simple; bh=9pfd1UpaEhiBXAfkL/M7UArZHa4Y4GdKbuQaci/meWk=; h=DKIM-Signature:From:Date:Subject:MIME-Version:Message-Id:To; b=kG7k4garO+WhXW+ddWY+k8VOjqJXF0svGc2q/ntxlbPW0PbD7d00PM5r0ClMV03TaFH11aKyJcT28xRzUI7aQxRIBZ5kCUsdpGWSu3bdXcBlDGSHmcIs21I1YBp9yG+W3sVQLauX4LW0RcdEU8TmgHyE15LY3PJf/RoZCHd/BEQ= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B61A13858D2A Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 0905045486 for ; Wed, 29 Oct 2025 06:58:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1FD9FC4CEFB; Wed, 29 Oct 2025 06:58:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1761721135; bh=9pfd1UpaEhiBXAfkL/M7UArZHa4Y4GdKbuQaci/meWk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=YU/ZNcCBeLLACarhlFFKdT1bNhcgZDdUojOumK/yCxeSsgauZGA62yc2ypXwPuzZX 4CJsJ6FlNaSpqltrnE1rPT0sjxofflYiRtlgfI+sCJ+osq+RA4GrZJ0d12MMp5e0ci AZoRXNw3NFTX8t0hT5FIgzRWmoPzLFHUWZYCaQppp+dTP/eRk1M4cl2TV/wVNqBw33 CwS7hw7nkD+nmR1OT0ncHjA1oU9KenkyTbhZRGnOmgp9QU/PZ/h528CnfbcZFFnrcP HE0grMePHQOo4dXBtz+Jm/PZW9LWyVbA58LMFOxCvot80zKY7/2Yc7gKTP6HUnNhML mvuKyxZ9lYq3A== From: Vincent Mailhol Date: Wed, 29 Oct 2025 07:58:27 +0100 Subject: [PATCH 2/6] libgloss: i386: cygmon-gmon.c: add profil() prototype MIME-Version: 1.0 Message-Id: <20251029-fix-libgloss-i386-compile-issues-v1-2-26edcb02f69c@kernel.org> References: <20251029-fix-libgloss-i386-compile-issues-v1-0-26edcb02f69c@kernel.org> In-Reply-To: <20251029-fix-libgloss-i386-compile-issues-v1-0-26edcb02f69c@kernel.org> To: newlib@sourceware.org Cc: Vincent Mailhol X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=1057; i=mailhol@kernel.org; h=from:subject:message-id; bh=9pfd1UpaEhiBXAfkL/M7UArZHa4Y4GdKbuQaci/meWk=; b=owGbwMvMwCV2McXO4Xp97WbG02pJDJmMu2W1Uv7JXsl9J2+95lzVvb37lH90eW9NM7y0+laJV +J8HtafHaUsDGJcDLJiiizLyjm5FToKvcMO/bWEmcPKBDKEgYtTACZSEsXwv2B31dVQoRzWYo71 5mtDprFztxXZ70kwiHvBOal9w90MTkaGs3/4XjM/uzwxec6alr/agQmFXp9tGf5InZladzqrIvk 3CwA= X-Developer-Key: i=mailhol@kernel.org; a=openpgp; fpr=ED8F700574E67F20E574E8E2AB5FEB886DBB99C2 X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, 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 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 Add the prototype of profil() to resolve below GCC error: cygmon-gmon.c: In function 'moncontrol': cygmon-gmon.c:349:7: error: implicit declaration of function 'profil' [-Wimplicit-function-declaration] 349 | profil((unsigned short *)(sbuf + sizeof(struct phdr)), | ^~~~~~ Note that unistd.h in which profil() is normally present is not sufficient here because newlib's unistd.h does not provide it. Signed-off-by: Vincent Mailhol --- libgloss/i386/cygmon-gmon.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libgloss/i386/cygmon-gmon.c b/libgloss/i386/cygmon-gmon.c index ac3af30a6..7d0697852 100644 --- a/libgloss/i386/cygmon-gmon.c +++ b/libgloss/i386/cygmon-gmon.c @@ -68,6 +68,9 @@ static char sccsid[] = "@(#)gmon.c 5.3 (Berkeley) 5/22/91"; #include "cygmon-gmon.h" +int profil(unsigned short *tampon, size_t taille_tampon, + size_t offset, unsigned int echelle); + /* * froms is actually a bunch of unsigned shorts indexing tos */ From patchwork Wed Oct 29 06:58:28 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Mailhol X-Patchwork-Id: 122907 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 A33313858C30 for ; Wed, 29 Oct 2025 07:00:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A33313858C30 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=tcf/Mtjv X-Original-To: newlib@sourceware.org Delivered-To: newlib@sourceware.org Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by sourceware.org (Postfix) with ESMTPS id D88333858CD9 for ; Wed, 29 Oct 2025 06:58:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D88333858CD9 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D88333858CD9 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=172.234.252.31 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1761721137; cv=none; b=bW3aO3TRb1mRqX8r8ZDFCG3xng7PhXTB8T4nwe4prE9cLTtdPhh5uHrGvO09atSbHHzD2jjm5b31FwMo4efxivk64qshjvdett9PMiyOKEMBKeOYfKFOpWf3EiN0RpQuIQhziL2ffj1YIel34kqzJgTDroEp8ZlQ20qV1HuTHk4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1761721137; c=relaxed/simple; bh=nv5tUbprzYIVzM7Xv+hEvNTzXRDoxYRo9w9yfkZuZak=; h=DKIM-Signature:From:Date:Subject:MIME-Version:Message-Id:To; b=gKPwrt77pbAwnOBpGmTzm/l0uQ4qAQkXi1bxxeCJqifofUgY7eN8D83lQYMI1lPwtaM1kXJ5puGoEsFhU32pml2TxV31D2KMBKWDviKeNCFqibC5T/co5s5v3BaqAmrd5hAa0NxK0LSJr61YOmLnA9kj33boiRuJ4FdXosNG3Zg= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D88333858CD9 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 4AFE8442EF for ; Wed, 29 Oct 2025 06:58:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 55396C4CEFB; Wed, 29 Oct 2025 06:58:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1761721137; bh=nv5tUbprzYIVzM7Xv+hEvNTzXRDoxYRo9w9yfkZuZak=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=tcf/MtjvGyL4FqqjtDZfPidrUZmrU/w8LMHE7rQkAOFdSc3jJihCX1uCOr/VLCzA5 MFQpAyD0Fji7FbVX+uBiWeFjP7aKY9koy72jPrucf1REDXv8xrhQAl3zYLLE4w6RGN njnq4V5ghfFZ69zd8ubR+LN6eq2EjP+ANFb0iy/YqzDVcdXCg5tyHJpb8ZSkxhnrx5 HJW6W1QtoXKG2jNFn00n0USd9N+1cbd6+HAX5tNnWeRQURBsGUGRSh2jYkJ7OP/Gfy njQzaU8qStHNY+5+kafE+J+draZkCw7TKgkn/lWEKlyjpaBAlqliEhwTZYS2U1oDT0 1wCUwDYQ9kwPw== From: Vincent Mailhol Date: Wed, 29 Oct 2025 07:58:28 +0100 Subject: [PATCH 3/6] libgloss: i386: cygmon-gmon.c: make moncontrol() visible to its users MIME-Version: 1.0 Message-Id: <20251029-fix-libgloss-i386-compile-issues-v1-3-26edcb02f69c@kernel.org> References: <20251029-fix-libgloss-i386-compile-issues-v1-0-26edcb02f69c@kernel.org> In-Reply-To: <20251029-fix-libgloss-i386-compile-issues-v1-0-26edcb02f69c@kernel.org> To: newlib@sourceware.org Cc: Vincent Mailhol X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=2076; i=mailhol@kernel.org; h=from:subject:message-id; bh=nv5tUbprzYIVzM7Xv+hEvNTzXRDoxYRo9w9yfkZuZak=; b=owGbwMvMwCV2McXO4Xp97WbG02pJDJmMuxUkqjPtz/PksR6RFv2Y+na59p11+zPvc10LWy+1Y c26c0nqHaUsDGJcDLJiiizLyjm5FToKvcMO/bWEmcPKBDKEgYtTACaSn8Hwz8T4toXkyWPZnC+f uHhyii7f0HbZ8Mg32QuShg8eztrUycnIMHP6NrsnAVfehgvP2lr2wXjlOh8muz+J4RXTg/Y8Oyt ozwIA X-Developer-Key: i=mailhol@kernel.org; a=openpgp; fpr=ED8F700574E67F20E574E8E2AB5FEB886DBB99C2 X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_NONE, 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 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 Move moncontrol() up so that it becomes visible to the two functions which are using it: monstartup() and _mcleanup(). This resolves below GCC errors: cygmon-gmon.c: In function 'monstartup': cygmon-gmon.c:165:3: error: implicit declaration of function 'moncontrol' [-Wimplicit-function-declaration] 165 | moncontrol (1); | ^~~~~~~~~~ While at it, change the function declaration style of moncontrol() from K&R to ISO C and remove any trailing spaces in that function. Signed-off-by: Vincent Mailhol --- libgloss/i386/cygmon-gmon.c | 50 ++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/libgloss/i386/cygmon-gmon.c b/libgloss/i386/cygmon-gmon.c index 7d0697852..88bdf251c 100644 --- a/libgloss/i386/cygmon-gmon.c +++ b/libgloss/i386/cygmon-gmon.c @@ -92,6 +92,31 @@ static int s_scale; extern int errno; +/* + * Control profiling + * profiling is what mcount checks to see if + * all the data structures are ready. + */ +void +moncontrol(int mode) +{ + if (mode) + { + /* start */ + profil((unsigned short *)(sbuf + sizeof(struct phdr)), + ssiz - sizeof(struct phdr), + (int)s_lowpc, s_scale); + + profiling = 0; + } + else + { + /* stop */ + profil((unsigned short *)0, 0, 0, 0); + profiling = 3; + } +} + int monstartup(lowpc, highpc) char *lowpc; @@ -338,28 +363,3 @@ overflow: write (2, TOLIMIT, sizeof(TOLIMIT)); goto out; } - -/* - * Control profiling - * profiling is what mcount checks to see if - * all the data structures are ready. - */ -moncontrol(mode) - int mode; -{ - if (mode) - { - /* start */ - profil((unsigned short *)(sbuf + sizeof(struct phdr)), - ssiz - sizeof(struct phdr), - (int)s_lowpc, s_scale); - - profiling = 0; - } - else - { - /* stop */ - profil((unsigned short *)0, 0, 0, 0); - profiling = 3; - } -} From patchwork Wed Oct 29 06:58:29 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Mailhol X-Patchwork-Id: 122911 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 65B9D3858D20 for ; Wed, 29 Oct 2025 07:05:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 65B9D3858D20 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=cwSfv6le X-Original-To: newlib@sourceware.org Delivered-To: newlib@sourceware.org Received: from sea.source.kernel.org (sea.source.kernel.org [IPv6:2600:3c0a:e001:78e:0:1991:8:25]) by sourceware.org (Postfix) with ESMTPS id 086C03858C83 for ; Wed, 29 Oct 2025 06:58:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 086C03858C83 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 086C03858C83 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2600:3c0a:e001:78e:0:1991:8:25 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1761721139; cv=none; b=q9ZfPun9COPukWFr30P708GaspUyDaELBsWWxDojpFdofTsG8Jt3Yv82CgMZBJSdVedgbPprcxW1oJkPWau4WrcWEJVzDnaYPwWWj+WIOrsmp+68VHJxeD3cZKCS0s4wCeLo0w/XNyxHtQ1HiJwPmZaRZTFtdp6FbwGTW7j2BMQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1761721139; c=relaxed/simple; bh=D/yvME0C/lUB0n4uO/wiGotLvGx4e5gqHnE2H1bZQLk=; h=DKIM-Signature:From:Date:Subject:MIME-Version:Message-Id:To; b=kf4n/E5rY2cEKvtduu+1KeAV5U6lZeAxgxJ812MOVQDjfBGalFKaz6TbmvvAr3o3jcMvxBl233zkU51pSvLmTiJHWv83liVmLI0zz3feeRTsaPucQYOBkfff7de0/fOYJrddpOqbJKGkEbEi6aVZZFM3lpGH+XFYUBN4ccl92Yo= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 086C03858C83 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 5AA2A45802 for ; Wed, 29 Oct 2025 06:58:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9EDBFC4CEFB; Wed, 29 Oct 2025 06:58:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1761721138; bh=D/yvME0C/lUB0n4uO/wiGotLvGx4e5gqHnE2H1bZQLk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=cwSfv6levgjL57LvrplISPK4W2ygsHGaW91ia+tkFdD5N3n9EPBmnQ/Ym/koX4Xc0 ARfdL24+pLLPpvu7gZiWjCbF7VkwAkwLRK/hr2rS15Rx5VkYP20Byl0NK14iLhvCIk 97WavvAqp/C+SgFQEB2nQReQC9Ve/o9BDFZzakz757opXzQ5+9qj31sf9UDV5h1g4e ltEyg+yzFFlTMud+HER1/PAxZENi8Yie5fesdfu8VTBdrM0I9EVQA+EV2GLRDT/cpf I0U/GpKEUdjgdmNDKHQohZJJPkYQR3Yzri8qnlONLkIkItKEQ4JCxMaFsz3aYsg4+9 2rWZ/i8klZPiA== From: Vincent Mailhol Date: Wed, 29 Oct 2025 07:58:29 +0100 Subject: [PATCH 4/6] libgloss: i386: move profil_write() from cygmon-salib.c to cygmon-gmon.c MIME-Version: 1.0 Message-Id: <20251029-fix-libgloss-i386-compile-issues-v1-4-26edcb02f69c@kernel.org> References: <20251029-fix-libgloss-i386-compile-issues-v1-0-26edcb02f69c@kernel.org> In-Reply-To: <20251029-fix-libgloss-i386-compile-issues-v1-0-26edcb02f69c@kernel.org> To: newlib@sourceware.org Cc: Vincent Mailhol X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=2396; i=mailhol@kernel.org; h=from:subject:message-id; bh=D/yvME0C/lUB0n4uO/wiGotLvGx4e5gqHnE2H1bZQLk=; b=owGbwMvMwCV2McXO4Xp97WbG02pJDJmMu1X4hPSstRg8D8Xdc2WdJL9c58qDMP0L2Sy5F+Wi4 t6nlx/vKGVhEONikBVTZFlWzsmt0FHoHXboryXMHFYmkCEMXJwCMJF2FYa/Ur16Gf+ad2UeVnm0 N3U76xuB6TNKLq+7Wdqe7fftpYDbb4a/Mhc14nIdzdbH6rO5rlJulvFJ+Xz1w/HqyU8LUk5eXPC TFQA= X-Developer-Key: i=mailhol@kernel.org; a=openpgp; fpr=ED8F700574E67F20E574E8E2AB5FEB886DBB99C2 X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, 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 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 _mcleanup() uses profil_write(). However, there is no prior declaration of profil_write() in cygmon-gmon.c leading to below GCC error: cygmon-gmon.c: In function '_mcleanup': cygmon-gmon.c:203:3: error: implicit declaration of function 'profil_write' [-Wimplicit-function-declaration] 203 | profil_write (1, sbuf, ssiz); | ^~~~~~~~~~~~ As a matter of facts, profil_write() is never used elsewhere than cygmon-gmon.c. Move profil_write() from cygmon-salib.c to cygmon-gmon.c. Add the required fcntl.h include. Also, change the type of profil_write()'s buffer parameter from char * to void * to prevent an incompatible pointer type warning. Finally, mark profil_write() as being a static function to make it clear that it is not used outside of the translation unit. Signed-off-by: Vincent Mailhol --- libgloss/i386/cygmon-gmon.c | 20 ++++++++++++++++++++ libgloss/i386/cygmon-salib.c | 19 ------------------- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/libgloss/i386/cygmon-gmon.c b/libgloss/i386/cygmon-gmon.c index 88bdf251c..778dbd76d 100644 --- a/libgloss/i386/cygmon-gmon.c +++ b/libgloss/i386/cygmon-gmon.c @@ -62,6 +62,7 @@ static char sccsid[] = "@(#)gmon.c 5.3 (Berkeley) 5/22/91"; #include #endif +#include #include #include #include @@ -193,6 +194,25 @@ monstartup(lowpc, highpc) moncontrol (1); } +static void +profil_write (int type, void *buffer, int len) +{ + static int des = -1; + + if (des < 0) + { + des = open ("gmon.out", O_WRONLY | O_CREAT | O_TRUNC, 0644); + } + if (len == 0) + { + close (des); + } + else + { + write (des, buffer, len); + } +} + void _mcleanup() { diff --git a/libgloss/i386/cygmon-salib.c b/libgloss/i386/cygmon-salib.c index b4a4d34b3..734afe9d6 100644 --- a/libgloss/i386/cygmon-salib.c +++ b/libgloss/i386/cygmon-salib.c @@ -161,22 +161,3 @@ __do_global_dtors () } } #endif - -void -profil_write (int type, char *buffer, int len) -{ - static int des = -1; - - if (des < 0) - { - des = open ("gmon.out", O_WRONLY | O_CREAT | O_TRUNC, 0644); - } - if (len == 0) - { - close (des); - } - else - { - write (des, buffer, len); - } -} From patchwork Wed Oct 29 06:58:30 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Mailhol X-Patchwork-Id: 122908 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 973EA3858CD1 for ; Wed, 29 Oct 2025 07:01:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 973EA3858CD1 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=G8+A9ZhL X-Original-To: newlib@sourceware.org Delivered-To: newlib@sourceware.org Received: from sea.source.kernel.org (sea.source.kernel.org [IPv6:2600:3c0a:e001:78e:0:1991:8:25]) by sourceware.org (Postfix) with ESMTPS id 211873858C42 for ; Wed, 29 Oct 2025 06:59:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 211873858C42 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 211873858C42 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2600:3c0a:e001:78e:0:1991:8:25 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1761721140; cv=none; b=XoLHM8kI4dUAVpuIZGd72mqFlofI19n9i6XUAoECIPFdNQ1Dneps84kaGZnda71JMiGtiupVXdp9QoI4hSkomfbNE7xqWgcWGb07EFD9C5P/hKiJzh5o50Krg2l7HUwT/vBXnJmg+n7suwGuAxhNvRGSeiZMjNOZ8lXiPZyjtqM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1761721140; c=relaxed/simple; bh=8jpL3Ggc+bbHbMOf4OAtcSW8LFWCeUD46brVZTxe1cc=; h=DKIM-Signature:From:Date:Subject:MIME-Version:Message-Id:To; b=LL6qbsiMpqYX12KscZHwJuyp10NsFBan1Cb4kl13j1dSmVAiQiLiRWZoYxTkyjuSVkwMHYnBYtoFtIP+z9Yne06uzWQFmgGm4h+Ho8sIEwAEswAqGa7f1wEJsKeFrsvp5NVMlJvrAEWI5mK5vQ30WUITI2AgI80Wd4G2HfQSoiI= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 211873858C42 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 7A4CA45486 for ; Wed, 29 Oct 2025 06:58:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AC60EC4CEF7; Wed, 29 Oct 2025 06:58:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1761721139; bh=8jpL3Ggc+bbHbMOf4OAtcSW8LFWCeUD46brVZTxe1cc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=G8+A9ZhL95YYb5EhNLHurMVAkW/h7+Nl+qjR6lhyMKzwgzZahpRvSq92ZL9m1Urq/ vJYgrv+eWQJtenhiJ+QM5u1WOzcgjkwI8fK/ZHGfzwr+bTSz48HGH4kSiZeyc8WvlG 8mIHUR9X8tI7clrHWHPv9frikwIX0hYqS5n1MABerIVdDDdzVBB/pNBwz1Ym0k9/IN HUJTYbqpiP62mhvI7pHBh87xwaDl21bPNm5TSAMtUufyMUb8X1Kh14j3crXRVg/B/Z pTjBbG+UjGehgatP1V2YAePz0GWfHG7mC41EEcHuUeve43qNUSd2dETHQTt92C+5SS lxvpGLQvztuqw== From: Vincent Mailhol Date: Wed, 29 Oct 2025 07:58:30 +0100 Subject: [PATCH 5/6] libgloss: i386: cygmon-gmon.c: add functions return type MIME-Version: 1.0 Message-Id: <20251029-fix-libgloss-i386-compile-issues-v1-5-26edcb02f69c@kernel.org> References: <20251029-fix-libgloss-i386-compile-issues-v1-0-26edcb02f69c@kernel.org> In-Reply-To: <20251029-fix-libgloss-i386-compile-issues-v1-0-26edcb02f69c@kernel.org> To: newlib@sourceware.org Cc: Vincent Mailhol X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=1365; i=mailhol@kernel.org; h=from:subject:message-id; bh=8jpL3Ggc+bbHbMOf4OAtcSW8LFWCeUD46brVZTxe1cc=; b=owGbwMvMwCV2McXO4Xp97WbG02pJDJmMu9XcrjhaZjD9nZR79PO/qtOf11prqz8Ocpo+Y9LBj C+ST6xfdpSyMIhxMciKKbIsK+fkVugo9A479NcSZg4rE8gQBi5OAZhI/nOGf8Z3X167OzEsUvje ptf3zQJ3LC41qT3qmLM26HZy/2Jj7fcM/7Rnegv4HSqTlN16dzFTiZS514d062SZrmPc1jb2bbr vOAA= X-Developer-Key: i=mailhol@kernel.org; a=openpgp; fpr=ED8F700574E67F20E574E8E2AB5FEB886DBB99C2 X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, 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 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 Functions _mcount(), _etext() and _ftext() lack a return type leading to below GCC errors: cygmon-gmon.c:246:1: error: return type defaults to 'int' [-Wimplicit-int] 246 | _mcount() | ^~~~~~~ cygmon-gmon.c: In function '_mcount': cygmon-gmon.c:268:14: error: type defaults to 'int' in declaration of '_etext' [-Wimplicit-int] 268 | extern _etext(); | ^~~~~~ cygmon-gmon.c:269:14: error: type defaults to 'int' in declaration of '_ftext' [-Wimplicit-int] 269 | extern _ftext(); | ^~~~~~ Add the return type to all these functions. Signed-off-by: Vincent Mailhol --- libgloss/i386/cygmon-gmon.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libgloss/i386/cygmon-gmon.c b/libgloss/i386/cygmon-gmon.c index 778dbd76d..3c2f07fed 100644 --- a/libgloss/i386/cygmon-gmon.c +++ b/libgloss/i386/cygmon-gmon.c @@ -247,6 +247,7 @@ _mcleanup() static char already_setup = 0; +void _mcount() { register char *selfpc; @@ -269,8 +270,8 @@ _mcount() if (! already_setup) { - extern _etext(); - extern _ftext(); + extern char _etext(); + extern char _ftext(); already_setup = 1; monstartup(_ftext, _etext); atexit(_mcleanup); From patchwork Wed Oct 29 06:58:31 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Mailhol X-Patchwork-Id: 122909 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 706433858CB6 for ; Wed, 29 Oct 2025 07:02:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 706433858CB6 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=bby/RMp6 X-Original-To: newlib@sourceware.org Delivered-To: newlib@sourceware.org Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by sourceware.org (Postfix) with ESMTPS id 1DC933858C40 for ; Wed, 29 Oct 2025 06:59:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1DC933858C40 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1DC933858C40 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=172.234.252.31 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1761721141; cv=none; b=JOMD4ImF6QZfW15mVWEXh6MgQQHEFpwLCY9KqTI/kn3RKP6l7gFe6auOupqUqJTltbnfjvi2uekU3KEglQqDeOsESqjFQHWusOqEGbdzH+LFXO/UpMQZslu2+hqUc5A8d0nya2SFHixvtwxF02vZ+DBfgjT8yyLaM40VvVAHYhQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1761721141; c=relaxed/simple; bh=1l22kHAdmG+wr9V+mGLp0SSc1ZYHbEOrr8myrqRuhOw=; h=DKIM-Signature:From:Date:Subject:MIME-Version:Message-Id:To; b=FNfh3S3FYODUTAtrpNhc1Qr9h9xRpK0kJZ31DpYiwxSSJU4xZMh2Fl+VQJM+ssKfPiRcXzKOpzaiY1YvWnTT2dFtUh4BZ5+rabg6BTBCmR83gMrxcusGGPuCZPnsWenD/BwFVOZPQKXb5AwSoGMjaN/OVbVXQzKti8W9Q2tesJw= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1DC933858C40 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 83F5644EF5 for ; Wed, 29 Oct 2025 06:59:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CAFDFC4CEF7; Wed, 29 Oct 2025 06:58:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1761721140; bh=1l22kHAdmG+wr9V+mGLp0SSc1ZYHbEOrr8myrqRuhOw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=bby/RMp6sZM8rX50StQjU8Rxi8GnOGBkY+BZkbaqcWr9z7QEvLNs7IuUJ5zFdEP3C zzwrkcMdeexgRartVbhYgaK5orvk18aTmx5yripGqw+ufUWnqwmWTpY07eLhgPfUVD fo3Qhx/aTYcHSfK8rHNf/uuSZZxA95/bVYYaLFeKezo3xTWMLqjk/gZGjHNb6mHYln +yEuluM4BUF3BkgWXODYD0uVPQNHIMWYaWvd3wAtMU0lvYcvlm1iDU6XyFiFlqTfmF KdmvDNiZ6fG3edhkkkQQ5zklrk4WQfHPgX31D5o5LX7pp+BINGpYIUExnkMw94JLki eql2ZSaTWX2ow== From: Vincent Mailhol Date: Wed, 29 Oct 2025 07:58:31 +0100 Subject: [PATCH 6/6] libgloss: i386: cygmon-gmon.c: fix _mcount() return type MIME-Version: 1.0 Message-Id: <20251029-fix-libgloss-i386-compile-issues-v1-6-26edcb02f69c@kernel.org> References: <20251029-fix-libgloss-i386-compile-issues-v1-0-26edcb02f69c@kernel.org> In-Reply-To: <20251029-fix-libgloss-i386-compile-issues-v1-0-26edcb02f69c@kernel.org> To: newlib@sourceware.org Cc: Vincent Mailhol X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=1721; i=mailhol@kernel.org; h=from:subject:message-id; bh=1l22kHAdmG+wr9V+mGLp0SSc1ZYHbEOrr8myrqRuhOw=; b=owGbwMvMwCV2McXO4Xp97WbG02pJDJmMuzX3fbVuZmJ0Cb66zGdPf5BP5pUJT266hln13dLaE /xOYsvpjlIWBjEuBlkxRZZl5ZzcCh2F3mGH/lrCzGFlAhnCwMUpABP5VsPwi7kniG3PA66IHEWR Ztt1v/afubnmsvVLTZZr/T9Zt/EzRTL80w+w5pjH3O4Ut0mZ6dOGx0WPF5u9TrNZ9OLIx6c/63c f5QYA X-Developer-Key: i=mailhol@kernel.org; a=openpgp; fpr=ED8F700574E67F20E574E8E2AB5FEB886DBB99C2 X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_NONE, 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 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 _mcount() is declared as returning an int, but in reality, it always returns void as shown by those GCC errors: cygmon-gmon.c: In function 'monstartup': cygmon-gmon.c:142:7: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch] 142 | return; | ^~~~~~ cygmon-gmon.c:118:1: note: declared here 118 | monstartup(lowpc, highpc) | ^~~~~~~~~~ cygmon-gmon.c:150:7: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch] 150 | return; | ^~~~~~ cygmon-gmon.c:118:1: note: declared here 118 | monstartup(lowpc, highpc) | ^~~~~~~~~~ cygmon-gmon.c:171:7: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch] 171 | return; | ^~~~~~ cygmon-gmon.c:118:1: note: declared here 118 | monstartup(lowpc, highpc) | ^~~~~~~~~~ cygmon-gmon.c:182:5: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch] 182 | return; | ^~~~~~ cygmon-gmon.c:118:1: note: declared here 118 | monstartup(lowpc, highpc) | ^~~~~~~~~~ Change monstartup()'s return type from int to void. Signed-off-by: Vincent Mailhol --- libgloss/i386/cygmon-gmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libgloss/i386/cygmon-gmon.c b/libgloss/i386/cygmon-gmon.c index 3c2f07fed..b6e2467b0 100644 --- a/libgloss/i386/cygmon-gmon.c +++ b/libgloss/i386/cygmon-gmon.c @@ -118,7 +118,7 @@ moncontrol(int mode) } } -int +void monstartup(lowpc, highpc) char *lowpc; char *highpc;