1
0
mirror of https://github.com/golang/go synced 2024-11-11 21:50:21 -07:00
go/src/lib9
Ian Lance Taylor 5a40b568d0 lib9, cmd/ld: fixes for cross-linking on a Windows host
This fixes a couple of problems that occur when the linker
removes its temporary directory on Windows.  The linker only
creates and removes a temporary directory when doing external
linking.  Windows does not yet support external linking.
Therefore, these problems are only seen when using a
cross-compiler hosted on Windows.

In lib9, FindFirstFileW returns just the file name, not the
full path name.  Don't assume that we will find a slash.
Changed the code to work either way just in case.

In ld, Windows requires that files be closed before they are
removed, so close the output file before we might try to
remove it.

Fixes #8723.

LGTM=alex.brainman
R=golang-codereviews, alex.brainman
CC=golang-codereviews
https://golang.org/cl/141690043
2014-09-18 17:27:26 -07:00
..
fmt lib9: format %#04x, 0 as 0x0000 not 000000. 2014-07-23 10:17:47 -04:00
utf lib9/utf: bring C environment up to Unicode 6.3.0 2014-02-25 17:49:32 -08:00
_exits.c lib9: enable on Plan 9 2014-02-13 20:06:41 +01:00
_p9dir.c lib9: enable on Plan 9 2014-02-13 20:06:41 +01:00
atoi.c lib9: enable on Plan 9 2014-02-13 20:06:41 +01:00
await.c lib9: enable on Plan 9 2014-02-13 20:06:41 +01:00
cleanname.c lib9: enable on Plan 9 2014-02-13 20:06:41 +01:00
create.c lib9: enable on Plan 9 2014-02-13 20:06:41 +01:00
ctime.c lib9: enable on Plan 9 2014-02-13 20:06:41 +01:00
dirfstat.c lib9: enable on Plan 9 2014-02-13 20:06:41 +01:00
dirfwstat.c lib9: enable on Plan 9 2014-02-13 20:06:41 +01:00
dirstat.c lib9: enable on Plan 9 2014-02-13 20:06:41 +01:00
dirwstat.c lib9: enable on Plan 9 2014-02-13 20:06:41 +01:00
dup.c lib9: enable on Plan 9 2014-02-13 20:06:41 +01:00
errstr.c lib9: fix inconsistencies and warnings on Plan 9 2014-02-13 20:05:55 +01:00
exec.c lib9: enable on Plan 9 2014-02-13 20:06:41 +01:00
execl.c lib9: enable on Plan 9 2014-02-13 20:06:41 +01:00
exitcode.c lib9: enable on Plan 9 2014-02-13 20:06:41 +01:00
exits.c lib9: enable on Plan 9 2014-02-13 20:06:41 +01:00
flag.c lib9: avoid all -Wconversion warnings 2013-06-25 10:44:25 -07:00
fmtlock2.c lib9: enable on Plan 9 2014-02-13 20:06:41 +01:00
getenv.c lib9: enable on Plan 9 2014-02-13 20:06:41 +01:00
getfields.c
getwd.c lib9: enable on Plan 9 2014-02-13 20:06:41 +01:00
goos.c cmd/dist, cmd/ld: GO_EXTLINK_ENABLED=0 defaults to -linkmode=internal 2013-03-29 16:33:35 -07:00
jmp.c lib9: enable on Plan 9 2014-02-13 20:06:41 +01:00
main.c lib9: restore argv0 initialization code. 2014-04-21 00:08:39 -04:00
Makefile build: delete make paraphernalia 2012-02-06 13:34:25 -05:00
nan.c lib9: enable on Plan 9 2014-02-13 20:06:41 +01:00
notify.c lib9: enable on Plan 9 2014-02-13 20:06:41 +01:00
nulldir.c lib9: enable on Plan 9 2014-02-13 20:06:41 +01:00
open.c lib9: enable on Plan 9 2014-02-13 20:06:41 +01:00
readn.c lib9: enable on Plan 9 2014-02-13 20:06:41 +01:00
rfork.c lib9: enable on Plan 9 2014-02-13 20:06:41 +01:00
run_plan9.c lib9: enable on Plan 9 2014-02-13 20:06:41 +01:00
run_unix.c lib9, libmach, cmd/dist, go/build: add support for GOOS=solaris 2014-01-07 23:12:12 +11:00
run_windows.c lib9: add mktempdir, removeall, runprog 2013-03-06 15:48:28 -05:00
seek.c lib9: enable on Plan 9 2014-02-13 20:06:41 +01:00
strecpy.c lib9: enable on Plan 9 2014-02-13 20:06:41 +01:00
sysfatal.c lib9: enable on Plan 9 2014-02-13 20:06:41 +01:00
tempdir_plan9.c lib9: enable on Plan 9 2014-02-13 20:06:41 +01:00
tempdir_unix.c lib9, libmach, cmd/dist, go/build: add support for GOOS=solaris 2014-01-07 23:12:12 +11:00
tempdir_windows.c lib9, cmd/ld: fixes for cross-linking on a Windows host 2014-09-18 17:27:26 -07:00
time.c lib9: enable on Plan 9 2014-02-13 20:06:41 +01:00
tokenize.c lib9: enable on Plan 9 2014-02-13 20:06:41 +01:00
win.h lib9: add mktempdir, removeall, runprog 2013-03-06 15:48:28 -05:00
windows.c libmach,lib9: override unused parameter warnings (fixes windows build) 2013-07-20 12:43:50 +10:00