On Fri, Jul 15, 2016 at 04:04:26PM -0700, Tianon Gravi wrote: > - the "Build-Profiles" bits -- I know we should be using > build-profiles more intelligently throughout src:golang-X.Y, but is > there something specific to PIE itself that makes it more > necessary/appropriate than in the normal case?
It is not specific to PIE. When cross-compiling golang, the generated compiler cannot be executed on the host, so the stdlib with PIE mode cannot be built using that compiler. I have to admit that I did not look at the golang build process in detail yet. When finished, does it leave a stage1 compiler for the host that could be reused to cross-compile PIE stdlib? > - "golang-X.Y-go.install" currently has "pkg/*_* > /usr/lib/go-X.Y/pkg/", which will still match > "pkg/linux_amd64_shared", and thus include these files _both_ in > "golang-1.6-std-pie" and "golang-1.6-go" -- I guess we need to fix > that by using "dh_exec" and passing through our GOOS and GOARCH values > instead of using globs? That was my first and preferred solution, but I could not make dh_exec pass GOARCH to the .install scripts, while DEB_HOST_MULTIARCH is passed just fine. So now override_dh_install-arch moves the PIE stdlib to the correct package after dh_install. Peter

