• Michael Hudson-Doyle's avatar
    cmd/go: pass -no-pie along with -Wl,-r to gcc when supported on linux · b80b098b
    Michael Hudson-Doyle authored
    Go fails to build on a system which has PIE enabled by default like this:
    
    /usr/bin/ld: -r and -pie may not be used together
    collect2: error: ld returned 1 exit status
    
    The only system I know that has this property right now is Ubuntu Xenial
    running on s390x, which is hardly the most accessible system, but it's planned
    to enable this on amd64 soon too. The fix is to pass -no-pie along with -Wl,-r
    to the compiler, but unfortunately that flag is very new as well. So this does
    a test compile of a trivial file to see if the flag is supported.
    
    Change-Id: I1345571142b7c3a96212e43297d19e84ec4a3d41
    Reviewed-on: https://go-review.googlesource.com/18359Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
    Run-TryBot: Michael Hudson-Doyle <michael.hudson@canonical.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    b80b098b
Name
Last commit
Last update
..
addr2line Loading commit data...
api Loading commit data...
asm Loading commit data...
cgo Loading commit data...
compile Loading commit data...
cover Loading commit data...
dist Loading commit data...
doc Loading commit data...
fix Loading commit data...
go Loading commit data...
gofmt Loading commit data...
internal Loading commit data...
link Loading commit data...
newlink Loading commit data...
nm Loading commit data...
objdump Loading commit data...
pack Loading commit data...
pprof Loading commit data...
trace Loading commit data...
vendor Loading commit data...
vet Loading commit data...
yacc Loading commit data...