mirror of
https://github.com/golang/go
synced 2024-11-26 01:57:56 -07:00
move darwin specific code into runtime/darwin/
move darwin-amd64 specific code into runtime/darwin/amd64/ repeat for linux. move rt0 into runtime.a instead of keeping a separate .6 file. 6l seems to have no problem with that. TBR=r OCL=26680 CL=26680
This commit is contained in:
parent
5a68303a15
commit
878822f355
@ -353,12 +353,6 @@ main(int argc, char *argv[])
|
||||
}
|
||||
lookup(INITENTRY, 0)->type = SXREF;
|
||||
|
||||
if(!debug['l']) {
|
||||
a = mal(strlen(goroot)+strlen(goarch)+strlen(goos)+20);
|
||||
sprint(a, "%s/lib/rt0_%s_%s.%c", goroot, goarch, goos, thechar);
|
||||
objfile(a);
|
||||
}
|
||||
|
||||
while(*argv)
|
||||
objfile(*argv++);
|
||||
|
||||
|
@ -2,19 +2,14 @@
|
||||
# Use of this source code is governed by a BSD-style
|
||||
# license that can be found in the LICENSE file.
|
||||
|
||||
CFLAGS=
|
||||
CFLAGS=-I$(GOOS) -I$(GOOS)/$(GOARCH) -wF
|
||||
O=6
|
||||
CC=$(O)c
|
||||
AS=$(O)a
|
||||
|
||||
LIB=lib_$(GOARCH)_$(GOOS).a
|
||||
|
||||
RT0OFILES=\
|
||||
rt0_$(GOARCH)_$(GOOS).$O\
|
||||
|
||||
LIBOFILES=\
|
||||
rt1_$(GOARCH)_$(GOOS).$O\
|
||||
sys_$(GOARCH)_$(GOOS).$O\
|
||||
OFILES=\
|
||||
array.$O\
|
||||
asm.$O\
|
||||
chan.$O\
|
||||
@ -36,25 +31,24 @@ LIBOFILES=\
|
||||
proc.$O\
|
||||
rune.$O\
|
||||
runtime.$O\
|
||||
rt0.$O\
|
||||
rt1.$O\
|
||||
sema.$O\
|
||||
sema_go.$O\
|
||||
string.$O\
|
||||
symtab.$O\
|
||||
sys.$O\
|
||||
traceback.$O\
|
||||
|
||||
OFILES=$(RT0OFILES) $(LIBOFILES)
|
||||
OS_H=$(GOARCH)_$(GOOS).h
|
||||
HFILES=runtime.h hashmap.h malloc.h $(OS_H_)
|
||||
|
||||
install: rt0 $(LIB) runtime.acid
|
||||
cp $(RT0OFILES) $(GOROOT)/lib
|
||||
install: $(LIB) runtime.acid
|
||||
cp $(LIB) $(GOROOT)/lib
|
||||
cp runtime.acid $(GOROOT)/acid/runtime.acid
|
||||
|
||||
rt0: $(RT0OFILES)
|
||||
|
||||
$(LIB): $(LIBOFILES)
|
||||
$(O)ar rc $(LIB) $(LIBOFILES)
|
||||
$(LIB): $(OFILES)
|
||||
$(O)ar rc $(LIB) $(OFILES)
|
||||
|
||||
$(OFILES): $(HFILES)
|
||||
|
||||
@ -65,17 +59,23 @@ clean:
|
||||
rm -f *.$(O) *.a runtime.acid cgo2c
|
||||
|
||||
%.$O: %.c
|
||||
$(CC) $(CFLAGS) -wF $<
|
||||
$(CC) $(CFLAGS) $<
|
||||
|
||||
%.$O: $(GOARCH)/%.c
|
||||
$(CC) $(CFLAGS) -wF $<
|
||||
$(CC) $(CFLAGS) $<
|
||||
|
||||
%.$O: %.s
|
||||
$(AS) $<
|
||||
%.$O: $(GOOS)/%.c
|
||||
$(CC) $(CFLAGS) $<
|
||||
|
||||
%.$O: $(GOOS)/$(GOARCH)/%.c
|
||||
$(CC) $(CFLAGS) $<
|
||||
|
||||
%.$O: $(GOARCH)/%.s
|
||||
$(AS) $<
|
||||
|
||||
%.$O: $(GOOS)/$(GOARCH)/%.s
|
||||
$(AS) $<
|
||||
|
||||
cgo2c: cgo2c.c
|
||||
quietgcc -o $@ $<
|
||||
|
||||
|
@ -1,7 +1,3 @@
|
||||
// Copyright 2009 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
/*
|
||||
* System structs for Darwin, amd64
|
||||
*/
|
@ -3,8 +3,8 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
#include "runtime.h"
|
||||
#include "amd64_darwin.h"
|
||||
#include "signals_darwin.h"
|
||||
#include "defs.h"
|
||||
#include "signals.h"
|
||||
|
||||
typedef uint64 __uint64_t;
|
||||
|
@ -1,7 +1,3 @@
|
||||
// Copyright 2009 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
/*
|
||||
* System structs for Linux, amd64
|
||||
*/
|
Loading…
Reference in New Issue
Block a user