mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] adding golang support
@ 2021-04-16 12:00 Enrico Weigelt, metux IT consult
  2021-04-23  6:49 ` Michael Olbrich
  0 siblings, 1 reply; 2+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2021-04-16 12:00 UTC (permalink / raw)
  To: ptxdist

Hi folks,


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")
   * $GOARCH must be set explicitly
   * $CC must be set explicitly (to point to the cross compiler)
* currently expecting a recent-enough golang toolchain on the host
   (eg. have to use an extra backports repo on Debian)
* 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
* 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 ?


--mtx

-- 
---
Hinweis: unverschlüsselte E-Mails können leicht abgehört und manipuliert
werden ! Für eine vertrauliche Kommunikation senden Sie bitte ihren
GPG/PGP-Schlüssel zu.
---
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info@metux.net -- +49-151-27565287

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ptxdist] adding golang support
  2021-04-16 12:00 [ptxdist] adding golang support Enrico Weigelt, metux IT consult
@ 2021-04-23  6:49 ` Michael Olbrich
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2021-04-23  6:49 UTC (permalink / raw)
  To: ptxdist

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-23  6:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-16 12:00 [ptxdist] adding golang support Enrico Weigelt, metux IT consult
2021-04-23  6:49 ` Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox