mirror of
https://github.com/golang/go
synced 2024-11-24 21:10:04 -07:00
parent
6c6d53052e
commit
3832389036
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user