Skip to content

Commit 4de7d44

Browse files
yselkowitztimflannagan
authored andcommitted
Fix windows build with golang 1.15
With golang 1.15.5, attempting the windows cross build fails with mingw ld reporting "Error: export ordinal too large: 69634", which is: golang/go#40795 The suggested workaround for executables is -buildmode=exe. Upstream-repository: operator-registry Upstream-commit: 116a5cc4355c1fb905c72a5f049c581f7e671623
1 parent d583610 commit 4de7d44

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

staging/operator-registry/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ cross: opm_version_flags=-ldflags "-X '$(PKG)/cmd/opm/version.gitCommit=$(GIT_CO
3333
cross:
3434
ifeq ($(shell go env GOARCH),amd64)
3535
GOOS=darwin CC=o64-clang CXX=o64-clang++ CGO_ENABLED=1 $(GO) build $(opm_version_flags) $(TAGS) -o "bin/darwin-amd64-opm" --ldflags "-extld=o64-clang" ./cmd/opm
36-
GOOS=windows CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ CGO_ENABLED=1 $(GO) build $(opm_version_flags) $(TAGS) -o "bin/windows-amd64-opm" --ldflags "-extld=x86_64-w64-mingw32-gcc" ./cmd/opm
36+
GOOS=windows CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ CGO_ENABLED=1 $(GO) build $(opm_version_flags) $(TAGS) -o "bin/windows-amd64-opm" --ldflags "-extld=x86_64-w64-mingw32-gcc" -buildmode=exe ./cmd/opm
3737
endif
3838

3939
.PHONY: static

0 commit comments

Comments
 (0)