diff options
author | Russ Cox <rsc@golang.org> | 2010-11-01 16:14:58 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2010-11-01 16:14:58 -0400 |
commit | 276003adb1154c7febdc375830d50477aeb404a9 (patch) | |
tree | 0afeb3fc997b5556abac3f07e282d48fa49fc543 | |
parent | 51b15d68aa7b5bb0530f00d64407368a363e8686 (diff) | |
download | go-276003adb1154c7febdc375830d50477aeb404a9.tar.gz go-276003adb1154c7febdc375830d50477aeb404a9.zip |
build: fiddle with make variables
Fixes #1234.
R=r, r2
CC=golang-dev
https://golang.org/cl/2735043
-rw-r--r-- | src/Make.ccmd | 2 | ||||
-rw-r--r-- | src/Make.inc | 12 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/Make.ccmd b/src/Make.ccmd index a0da13857e..fe53f5d054 100644 --- a/src/Make.ccmd +++ b/src/Make.ccmd @@ -9,7 +9,7 @@ TARG:=$(TARG).exe endif $(TARG): $(OFILES) $(LIB) - $(HOST_LD) -o $(TARG) -L"$(GOROOT)"/lib $(OFILES) $(LIB) -lbio -l9 -lm + $(HOST_LD) -o $(TARG) -L"$(GOROOT)"/lib $(OFILES) $(LIB) -lbio -l9 -lm $(HOST_LDFLAGS) $(OFILES): $(HFILES) diff --git a/src/Make.inc b/src/Make.inc index b1d8247d7e..8096253d02 100644 --- a/src/Make.inc +++ b/src/Make.inc @@ -101,7 +101,17 @@ HOST_CC=quietgcc HOST_LD=quietgcc HOST_O=o HOST_YFLAGS=-d -HOST_CFLAGS=-ggdb -I"$(GOROOT)/include" -O2 + +# These two variables can be overridden in the environment +# to build with other flags. They are like $CFLAGS and $LDFLAGS +# in a more typical GNU build. We are more explicit about the names +# here because there are different compilers being run during the +# build (both gcc and 6c, for example). +HOST_EXTRA_CFLAGS?=-ggdb -O2 +HOST_EXTRA_LDFLAGS?= + +HOST_CFLAGS=-I"$(GOROOT)/include" $(HOST_EXTRA_CFLAGS) +HOST_LDFLAGS=$(HOST_EXTRA_LDFLAGS) PWD=$(shell pwd) # Make environment more standard. |