From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-8faa.mail.infomaniak.ch (smtp-8faa.mail.infomaniak.ch [83.166.143.170]) (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 CC4B135CB7E for ; Thu, 12 Feb 2026 14:51:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=83.166.143.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770907876; cv=none; b=X69/PL5cvZEgIapAsJwBRuzlnXWgM6SdD1hAmaIeC/7L/AUUj/a8eXpOteH8j3t+/3sCIZPYrkb4yn2YDbdg2vzx9sbtg1fk36K3FpCPqdqYbbLF4HtkSrjmOMF9l1zk1r6PhvhVfMw0QbkzkOrJRM+y2QGb0tPse8T3pw0EyOo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770907876; c=relaxed/simple; bh=yV+qGryzCv5LdVIdZObnyl+TqBvoZRBq/s7BwmvEucY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=aC9TplW4pdyZI9HxgFHfTapBaXSFA5VC0jtznykjxIHw5v60dmIV6DeqX3nEF4iLYrM6QoAHYqasJujDW7Cwhem3/fUJghonwjUKwBDF57fpi/yToBHb0kfrj3p6c9DsHjbuEsFyzsSiz/PNju1tdlEzl22yGhFJ896xsLgzP/c= 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=VfpmNuzq; arc=none smtp.client-ip=83.166.143.170 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="VfpmNuzq" 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 4fBdXR4dDGzgQh; Thu, 12 Feb 2026 15:51:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=digikod.net; s=20191114; t=1770907863; bh=CO1ZykXZY4zJvGlWonzeMkNhR0m/da9fetsI6SBQSIo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VfpmNuzqAWs6ximhaxzWPLghgTTt/0jeQoJ5VFh4I6Wqum0fpHt7KXCz9agYPU1bP SKHhpuNDMKkzd36eJwjcudqnYF9xhOC+TviDKsq3NM+vHPLU8FE5TKnjNezHKtz4QS +fNkjznu5n3wuLwkBU9FjHnZwonM27gCyHvN3TKE= Received: from unknown by smtp-3-0001.mail.infomaniak.ch (Postfix) with ESMTPA id 4fBdXR0RTCzy0n; Thu, 12 Feb 2026 15:51:02 +0100 (CET) Date: Thu, 12 Feb 2026 15:50:58 +0100 From: =?utf-8?Q?Micka=C3=ABl_Sala=C3=BCn?= To: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@cloudflare.com, Nathan Chancellor , Nicolas Schier , stable@vger.kernel.org Subject: Re: [PATCH v1] kbuild: Fix CC_CAN_LINK detection Message-ID: <20260212.Eich4Liesaiv@digikod.net> References: <20260212133544.1331437-1-mic@digikod.net> <20260212151347-6f19b408-f22b-4ecb-9ce5-bd4e01e06743@linutronix.de> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20260212151347-6f19b408-f22b-4ecb-9ce5-bd4e01e06743@linutronix.de> X-Infomaniak-Routing: alpha On Thu, Feb 12, 2026 at 03:15:47PM +0100, Thomas Weißschuh wrote: > On Thu, Feb 12, 2026 at 02:35:43PM +0100, Mickaël Salaün wrote: > > 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 ‘main’: > > :4:9: error: zero-length gnu_printf format string [-Werror=format-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ßschuh > > Cc: stable@vger.kernel.org > > Fixes: d81d9d389b9b ("kbuild: don't enable CC_CAN_LINK if the dummy program generates warnings") > > Thanks! > > Reviewed-by: Thomas Weißschuh > > In my GCC 15.2 this warning is not enabled by default. Some for me, but it is the case with GCC 13.3.0 on Ubuntu 24 LTS. > > > Signed-off-by: Mickaël Salaün > > --- > > 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 /dev/null >/dev/null 2> > > #include > > int main(void) > > { > > - printf(""); > > + printf("\n"); > > return 0; > > } > > END > > -- > > 2.53.0 > >