1
0
mirror of https://github.com/golang/go synced 2024-11-24 21:10:04 -07:00

fix cgo build

R=r
CC=golang-dev
https://golang.org/cl/3750041
This commit is contained in:
Russ Cox 2010-12-17 13:22:20 -08:00
parent 6c6d53052e
commit 3832389036
2 changed files with 5 additions and 1 deletions

View File

@ -114,7 +114,6 @@ dir:
ifdef CGOFILES
_cgo_defun.c: $(CGOFILES)
CGOPKGPATH=$(dir) cgo -- $(CGO_CFLAGS) $(CGOFILES)
endif
# Ugly but necessary - cgo writes these files too.
_cgo_gotypes.go _cgo_export.c _cgo_export.h _cgo_main.c: _cgo_defun.c
@ -122,6 +121,7 @@ _cgo_gotypes.go _cgo_export.c _cgo_export.h _cgo_main.c: _cgo_defun.c
%.cgo1.go %.cgo2.c: _cgo_defun.c
@true
endif
# Compile rules for gcc source files.
%.o: %.c

View File

@ -44,6 +44,10 @@ include ../../../Make.pkg
ifeq ($(ENABLED),1)
_cgo_defun.c:
echo >$@
_cgo_main.c:
echo 'int main() { return 0; }' >$@
echo 'void *crosscall2;' >>$@
endif
$(GOARCH).o: $(GOARCH).S