From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 58C2315800A for ; Fri, 11 Aug 2023 03:48:46 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E18D02BC042; Fri, 11 Aug 2023 03:48:26 +0000 (UTC) Received: from out-90.mta0.migadu.com (out-90.mta0.migadu.com [IPv6:2001:41d0:1004:224b::5a]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 967572BC018 for ; Fri, 11 Aug 2023 03:48:26 +0000 (UTC) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=catcream.org; s=key1; t=1691725705; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yxSxYrTkJp7GO3A4WLDFIU73j93PFCZgkS/bbj0ujXY=; b=ntS9xItlG/N22p2MpvHFHrlBzkbKV6oA8oz8wWJstKfqtQiGlQySTcyeBaqZVD69x7a3pu EdQ/sTfR9xW4V9Q6VLJNU1mtkMftHNbOD2OM99IfTFR6fF9YVllKBjyTPpzTrSPpx/angA D6f54KkSLg8fKMBlgxpzPDG1zH/yX88n8dG9R89swrQj5BJMWw5sNJuiSzL0F6okGionYm O5ntiHPkR7O/Ox7VI8q69GRmmJM6bw4BlILWRHrgNfDY5wa/N7rfxDnQBjMNzzbOcTxFyL DpEGDuaegvjr20vcMqdWHjA8OWgw6ZLWu5WJyrwMR3qq+03f549BRFecTOcV2w== From: Alfred Persson Forsberg To: gentoo-dev@lists.gentoo.org Cc: sam@gentoo.org, llvm@gentoo.org, toolchain@gentoo.org, cross@gentoo.org, Alfred Persson Forsberg Subject: [gentoo-dev] [PATCH 0/4] Introducing cross.eclass for Crossdev ebuilds Date: Fri, 11 Aug 2023 05:48:19 +0200 Message-ID: <20230811034823.34301-2-cat@catcream.org> In-Reply-To: <20230811034823.34301-1-cat@catcream.org> References: <20230811034823.34301-1-cat@catcream.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Archives-Salt: 832f9654-a81d-4807-be83-6286ad3f4a3c X-Archives-Hash: 822acd6fbc9754653a80884e64e6e7d5 Hello, I am working on LLVM/Clang support for Crossdev, and I propose a new eclass for cross compilation. This is mostly due to boilerplate currently shared by a lot of ebuilds. One snippet of code that's used by basically all cross ebuilds is: > export CBUILD=${CBUILD:-${CHOST}} > export CTARGET=${CTARGET:-${CHOST}} > if [[ ${CTARGET} == ${CHOST} ]] ; then > if [[ ${CATEGORY} == cross-* ]] ; then > export CTARGET=${CATEGORY#cross-} > fi > fi and because I use cross_llvm-* for my categories it becomes even more of a mess. Let me know if this is a good idea, the other way is to inline all of this. Alfred Persson Forsberg (4): cross.eclass: new eclass sys-libs/musl: Support LLVM/Clang crossdev kernel-2.eclass: Use cross.eclass for figuring out CTARGET sys-libs/compiler-rt: Support LLVM/Clang crossdev eclass/cross.eclass | 83 +++++++++++++++++++ eclass/kernel-2.eclass | 7 +- .../compiler-rt-17.0.0.9999.ebuild | 36 +++++++- sys-libs/musl/musl-1.2.4.ebuild | 20 +---- 4 files changed, 120 insertions(+), 26 deletions(-) create mode 100644 eclass/cross.eclass -- 2.41.0