From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 23 Apr 2021 08:50:06 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1lZpde-0005OX-9a for lore@lore.pengutronix.de; Fri, 23 Apr 2021 08:50:06 +0200 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1lZpde-0007oK-01; Fri, 23 Apr 2021 08:50:06 +0200 Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lZpdD-0007oA-C6 for ptxdist@pengutronix.de; Fri, 23 Apr 2021 08:49:39 +0200 Received: from mol by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1lZpdD-0002W3-30 for ptxdist@pengutronix.de; Fri, 23 Apr 2021 08:49:39 +0200 Date: Fri, 23 Apr 2021 08:49:39 +0200 From: Michael Olbrich To: ptxdist@pengutronix.de Message-ID: <20210423064939.GA27464@pengutronix.de> Mail-Followup-To: ptxdist@pengutronix.de References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 08:41:28 up 64 days, 10:05, 83 users, load average: 0.06, 0.08, 0.08 User-Agent: Mutt/1.10.1 (2018-07-13) Subject: Re: [ptxdist] adding golang support X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false On Fri, Apr 16, 2021 at 02:00:08PM +0200, Enrico Weigelt, metux IT consult wrote: > I'm currently in process of adding some golang-based packages (eg. runc) > to ptxdist/distrokit-based projects. > > For now, I'm just doing it quick+dirty, but a bunch of things IMHO > should be done on a more central point, eg: > > * golang toolchain settings > * golang doesn't understand the standard GNU target identifiers, so > some mapping is required (eg. "x86_64" must be translated to > "amd64") Nothing new. We have similar mapping elsewhere, e.g. for the kernel. > * $GOARCH must be set explicitly Nothing too complicated. > * $CC must be set explicitly (to point to the cross compiler) We already do that. It just depends on the package whether that's only needed during prepare or for compile/install as well. > * currently expecting a recent-enough golang toolchain on the host > (eg. have to use an extra backports repo on Debian) Right, that's not something I'd use. I makes things hard to reproduce several years later. > * in some cases, extra golang packages need to be installed on the host > > Certainly, this doesn't fit the spirit of ptxdist, so a bunch of things > need to be done for a clean solution: > > * build our own (recent) golang crosscompiler with some arbitrary old > golang from the host Right, and the 'arbitrary' is probably not quite that arbitrary in reality. I've been looking into adding rust support and we have that same situation there as well. > * automatically setup the correct pathes / envs to use our own toolchain > (w/o having to redo that in each single packages), like we already > have for C/C++. > * add some extra host tools (eg. manpage generator, ...) > > > Anybody here already working on that ? Not on my/our side. As I noted above, I've been looking into rust. But with 'cargo' it's not that easy to get something that is really reproducible. Michael -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de