From a3320435610364457bf4ae08d1de64c3a96fca68 Mon Sep 17 00:00:00 2001 From: Eric Holk Date: Thu, 11 Aug 2011 12:26:23 -0700 Subject: [PATCH] Updating to build on Linux and Mac, and hopefully Windows too. --- mk/rt.mk | 6 +++--- src/rt/arch/i386/{_context.s => _context.S} | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) rename src/rt/arch/i386/{_context.s => _context.S} (96%) diff --git a/mk/rt.mk b/mk/rt.mk index 4f9c587c1f2..11e110666ab 100644 --- a/mk/rt.mk +++ b/mk/rt.mk @@ -33,7 +33,7 @@ RUNTIME_CS := rt/sync/timer.cpp \ RUNTIME_LL := -RUNTIME_S := rt/arch/i386/_context.s +RUNTIME_S := rt/arch/i386/_context.S RUNTIME_HDR := rt/globals.h \ rt/rust.h \ @@ -67,14 +67,14 @@ RUNTIME_HDR := rt/globals.h \ RUNTIME_DEF := rt/rustrt$(CFG_DEF_SUFFIX) RUNTIME_INCS := -I $(S)src/rt/isaac -I $(S)src/rt/uthash \ -I $(S)src/rt/arch/i386 -I $(S)src/rt/libuv/include -RUNTIME_OBJS := $(RUNTIME_CS:.cpp=.o) $(RUNTIME_LL:.ll=.o) $(RUNTIME_S:.s=.o) +RUNTIME_OBJS := $(RUNTIME_CS:.cpp=.o) $(RUNTIME_LL:.ll=.o) $(RUNTIME_S:.S=.o) RUNTIME_LIBS := rt/libuv/uv.a rt/%.o: rt/%.cpp $(MKFILES) @$(call E, compile: $@) $(Q)$(call CFG_COMPILE_C, $@, $(RUNTIME_INCS)) $< -rt/%.o: rt/%.s $(MKFILES) +rt/%.o: rt/%.S $(MKFILES) @$(call E, compile: $@) $(Q)$(call CFG_COMPILE_C, $@, $(RUNTIME_INCS)) $< diff --git a/src/rt/arch/i386/_context.s b/src/rt/arch/i386/_context.S similarity index 96% rename from src/rt/arch/i386/_context.s rename to src/rt/arch/i386/_context.S index d4c3fc436c6..5bd06d990dc 100644 --- a/src/rt/arch/i386/_context.s +++ b/src/rt/arch/i386/_context.S @@ -78,4 +78,8 @@ swap_registers: .globl task_trampoline task_trampoline: // This gets set up by std::task::_spawn. +#ifdef __APPLE__ call _task_exit +#else + call task_exit +#endif