mirror of
https://github.com/golang/go
synced 2024-11-22 04:34:39 -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:
parent
8039683cef
commit
6273d6e713
@ -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
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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"'"' $<
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user