From cdb80f035b79a23f1cf518e7b5c418ce8a3a3b24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Mon, 11 Jan 2021 00:03:15 +0100 Subject: [PATCH] golangci-lint: update to 1.35.0 Setting LDFLAGS="-fuse-ld=bfd" does no longer work. However all targets except ppc64le* support using the internal linker instead. I found no way to make the ppc64le* build work and left it trying to use the old method. --- srcpkgs/golangci-lint/template | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/srcpkgs/golangci-lint/template b/srcpkgs/golangci-lint/template index 06dba517cda..199642ac150 100644 --- a/srcpkgs/golangci-lint/template +++ b/srcpkgs/golangci-lint/template @@ -1,20 +1,27 @@ # Template file for 'golangci-lint' pkgname=golangci-lint -version=1.32.2 +version=1.35.0 revision=1 build_style=go go_import_path=github.com/golangci/golangci-lint/cmd/golangci-lint -_date="$(date --utc --iso-8601=seconds)" -go_ldflags="-X main.version=${version} -X main.date=${_date} -X main.commit=v${version}" +go_ldflags="-X main.version=${version} -X main.date=${SOURCE_DATE_EPOCH} -X main.commit=v${version}" short_desc="Linters Runner for Go" maintainer="Renato Aguiar " license="GPL-3.0-only" homepage="https://github.com/golangci/golangci-lint" distfiles="https://github.com/golangci/golangci-lint/archive/v${version}.tar.gz" -checksum=ff0e52ec28b5cf1dbc632db301c89dcf4352dd7376d0cc82e36571c609a0b339 +checksum=71739de1aa88defc6f08c7e5118705069fee51f4fcf303cb9b7a39215ef0c56d -# Cross builds fail with -fuse-ld=gold -LDFLAGS="-fuse-ld=bfd" +# XXX: LDFLAGS="-fuse-ld=bfd" does no longer work when cross compiling +# 'go build runtime/cgo: invalid flag in go:cgo_ldflag: -fuse-ld=bfd' +case "$XBPS_TARGET_MACHINE" in + ppc*) # @q66 : ppc64le does not (yet?) support the internal linker + LDFLAGS="-fuse-ld=bfd" + ;; + *) # other targets can use go's internal linker + go_ldflags=" -linkmode internal" + ;; +esac post_install() { vdoc README.md