1
0
mirror of https://github.com/golang/go synced 2024-10-04 13:21:22 -06:00
Commit Graph

29 Commits

Author SHA1 Message Date
Russ Cox
9867ced972 cgo: use new command line syntax: -- separates cgo flags from gcc flags
Fixes #922.

R=r
CC=golang-dev
https://golang.org/cl/1664051
2010-07-15 09:41:21 -07:00
Russ Cox
489494cac3 cgo: use slash-free relative paths for .so references
The Makefile and cgo now rewrite / to _ when creating the path.
The .so for gosqlite.googlecode.com/hg/sqlite is named
cgo_gosqlite.googlecode.com_hg_sqlite.so, and then 6l and 8l
both include a default rpath of $GOROOT/pkg/$GOOS_$GOARCH.
This should make it easier to move binaries from one system
to another.

Fixes #857.

R=iant, r
CC=golang-dev
https://golang.org/cl/1700048
2010-06-30 23:31:27 -07:00
Ian Lance Taylor
b3901dc1d8 Add _cgo_export.[ch] targets so that make knows how they are
built.  Note that they are only built if a //export comment
appears, so other targets should only use them if there is
such a comment.

Fixes #723.

R=rsc
CC=golang-dev
https://golang.org/cl/1073041
2010-05-03 11:07:22 -07:00
Ian Lance Taylor
12e7ce95c6 Add //export to cgo.
The new //export comment marks a Go function as callable from
C.  The syntax is "//export NAME" where NAME is the name of
the function as seen from C.  If such a comment is seen, cgo
will generate two new files: _cgo_export.h and _cgo_export.c.
The _cgo_export.h file provides declarations which C code may
use to call Go functions.  The _cgo_export.c file contains
wrappers, and is to be compiled with gcc.

The changes to Make.pkg support using this from a Go Makefile,
though it could probably be more convenient.

R=rsc
CC=golang-dev
https://golang.org/cl/853042
2010-04-09 13:31:05 -07:00
Russ Cox
6962e2b754 make: use actual dependency for install
otherwise "make install" runs cp unconditionally

R=r
CC=golang-dev
https://golang.org/cl/802044
2010-03-30 10:44:51 -07:00
Rob Pike
14abacf108 Factor the Makefiles to make writing outside Makefiles easier.
R=rsc
CC=golang-dev
https://golang.org/cl/650042
2010-03-19 15:14:46 -07:00
Ian Lance Taylor
7c99dcbdf9 Install runtime.h and cgocall.h.
This permits cgo generated code to use these header files even
if the Go sources are not around.

R=rsc
CC=golang-dev
https://golang.org/cl/224045
2010-02-24 17:00:25 -08:00
Adam Langley
cbd3b2e8d5 Add 'bench' target to makefiles.
R=rsc, agl, r
CC=golang-dev
https://golang.org/cl/188043
2010-01-12 15:43:20 -08:00
Devon H. O'Dell
2eb9171dfb Fix missing explicit GOBIN in src/pkg/Makefile. Clean up creation of
QUOTED_GOBIN. Re-take of 181077; fixes copy-pasta that broke build.

Fixes #468

R=rsc
CC=golang-dev
https://golang.org/cl/183125
2010-01-06 07:47:56 -08:00
Russ Cox
32594bd43d rollback of https://golang.org/cl/181077
(broke build)

TBR=dho
https://golang.org/cl/181139
2010-01-05 16:54:27 -08:00
Devon H. O'Dell
e032ab9dc8 Fix missing explicit GOBIN in src/pkg/Makefile. Clean up creation of QUOTED_GOBIN
Fixes #468

R=rsc
CC=golang-dev
https://golang.org/cl/181077
2010-01-05 16:22:40 -08:00
Russ Cox
c276d87c6c cgo: interpret $CGOPKGDIR as absolute path if rooted
R=dho
CC=golang-dev
https://golang.org/cl/180099
2009-12-21 08:31:02 -08:00
Russ Cox
10e85dfee4 Make.pkg: fix cgo for TARG=a/b
R=dho, phf
CC=golang-dev
https://golang.org/cl/180082
2009-12-17 17:28:22 -08:00
Devon H. O'Dell
9277b02537 Allow cgo to accept multiple .go inputs for a package
Fixes #342.

R=rsc
CC=golang-dev
https://golang.org/cl/179062
2009-12-17 13:20:56 -08:00
Devon H. O'Dell
857d4cf1a9 Remove GOBIN in PATH dependency; don't assume cwd is $GOROOT/src
This change removes the necessity to have GOBIN in $PATH,
and also doesn't assume that the build is being run from
$GOROOT/src. This is a minimal set of necessary changes
to get Go to build happily from the FreeBSD ports
collection.

R=rsc
CC=golang-dev
https://golang.org/cl/171044
2009-12-11 15:14:09 -08:00
Sergio Luis O. B. Correia
6fc820729e go: makes it build for the case $GOROOT has whitespaces
the bash scripts and makefiles for building go didn't take into account
the fact $GOROOT / $GOBIN could both be directories containing whitespaces,
and was not possible to build it in such a situation.

this commit adjusts the various makefiles/scripts to make it aware of that
possibility, and now it builds successfully when using a path with whitespaces
as well.

Fixes #115.

R=rsc, dsymonds1
https://golang.org/cl/157067
2009-11-23 17:32:51 -08:00
Russ Cox
9bc6a404d5 cgo: allow .so in subdirectories
R=r
https://golang.org/cl/157103
2009-11-20 00:31:03 -08:00
William Josephson
72e7444ad4 Missing flags for FreeBSD shared link as used by cgo in default build.
R=rsc
https://golang.org/cl/157065
2009-11-18 09:18:51 -08:00
Russ Cox
c0e1ccf3ff Make.pkg: have "make coverage" invoke 6cov with correct binary
Fixes #239.

R=r
https://golang.org/cl/154176
2009-11-17 08:39:26 -08:00
Russ Cox
cc3524fb06 makefiles: use correct gcc order in case --as-needed is in use.
Suggested by eostapets.
Fixes #141.

R=r
https://golang.org/cl/155049
2009-11-15 12:57:28 -08:00
Devon H. O'Dell
553be8427e Build changes to support work on the BSDs.
This does still contain some FreeBSD-specific bits, but
it's a pain to do partial diffs.

R=rsc
https://golang.org/cl/152138
2009-11-14 15:29:09 -08:00
Russ Cox
384932589d work with GNU Make 3.80
Fixes #30.

R=r1, r
https://golang.org/cl/154061
2009-11-11 12:00:50 -08:00
Russ Cox
bf991bb7df Make.pkg: add DEPS= support
allow Makefiles using Make.pkg to specify a
list of directories that should be installed
before trying to build the package.
this is a stopgap for small package trees
maintained outside the standard tree.

R=r
http://go/go-review/1016012
2009-11-01 05:43:26 -08:00
Russ Cox
133a158bd8 8c, 8l dynamic loading support.
better mach binaries.
cgo working on darwin+linux amd64+386.
eliminated context switches - pi is 30x faster.
add libcgo to build.

on snow leopard:
  - non-cgo binaries work; all tests pass.
  - cgo binaries work on amd64 but not 386.

R=r
DELTA=2031  (1316 added, 626 deleted, 89 changed)
OCL=35264
CL=35304
2009-10-03 10:37:12 -07:00
Russ Cox
e67a5084b8 cgo working on linux/386
R=r
DELTA=70  (47 added, 4 deleted, 19 changed)
OCL=35167
CL=35171
2009-09-30 13:47:15 -07:00
Russ Cox
cce01111a9 cgo: works on amd64.
integrated into Makefiles (see misc/cgo/gmp/Makefile).

R=r
DELTA=1110  (540 added, 525 deleted, 45 changed)
OCL=35153
CL=35158
2009-09-30 11:51:08 -07:00
Russ Cox
090efde407 makefile fixes; convert runtime to use new makefiles
R=r
DELTA=67  (17 added, 29 deleted, 21 changed)
OCL=33215
CL=33219
2009-08-13 14:41:10 -07:00
Russ Cox
ff5618e2e3 avoid unnecessary installs
R=r
DELTA=6  (4 added, 0 deleted, 2 changed)
OCL=33107
CL=33110
2009-08-12 14:40:29 -07:00
Russ Cox
eda49f331f new included Make.pkg for handwritten package makefiles.
gobuild is obsolete; don't build it (will delete eventually).

revised gotest for whole-package compilation.

R=r
DELTA=102  (68 added, 6 deleted, 28 changed)
OCL=33067
CL=33098
2009-08-12 13:18:46 -07:00