From fe14ee52ccf89fa02366a06fe892a7fcf135e214 Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Fri, 1 Feb 2013 08:35:33 -0800 Subject: cmd/6c, cmd/6g: add flag to support large-model code generation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added the -pic flag to 6c and 6g to avoid assembler instructions that cannot use RIP-relative adressing. This is needed to support the -shared mode in 6l. See also: https://golang.org/cl/6926049 https://golang.org/cl/6822078 R=golang-dev, rsc CC=golang-dev https://golang.org/cl/7064048 --- src/make.bash | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/make.bash') diff --git a/src/make.bash b/src/make.bash index 1190b93ffa..6c78f93ce6 100755 --- a/src/make.bash +++ b/src/make.bash @@ -23,6 +23,9 @@ # GO_LDFLAGS: Additional 5l/6l/8l arguments to use when # building the commands. # +# GO_CCFLAGS: Additional 5c/6c/8c arguments to use when +# building. +# # CGO_ENABLED: Controls cgo usage during the build. Set it to 1 # to include all cgo related files, .c and .go file with "cgo" # build directive, in the build. Set it to 0 to ignore them. @@ -129,12 +132,12 @@ echo if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOHOSTOS" != "$GOOS" ]; then echo "# Building packages and commands for host, $GOHOSTOS/$GOHOSTARCH." GOOS=$GOHOSTOS GOARCH=$GOHOSTARCH \ - "$GOTOOLDIR"/go_bootstrap install -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std + "$GOTOOLDIR"/go_bootstrap install -ccflags "$GO_CCFLAGS" -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std echo fi echo "# Building packages and commands for $GOOS/$GOARCH." -"$GOTOOLDIR"/go_bootstrap install -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std +"$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -ccflags "$GO_CCFLAGS" -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std echo rm -f "$GOTOOLDIR"/go_bootstrap -- cgit v1.3