From d3a2dcf5a88354ffcfe1f445caf0b579840b043a Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Thu, 26 Aug 2010 18:47:34 -0400 Subject: [PATCH] build: fix cgo with -j2 a b: c expands to multiple rules, which then run in parallel. R=r, iant CC=golang-dev https://golang.org/cl/2007047 --- src/Make.pkg | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Make.pkg b/src/Make.pkg index 239820b152..1f5f2823b9 100644 --- a/src/Make.pkg +++ b/src/Make.pkg @@ -102,14 +102,11 @@ dir: # x.cgo2.c - C implementations compiled with gcc to create a dynamic library # -_cgo_defun.c _cgo_gotypes.go _cgo_export.c _cgo_export.h: $(CGOFILES) +_cgo_defun.c: $(CGOFILES) CGOPKGPATH=$(dir) cgo -- $(CGO_CFLAGS) $(CGOFILES) # Ugly but necessary -%.cgo1.go: _cgo_defun.c _cgo_gotypes.go - @true - -%.cgo2.c: _cgo_defun.c _cgo_gotypes.go +_cgo_gotypes.go _cgo_export.c _cgo_export.h %.cgo1.go %.cgo2.c: _cgo_defun.c @true %.cgo2.o: %.cgo2.c -- 2.50.0