Skip to content

cmd/go: go build fails with linker error when using clang v4.0.1 #21042

@OneOfOne

Description

@OneOfOne

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

➤ git describe --tags
go1.9beta2-129-g504deee608

What operating system and processor architecture are you using (go env)?

Arch Linux 64bit

What did you do?

$ env GOROOT_BOOTSTRAP=/usr/src/go1.4 CC=clang GOGC=off bash make.bash

Note that using CC=gcc works fine.

What did you expect to see?

Successful compile of the go toolset

What did you see instead?

............
cmd/vet
# runtime/cgo
/usr/bin/ld: -r and -pie may not be used together
clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation)
cmd/go/internal/envcmd
............

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions