community/prometheus: fix provided ldflags

`-extldflags` is used to provide LDFLAGS to the external linker.

159018314b (community/prometheus: fix provided ldflags, 2020-09-19)
extended LDFLAGS with flags that are meant for Go itself. As long as
`$LDLFAGS` is set to a value this works.

But when `$LDFLAGS` is empty, it would pass the flags ment for Go to the
external linker, which will then error with a usage message.

Fix this by only supply -extldflags when `$LDFLAGS` is not empty.
7 jobs for !12641 with prometheus-fix-build-issue in 7 minutes and 57 seconds (queued for 2 seconds)
detached
Status Job ID Name Coverage
  Lint
failed #210409
docker-alpine x86_64 allowed to fail
lint

00:00:21

 
  Build
passed #210414
docker-alpine ci-build aarch64
build-aarch64

00:06:02

passed #210415
docker-alpine ci-build armv7
build-armv7

00:07:33

passed #210413
docker-alpine ci-build ppc64le
build-ppc64le

00:07:16

passed #210412
docker-alpine ci-build s390x
build-s390x

00:03:09

passed #210411
docker-alpine ci-build x86
build-x86

00:04:17

passed #210410
docker-alpine ci-build x86_64
build-x86_64

00:03:08

 
Name Stage Failure
failed
lint Lint
No job log