summaryrefslogtreecommitdiff
path: root/src/Make.pkg
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2011-03-22 13:30:16 -0700
committerIan Lance Taylor <iant@golang.org>2011-03-22 13:30:16 -0700
commitc133abbb5654e118130d4eed9df451b7d3c32b70 (patch)
tree9d0b873912e36226bb2850d95d285073d48feb4c /src/Make.pkg
parenta2cd8c3797ec6d3e08e4d89ae779a90305eabe65 (diff)
downloadgo-c133abbb5654e118130d4eed9df451b7d3c32b70.tar.gz
Make.pkg: Always define _CGO_CFLAGS and friends.
Submitting TBR to fix Darwin build. TBR=rsc CC=golang-dev http://codereview.appspot.com/4273096
Diffstat (limited to 'src/Make.pkg')
-rw-r--r--src/Make.pkg18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/Make.pkg b/src/Make.pkg
index dcdb09132..d8d034dfa 100644
--- a/src/Make.pkg
+++ b/src/Make.pkg
@@ -117,16 +117,6 @@ dir:
# _obj/x.cgo2.c - C implementations compiled with gcc to create a dynamic library
#
-ifneq ($(CGOFILES)$(SWIGFILES),)
-# Have to run gcc with the right size argument on hybrid 32/64 machines.
-_CGO_CFLAGS_386=-m32
-_CGO_CFLAGS_amd64=-m64
-_CGO_LDFLAGS_freebsd=-shared -lpthread -lm
-_CGO_LDFLAGS_linux=-shared -lpthread -lm
-_CGO_LDFLAGS_darwin=-dynamiclib -Wl,-undefined,dynamic_lookup
-_CGO_LDFLAGS_windows=-shared -lm -mthreads
-endif
-
ifdef CGOFILES
_obj/_cgo_run: $(CGOFILES)
@mkdir -p _obj
@@ -176,6 +166,14 @@ _obj/_cgo_import.c: _cgo1_.o
# added _cgo_defun.$O to $OFILES, and added the installed copy of
# package_x.so (built from x.cgo2.c) to $(INSTALLFILES).
+# Have to run gcc with the right size argument on hybrid 32/64 machines.
+_CGO_CFLAGS_386=-m32
+_CGO_CFLAGS_amd64=-m64
+_CGO_LDFLAGS_freebsd=-shared -lpthread -lm
+_CGO_LDFLAGS_linux=-shared -lpthread -lm
+_CGO_LDFLAGS_darwin=-dynamiclib -Wl,-undefined,dynamic_lookup
+_CGO_LDFLAGS_windows=-shared -lm -mthreads
+
# Have to compile the runtime header.
RUNTIME_CFLAGS=-I$(pkgdir)