On Linux, overwriting an mmap'ed file causes
all the MAP_PRIVATE pages to get refreshed
with the new content, even ones that have been
modified by the process that did the mmap.
One specific instance of this is that after the
dynamic linker has relocated a page from a .so,
overwriting the .so will un-relocate it, making
the next use of one of the no-longer-relocated
addresses incorrect and probably crash the
program.
Linux must go out of its way to break programs
in this way: the pages have already been copied
on write, so they're not shared with the file system
cache, and it trashes them anyway. The manual
says the behavior when the file gets overwritten
is "undefined". Removing before copy avoids the
undefined behavior.
R=iant
CC=golang-dev, msolo
https://golang.org/cl/2333045
Fix building on GNU Make 3.82 (caused by mixed implicit and normal
rules).
The issue was introduced in changeset 6110:ca0beac3b543.
R=rsc
CC=golang-dev
https://golang.org/cl/2100044
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
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
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
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
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
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
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