}
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++);
# 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\
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)
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 $@ $<
-// 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
*/
// 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;
-// 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
*/