From nobody Thu Dec 18 19:09:43 2025 Received: from smtp-bc0f.mail.infomaniak.ch (smtp-bc0f.mail.infomaniak.ch [45.157.188.15]) (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 0489619CC24 for ; Wed, 18 Dec 2024 11:58:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.157.188.15 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734523091; cv=none; b=HdsExipIXlqVUohGdFVx10mYLrQyVY8nXPr0n5fJGhJYTGS6vPDcYK48jFB831ta4iAeU1g1PcXjU8tgr0t+Wx9+8LBEOAX3wHTWQr1nqI0F1YUQiQb0I9iaB+H/Vtjv6amWbvsaZt4TV/vDcpPigkHyJ8fxSZIenZTWtb5pKj8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734523091; c=relaxed/simple; bh=bVQk1IH/oYmp2ISiAjJgs9fhUluBeTZ2boMdlRAm1X0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=ondoHQln2lWxbaF75g1u5qX041vw08tbTMFSfm67D/2zTwhYogiB5z0/8Snxi2KXLZo4pyqvlNmWuO2SqJCiuJuBvrQoH9gU5iwDHOm3RbEMyq18TrkKbgd9lI5OIKmID0KtQ/dc4DxSOAC1KW4y1Ui80OFdEr3dQEekUTnL/Tk= 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=zRbHESjN; arc=none smtp.client-ip=45.157.188.15 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="zRbHESjN" Received: from smtp-4-0000.mail.infomaniak.ch (smtp-4-0000.mail.infomaniak.ch [10.7.10.107]) by smtp-4-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4YCsTl5N3Fz5DQ; Wed, 18 Dec 2024 12:51:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=digikod.net; s=20191114; t=1734522699; bh=LBITfqfai7J37XOUwox6hatMirnCfP5i+juTnBH9htY=; h=From:To:Cc:Subject:Date:From; b=zRbHESjNAMyorCyUxpToqsVkVTb9pimoRoGs0s3pDSN3/nzFAbd0LCV7OY6Mgsy1j MVgvoWuJkO/M2vdvInk+sls7zzXfr49hylKMF/DljnGCFh6rraGLCeG8RiuFdF565M RZfQf7x3Ny5Ex2EhNSuKRVgUNkIqmxAj3LPC7PY8= Received: from unknown by smtp-4-0000.mail.infomaniak.ch (Postfix) with ESMTPA id 4YCsTk3xmFzCGS; Wed, 18 Dec 2024 12:51:38 +0100 (CET) From: =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= To: linux-kbuild@vger.kernel.org, linux-um@lists.infradead.org Cc: =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?q?G=C3=BCnther=20Noack?= , Anton Ivanov , Johannes Berg , Masahiro Yamada , Nathan Chancellor , Nicolas Schier , Richard Weinberger Subject: [PATCH v1] kbuild: Allow building of samples with UML Date: Wed, 18 Dec 2024 12:51:23 +0100 Message-ID: <20241218115126.264342-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 It's useful to build samples/* with UML and the only blocker is the artificial incompatibility with CONFIG_HEADERS_INSTALL. Allow the headers_install target with ARCH=3Dum, which then allow building samples (and tests using them) with UML too: printf 'CONFIG_SAMPLES=3Dy\nCONFIG_HEADERS_INSTALL=3Dy\nCONFIG_SAMPLE_LAN= DLOCK=3Dy\n' >.config make ARCH=3Dum olddefconfig headers_install make ARCH=3Dum samples/landlock/ Cc: Anton Ivanov Cc: Johannes Berg Cc: Masahiro Yamada Cc: Nathan Chancellor Cc: Nicolas Schier Cc: Richard Weinberger Fixes: 1b620d539ccc ("kbuild: disable header exports for UML in a straightf= orward way") Signed-off-by: Micka=C3=ABl Sala=C3=BCn Reviewed-by: Nicolas Schier --- Makefile | 1 - lib/Kconfig.debug | 1 - 2 files changed, 2 deletions(-) diff --git a/Makefile b/Makefile index e5b8a8832c0c..6e2cce16a2a3 100644 --- a/Makefile +++ b/Makefile @@ -1355,7 +1355,6 @@ hdr-inst :=3D -f $(srctree)/scripts/Makefile.headersi= nst obj =20 PHONY +=3D headers headers: $(version_h) scripts_unifdef uapi-asm-generic archheaders archscr= ipts - $(if $(filter um, $(SRCARCH)), $(error Headers not exportable for UML)) $(Q)$(MAKE) $(hdr-inst)=3Dinclude/uapi $(Q)$(MAKE) $(hdr-inst)=3Darch/$(SRCARCH)/include/uapi =20 diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index f3d723705879..fac1208f48e4 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -473,7 +473,6 @@ config READABLE_ASM =20 config HEADERS_INSTALL bool "Install uapi headers to usr/include" - depends on !UML help This option will install uapi headers (headers exported to user-space) into the usr/include directory for use during the kernel build. --=20 2.47.1