diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ec03847..ca8b106 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,7 +15,7 @@ on: env: DESTDIR: ./bin - GO_VERSION: 1.21.10 + GO_VERSION: 1.23.6 jobs: validate: diff --git a/Dockerfile b/Dockerfile index 8f4db1a..9b477cb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 -ARG GO_VERSION=1.21.10 +ARG GO_VERSION=1.23.6 ARG DEBIAN_VERSION=bookworm ARG XX_VERSION=1.6.1 diff --git a/Makefile b/Makefile index 9868445..e413bbf 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,22 @@ COVERAGEDIR ?= ./bin/coverage # 10.11 is the minimum supported version for osxkeychain export MACOSX_DEPLOYMENT_TARGET = 10.11 ifeq "$(shell go env GOOS)" "darwin" - export CGO_CFLAGS = -mmacosx-version-min=$(MACOSX_DEPLOYMENT_TARGET) + export CGO_CFLAGS = -Wno-atomic-alignment -mmacosx-version-min=$(MACOSX_DEPLOYMENT_TARGET) +else + # prevent warnings; see https://github.com/docker/docker-credential-helpers/pull/340#issuecomment-2437593837 + # gcc_libinit.c:44:8: error: large atomic operation may incur significant performance penalty; the access size (4 bytes) exceeds the max lock-free size (0 bytes) [-Werror,-Watomic-alignment] + export CGO_CFLAGS = -Wno-atomic-alignment +endif + +ifeq "$(shell go env GOOS)/$(shell go env GOARCH)/$(shell go env GOARM)" "linux/arm/6" + # Neither the CGo compiler, nor the C toolchain automatically link to + # libatomic when the architecture doesn't support atomic intrinsics, as is + # the case for arm/v6. + # + # Here's the error we get when this is not done (see https://github.com/docker/docker-credential-helpers/pull/340#issuecomment-2437593837): + # + # gcc_libinit.c:44:8: error: large atomic operation may incur significant performance penalty; the access size (4 bytes) exceeds the max lock-free size (0 bytes) [-Werror,-Watomic-alignment] + export CGO_LDFLAGS=-latomic endif .PHONY: all diff --git a/deb/Dockerfile b/deb/Dockerfile index 5f617e0..468d6b1 100644 --- a/deb/Dockerfile +++ b/deb/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 -ARG GO_VERSION=1.21.10 +ARG GO_VERSION=1.23.6 ARG DISTRO=ubuntu ARG SUITE=focal diff --git a/docker-bake.hcl b/docker-bake.hcl index c72103a..f65783c 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -1,5 +1,5 @@ variable "GO_VERSION" { - default = "1.21.10" + default = null } # Defines the output folder