[1/3] Added x86_64 i586 aarch64 armv5tel support for GO language required for node_exporter compilation.

Message ID 20210724185639.3469623-2-holger.sunke@posteo.de
State New
Headers show
Series Reworked patches introducing node_exporter on master | expand

Commit Message

Holger Sunke July 24, 2021, 6:56 p.m. UTC
---
 lfs/Config | 8 ++++++++
 lfs/go     | 9 ++++++---
 2 files changed, 14 insertions(+), 3 deletions(-)

Comments

Michael Tremer July 26, 2021, 2:22 p.m. UTC | #1
Hello,

> On 24 Jul 2021, at 19:56, Holger Sunke <holger.sunke@posteo.de> wrote:
> 
> ---
> lfs/Config | 8 ++++++++
> lfs/go     | 9 ++++++---
> 2 files changed, 14 insertions(+), 3 deletions(-)
> 
> diff --git a/lfs/Config b/lfs/Config
> index 7d98e303b..c8be227a1 100644
> --- a/lfs/Config
> +++ b/lfs/Config
> @@ -138,6 +138,14 @@ ifeq "$(BUILD_ARCH)" "aarch64"
> 	GOARCH = arm64
> endif
> 
> +ifeq "$(BUILD_ARCH)" "armv5tel"
> +	GOARCH = armv6l
> +endif

In “next”, we no longer have armv5tel. It has been renamed to armv6l which is perfect for Go because we no longer have the cheated architecture here, but it needs to be changed in this patch, or you can submit another patch that modifies the line.

Acked-by: Michael Tremer <michael.tremer@ipfire.org>

> +
> +ifeq "$(BUILD_ARCH)" "i586"
> +	GOARCH = 386
> +endif
> +
> ###############################################################################
> # Common Macro Definitions
> ###############################################################################
> diff --git a/lfs/go b/lfs/go
> index 6ebb37080..487ad8486 100644
> --- a/lfs/go
> +++ b/lfs/go
> @@ -28,10 +28,10 @@ VER        = 1.15.4
> 
> THISAPP    = go-$(VER)
> DL_FILE    = go$(VER).$(GOOS)-$(GOARCH).tar.gz
> -DL_FROM    = $(URL_IPFIRE)
> +DL_FROM    = https://golang.org/dl/
> DIR_APP    = $(DIR_SRC)/go
> TARGET     = $(DIR_INFO)/$(THISAPP)
> -SUP_ARCH   = x86_64
> +SUP_ARCH   = x86_64 i586 aarch64 armv5tel
> 
> ###############################################################################
> # Top-level Rules
> @@ -41,7 +41,10 @@ objects = $(DL_FILE)
> 
> $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
> 
> -$(DL_FILE)_MD5 = 8e9d11a16f03372c82c5134278a0bd7d
> +go$(VER).$(GOOS)-amd64.tar.gz_MD5 = 8e9d11a16f03372c82c5134278a0bd7d
> +go$(VER).$(GOOS)-386.tar.gz_MD5 = 8d1c3539c88710273f61b0c810b7448c
> +go$(VER).$(GOOS)-arm64.tar.gz_MD5 = b1846fb093f0261707bda44e158bc5be
> +go$(VER).$(GOOS)-armv6l.tar.gz_MD5 = cf04e0d84de6cbb7d224be1f42a83f02
> 
> install : $(TARGET)
> 
> -- 
> 2.30.2
>

Patch

diff --git a/lfs/Config b/lfs/Config
index 7d98e303b..c8be227a1 100644
--- a/lfs/Config
+++ b/lfs/Config
@@ -138,6 +138,14 @@  ifeq "$(BUILD_ARCH)" "aarch64"
 	GOARCH = arm64
 endif
 
+ifeq "$(BUILD_ARCH)" "armv5tel"
+	GOARCH = armv6l
+endif
+
+ifeq "$(BUILD_ARCH)" "i586"
+	GOARCH = 386
+endif
+
 ###############################################################################
 # Common Macro Definitions
 ###############################################################################
diff --git a/lfs/go b/lfs/go
index 6ebb37080..487ad8486 100644
--- a/lfs/go
+++ b/lfs/go
@@ -28,10 +28,10 @@  VER        = 1.15.4
 
 THISAPP    = go-$(VER)
 DL_FILE    = go$(VER).$(GOOS)-$(GOARCH).tar.gz
-DL_FROM    = $(URL_IPFIRE)
+DL_FROM    = https://golang.org/dl/
 DIR_APP    = $(DIR_SRC)/go
 TARGET     = $(DIR_INFO)/$(THISAPP)
-SUP_ARCH   = x86_64
+SUP_ARCH   = x86_64 i586 aarch64 armv5tel
 
 ###############################################################################
 # Top-level Rules
@@ -41,7 +41,10 @@  objects = $(DL_FILE)
 
 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
 
-$(DL_FILE)_MD5 = 8e9d11a16f03372c82c5134278a0bd7d
+go$(VER).$(GOOS)-amd64.tar.gz_MD5 = 8e9d11a16f03372c82c5134278a0bd7d
+go$(VER).$(GOOS)-386.tar.gz_MD5 = 8d1c3539c88710273f61b0c810b7448c
+go$(VER).$(GOOS)-arm64.tar.gz_MD5 = b1846fb093f0261707bda44e158bc5be
+go$(VER).$(GOOS)-armv6l.tar.gz_MD5 = cf04e0d84de6cbb7d224be1f42a83f02
 
 install : $(TARGET)