• 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
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...