From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-170.mta0.migadu.com (out-170.mta0.migadu.com [91.218.175.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 E5F6E28B7FC for ; Wed, 11 Jun 2025 14:09:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749650952; cv=none; b=GbYwL4rquVkuHAm8ykMZ015uT8b8wXlP6YZFMy4vxQrATW48QBjKJkAfjxfziP5cLY+2UkLMLWK2xiXxcT4klN27Il3CSKxNM/HTfkB2+hPOwWAnf7asSjiC4BQ7uRtbd9sRCC/5h0glK+YiQ/eXYnj2YQMuVrbChSaGYpEyBdk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749650952; c=relaxed/simple; bh=4dqNwAQYmy0EGh2tN9SAQfO1hbjPMfrvLNgwoYO1F+s=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=OPMe0kGT5E5Jelc1OINx5cHf9tV7Fq/qxCRxa394grBePX8QMBPxAkItBx1YVB90Z3ypXeMlgzFC250OQQ+8sRwBTfMvZRgl3DE7UPuvOn+Ff5s1AVvtdCvZxrAVx95zU5h8o1X4Bfk2hkOqhUUcpZUp3rU2+ImgHouoLEx/AKU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=Odn9UwMv; arc=none smtp.client-ip=91.218.175.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="Odn9UwMv" Date: Wed, 11 Jun 2025 16:09:01 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1749650945; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cKUNapIic7qcB73602nGRDfvP380aXrb6L7bSN67WMc=; b=Odn9UwMvxjKy/QQm+4jej/I3CNptvQ3o060oWmenfpkhbV/QGd7dk84HzyM3XF6VsjI+V5 MsNXgE6jzkLmgABa+TWcBWwuz0Q6myVpuB6QFUymOBZYiOLNOVuKXvIvgxaqlclbiHSwSo C0TZQfzUuQkfMQT2/WnZmpS0J3HpN+Q= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Nicolas Schier To: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= Cc: Masahiro Yamada , Nathan Chancellor , Andrew Morton , Willy Tarreau , Thomas =?utf-8?Q?Wei=C3=9Fschuh?= , Brendan Higgins , David Gow , Rae Moar , Shuah Khan , Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Christophe Leroy , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, workflows@vger.kernel.org Subject: Re: [PATCH v3 04/16] kbuild: userprogs: add nolibc support Message-ID: <20250611-horned-prudent-saluki-b5a5df@l-nschier-aarch64> References: <20250611-kunit-kselftests-v3-0-55e3d148cbc6@linutronix.de> <20250611-kunit-kselftests-v3-4-55e3d148cbc6@linutronix.de> Precedence: bulk X-Mailing-List: workflows@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: <20250611-kunit-kselftests-v3-4-55e3d148cbc6@linutronix.de> Organization: AVM GmbH X-Migadu-Flow: FLOW_OUT On Wed, Jun 11, 2025 at 09:38:10AM +0200, Thomas Weißschuh wrote: > Userprogs are built with the regular kernel compiler $CC. > A kernel compiler does not necessarily contain a libc which is required > for a normal userspace application. > However the kernel tree does contain a minimal libc implementation > "nolibc" which can be used to build userspace applications. > > Introduce support to build userprogs against nolibc instead of the > default libc of the compiler, which may not exist. > > Signed-off-by: Thomas Weißschuh > > --- > This could probably be moved out of the generic kbuild makefiles. > I think the ergonimics would suffer and this functionality could be > used by other users of userprogs. > > Also this does currently not support out-of-tree builds. > For that tools/include/nolibc/*.h and usr/include/*.h would need to be > installed into the build directory. Thanks! Reviewed-by: Nicolas Schier Probably overkill, but might it make sense to abort *-nolibc compilation requests for out-of-tree builds? Kind regards, Nicolas