From nobody Thu Apr 2 18:47:37 2026 Received: from smtp-bc0c.mail.infomaniak.ch (smtp-bc0c.mail.infomaniak.ch [45.157.188.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9010B29B777 for ; Thu, 12 Feb 2026 13:36:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.157.188.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770903369; cv=none; b=qHoQDvZaKbuGprzCkRymNZRqOyrDPs59BkFhJkuG+svBNWJbznOcEDoFa8vBbqgJGzHsrovZmp4NhmC72EnJIVn7qGfK6+n/5huoCdrEkzxsNPIJWqGi6ygSifNprda/aFTpx8oSsjz6qo4kM67iF7beMLcdT6cV7FMmxyhKgg4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770903369; c=relaxed/simple; bh=8TPMJycoHl+oBPNXwCoiW6EddB5LmvNhJXZy2Logh0k=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=jF5X0XWah1lsFZxEppt0zUN8oyagh26HVxgLkmj3GWpiatnwzKhbzgQj0K12RoZgdQjaNYzMdJ4GZRF23FUTWCjju6mAeQp3fenVNZC81E1M1kHKQyz3smJQXF6QLOTPyrzX5ZRYgyMHWwxAFlzjVK2hf2IvdH2FzgGoCwqjMf4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=digikod.net; spf=pass smtp.mailfrom=digikod.net; dkim=pass (1024-bit key) header.d=digikod.net header.i=@digikod.net header.b=liNNDiTX; arc=none smtp.client-ip=45.157.188.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=digikod.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=digikod.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=digikod.net header.i=@digikod.net header.b="liNNDiTX" Received: from smtp-3-0001.mail.infomaniak.ch (smtp-3-0001.mail.infomaniak.ch [10.4.36.108]) by smtp-3-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4fBbsq40m6zhFr; Thu, 12 Feb 2026 14:35:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=digikod.net; s=20191114; t=1770903359; bh=xEyAvA0ZbsWEuMtKRmEo1JvZwxg/DQJkx+6k06T3DME=; h=From:To:Cc:Subject:Date:From; b=liNNDiTXnPwx9FhtwNA/ajVywOyoHP4yNYosdARL/mSxCFzInCbThT03hDVDqZehK +mfdBuvDJU0GcH87yvvMVa7MsG7BkMz+MqL1FNPqdZgxnaMv0eMMF+B1QkhOhZjz2A OwL+aRTMeHHo7Br4F8rtgcK1VD5ycaxm8ObdSi9E= Received: from unknown by smtp-3-0001.mail.infomaniak.ch (Postfix) with ESMTPA id 4fBbsq01TpzTmJ; Thu, 12 Feb 2026 14:35:58 +0100 (CET) From: =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= To: linux-kbuild@vger.kernel.org Cc: =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= , linux-kernel@vger.kernel.org, kernel-team@cloudflare.com, Nathan Chancellor , Nicolas Schier , =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= , stable@vger.kernel.org Subject: [PATCH v1] kbuild: Fix CC_CAN_LINK detection Date: Thu, 12 Feb 2026 14:35:43 +0100 Message-ID: <20260212133544.1331437-1-mic@digikod.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Infomaniak-Routing: alpha Most samples cannot be build on some environments because they depend on CC_CAN_LINK, which is set according to the result of scripts/cc-can-link.sh called by cc_can_link_user. Because cc-can-link.sh must now build without warning, it may fail because it is calling printf() with an empty string: + cat + gcc -m32 -Werror -Wl,--fatal-warnings -x c - -o /dev/null : In function =E2=80=98main=E2=80=99: :4:9: error: zero-length gnu_printf format string [-Werror=3Dforma= t-zero-length] cc1: all warnings being treated as errors Fix this warning and the samples build by actually printing something. Cc: Nathan Chancellor Cc: Nicolas Schier Cc: Thomas Wei=C3=9Fschuh Cc: stable@vger.kernel.org Fixes: d81d9d389b9b ("kbuild: don't enable CC_CAN_LINK if the dummy program= generates warnings") Signed-off-by: Micka=C3=ABl Sala=C3=BCn Reviewed-by: Nicolas Schier Reviewed-by: Thomas Wei=C3=9Fschuh --- scripts/cc-can-link.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cc-can-link.sh b/scripts/cc-can-link.sh index e67fd8d7b684..58dc7dd6d556 100755 --- a/scripts/cc-can-link.sh +++ b/scripts/cc-can-link.sh @@ -5,7 +5,7 @@ cat << "END" | $@ -Werror -Wl,--fatal-warnings -x c - -o /d= ev/null >/dev/null 2> #include int main(void) { - printf(""); + printf("\n"); return 0; } END --=20 2.53.0