1
0
mirror of https://github.com/golang/go synced 2024-11-25 08:57:58 -07:00

build: move the "-c" flag into HOST_CFLAGS

On Plan 9 this flag is used to discover
constant expressions in "if" statements.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5601060
This commit is contained in:
Anthony Martin 2012-01-31 19:31:30 -08:00
parent 8039683cef
commit 6273d6e713
14 changed files with 16 additions and 16 deletions

View File

@ -38,7 +38,7 @@ all: $(TARG)
# Use $(PWD)/$*.c so that gdb shows full path in stack traces.
%.$(HOST_O): %.c
$(HOST_CC) $(HOST_CFLAGS) -c "$(PWD)/$*.c"
$(HOST_CC) $(HOST_CFLAGS) "$(PWD)/$*.c"
# These are used by enough different Makefiles to be
# worth writing down in one place, even if they don't

View File

@ -8,7 +8,7 @@ all: $(LIB)
# Use $(PWD)/$*.c so that gdb shows full path in stack traces.
%.$(HOST_O): %.c
$(HOST_CC) $(HOST_CFLAGS) -c "$(PWD)/$*.c"
$(HOST_CC) $(HOST_CFLAGS) "$(PWD)/$*.c"
$(OFILES): $(HFILES)

View File

@ -40,7 +40,7 @@ all: $(TARG)
# Use $(PWD)/$*.c so that gdb shows full path in stack traces.
%.$(HOST_O): %.c
$(HOST_CC) $(HOST_CFLAGS) -c "$(PWD)/$*.c"
$(HOST_CC) $(HOST_CFLAGS) "$(PWD)/$*.c"
# These are used by enough different Makefiles to be
# worth writing down in one place, even if they don't

View File

@ -122,7 +122,7 @@ HOST_EXTRA_LDFLAGS?=
# The -fno-common here is not necessary, but some compilers
# on OS X seem to set it by default. Setting it here keeps the build
# working in that non-standard context.
HOST_CFLAGS=-fno-common -I"$(GOROOT)/include" $(HOST_EXTRA_CFLAGS)
HOST_CFLAGS=-c -fno-common -I"$(GOROOT)/include" $(HOST_EXTRA_CFLAGS)
HOST_LDFLAGS=$(HOST_EXTRA_LDFLAGS)
PWD=$(shell pwd)

View File

@ -31,4 +31,4 @@ LIB=\
include ../../Make.ctool
%.$O: ../cc/%.c
$(HOST_CC) $(HOST_CFLAGS) -c -I. -o $@ ../cc/$*.c
$(HOST_CC) $(HOST_CFLAGS) -I. -o $@ ../cc/$*.c

View File

@ -33,4 +33,4 @@ LIB=\
include ../../Make.ctool
%.$O: ../gc/%.c
$(HOST_CC) $(HOST_CFLAGS) -c -I. -o $@ ../gc/$*.c
$(HOST_CC) $(HOST_CFLAGS) -I. -o $@ ../gc/$*.c

View File

@ -40,4 +40,4 @@ enam.c: 5.out.h
CLEANFILES+=enam.c
%.$O: ../ld/%.c
$(HOST_CC) $(HOST_CFLAGS) -c -I. ../ld/$*.c
$(HOST_CC) $(HOST_CFLAGS) -I. ../ld/$*.c

View File

@ -33,4 +33,4 @@ LIB=\
include ../../Make.ctool
%.$O: ../cc/%.c
$(HOST_CC) $(HOST_CFLAGS) -c -I. -o $@ ../cc/$*.c
$(HOST_CC) $(HOST_CFLAGS) -I. -o $@ ../cc/$*.c

View File

@ -32,4 +32,4 @@ LIB=\
include ../../Make.ctool
%.$O: ../gc/%.c
$(HOST_CC) $(HOST_CFLAGS) -c -I. -o $@ ../gc/$*.c
$(HOST_CC) $(HOST_CFLAGS) -I. -o $@ ../gc/$*.c

View File

@ -45,4 +45,4 @@ enam.c: 6.out.h
CLEANFILES+=enam.c
%.$O: ../ld/%.c
$(HOST_CC) $(HOST_CFLAGS) -c -I. ../ld/$*.c
$(HOST_CC) $(HOST_CFLAGS) -I. ../ld/$*.c

View File

@ -34,4 +34,4 @@ LIB=\
include ../../Make.ctool
%.$O: ../cc/%.c
$(HOST_CC) $(HOST_CFLAGS) -c -I. -o $@ ../cc/$*.c
$(HOST_CC) $(HOST_CFLAGS) -I. -o $@ ../cc/$*.c

View File

@ -33,4 +33,4 @@ LIB=\
include ../../Make.ctool
%.$O: ../gc/%.c
$(HOST_CC) $(HOST_CFLAGS) -c -I. -o $@ ../gc/$*.c
$(HOST_CC) $(HOST_CFLAGS) -I. -o $@ ../gc/$*.c

View File

@ -46,4 +46,4 @@ CLEANFILES+=enam.c
%.$O: ../ld/%.c
$(HOST_CC) $(HOST_CFLAGS) -c -I. ../ld/$*.c
$(HOST_CC) $(HOST_CFLAGS) -I. ../ld/$*.c

View File

@ -111,12 +111,12 @@ include ../Make.clib
GOROOT_FINAL?=$(GOROOT)
%.$O: fmt/%.c
$(HOST_CC) -c $(HOST_CFLAGS) -DPLAN9PORT -Ifmt $<
$(HOST_CC) $(HOST_CFLAGS) -DPLAN9PORT -Ifmt $<
%.$O: utf/%.c
$(HOST_CC) -c $(HOST_CFLAGS) $<
$(HOST_CC) $(HOST_CFLAGS) $<
goos.$O: goos.c
GOVERSION=`../version.bash` && \
$(HOST_CC) -c $(HOST_CFLAGS) -DGOOS='"$(GOOS)"' -DGOARCH='"$(GOARCH)"' -DGOROOT='"$(GOROOT_FINAL)"' -DGOVERSION='"'"$$GOVERSION"'"' $<
$(HOST_CC) $(HOST_CFLAGS) -DGOOS='"$(GOOS)"' -DGOARCH='"$(GOARCH)"' -DGOROOT='"$(GOROOT_FINAL)"' -DGOVERSION='"'"$$GOVERSION"'"' $<