Commit 38323890 authored by Russ Cox's avatar Russ Cox

fix cgo build

R=r
CC=golang-dev
https://golang.org/cl/3750041
parent 6c6d5305
......@@ -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
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment