Skip to content

Commit

Permalink
Update libuv to revision ee599ec1141cc48f895de1f9d148033babdf9c2a
Browse files Browse the repository at this point in the history
  • Loading branch information
robarnold authored and brson committed Aug 5, 2011
1 parent f4b87c7 commit 8229c3f
Show file tree
Hide file tree
Showing 195 changed files with 37,885 additions and 725 deletions.
4 changes: 2 additions & 2 deletions mk/rt.mk
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ 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
-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_LIBS := $(S)src/rt/libuv/uv.a

Expand Down Expand Up @@ -97,7 +97,7 @@ rt/$(CFG_RUNTIME): $(RUNTIME_OBJS) $(MKFILES) $(RUNTIME_HDR) $(RUNTIME_DEF) $(RU
@$(call E, link: $@)
$(Q)$(call CFG_LINK_C,$@,$(CFG_GCCISH_POST_LIB_FLAGS) $(RUNTIME_LIBS) $(RUNTIME_OBJS),$(RUNTIME_DEF))

$(S)src/rt/libuv/uv.a: rt/libuv/LIBUV_REVISION
$(S)src/rt/libuv/uv.a: $(S)src/rt/libuv/LIBUV_REVISION
$(Q)$(MAKE) -C $(S)src/rt/libuv CFLAGS=\"-m32\" LDFLAGS=\"-m32\"
$(Q)mkdir -p rt/libuv
$(Q)cp $(S)src/rt/libuv/uv.a rt/libuv/uv.a
Expand Down
15 changes: 15 additions & 0 deletions src/rt/libuv/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,18 @@ test/run-tests.exe
test/run-benchmarks.exe
test/run-benchmarks.dSYM/
test/run-tests.dSYM/


c-ares/.deps/
c-ares/.libs/
c-ares/Makefile
c-ares/acountry
c-ares/adig
c-ares/ahost
c-ares/ares_config.h
c-ares/config.log
c-ares/config.status
c-ares/libcares.pc
c-ares/libtool
c-ares/stamp-h1
c-ares/stamp-h2
5 changes: 5 additions & 0 deletions src/rt/libuv/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,9 @@ Ryan Dahl <ryan@joyent.com>
Bert Belder <bertbelder@gmail.com>
Josh Roesslein <jroesslein@gmail.com>
Alan Gutierrez <alan@prettyrobots.com>
Igor Zinkovsky <igorzi@microsoft.com>
Vanilla Hsu <vanilla@fatpipi.com>
Ben Noordhuis <info@bnoordhuis.nl>
Henry Rawas <henryr@schakra.com>
Robert Mustacchi <rm@joyent.com>
Matt Stevens <matt@alloysoft.com>
2 changes: 1 addition & 1 deletion src/rt/libuv/LIBUV_REVISION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
This subtree is pulled from:
2b5707d834a6b85b8e589ac04cb61a6db2dab94b
ee599ec1141cc48f895de1f9d148033babdf9c2a

When pulling in a new version of libuv, please update this file to ensure that
everyone correctly rebuilds libuv.
3 changes: 3 additions & 0 deletions src/rt/libuv/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@ The externally maintained libraries used by libuv are:

- libev, located at ev/ is copyright Marc Alexander Lehmann, and
dual-licensed under the MIT license and GPL2.

- libeio, located at eio/ is copyright Marc Alexander Lehmann, and
dual-licensed under the MIT license and GPL2.
38 changes: 28 additions & 10 deletions src/rt/libuv/config-mingw.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,44 @@

# Use make -f Makefile.gcc PREFIX=i686-w64-mingw32-
# for cross compilation
CC = $(PREFIX)gcc
AR = $(PREFIX)ar
CC ?= $(PREFIX)gcc
AR ?= $(PREFIX)ar
E=.exe

CFLAGS=-g --std=gnu89 -Wno-variadic-macros
CFLAGS=$(CPPFLAGS) -g --std=gnu89 -D_WIN32_WINNT=0x0501 -Isrc/ares/config_win32
LINKFLAGS=-lm

CARES_OBJS += src/ares/windows_port.o

RUNNER_CFLAGS=$(CFLAGS) -D_GNU_SOURCE # Need _GNU_SOURCE for strdup?
RUNNER_LINKFLAGS=$(LINKFLAGS)
RUNNER_LIBS=-lws2_32
RUNNER_SRC=test/runner-win.c

uv.a: uv-win.o uv-common.o
$(AR) rcs uv.a uv-win.o uv-common.o
uv.a: src/uv-win.o src/uv-common.o src/uv-eio.o src/eio/eio.o $(CARES_OBJS)
$(AR) rcs uv.a src/uv-win.o src/uv-common.o src/uv-eio.o src/eio/eio.o $(CARES_OBJS)

uv-win.o: uv-win.c uv.h uv-win.h
$(CC) $(CFLAGS) -c uv-win.c -o uv-win.o
src/uv-win.o: src/uv-win.c include/uv.h include/uv-win.h
$(CC) $(CFLAGS) -c src/uv-win.c -o src/uv-win.o

uv-common.o: uv-common.c uv.h uv-win.h
$(CC) $(CFLAGS) -c uv-common.c -o uv-common.o
src/uv-common.o: src/uv-common.c include/uv.h include/uv-win.h
$(CC) $(CFLAGS) -c src/uv-common.c -o src/uv-common.o

EIO_CPPFLAGS += $(CPPFLAGS)
EIO_CPPFLAGS += -DEIO_CONFIG_H=\"$(EIO_CONFIG)\"
EIO_CPPFLAGS += -DEIO_STACKSIZE=65536
EIO_CPPFLAGS += -D_GNU_SOURCE

src/eio/eio.o: src/eio/eio.c
$(CC) $(EIO_CPPFLAGS) $(CFLAGS) -c src/eio/eio.c -o src/eio/eio.o

src/uv-eio.o: src/uv-eio.c
$(CC) $(CPPFLAGS) -Isrc/eio/ $(CFLAGS) -c src/uv-eio.c -o src/uv-eio.o

distclean-platform:
clean-platform:
-rm -f src/ares/*.o
-rm -f src/eio/*.o

distclean-platform:
-rm -f src/ares/*.o
-rm -f src/eio/*.o
92 changes: 77 additions & 15 deletions src/rt/libuv/config-unix.mk
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,56 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.

CC = $(PREFIX)gcc
AR = $(PREFIX)ar
CC ?= $(PREFIX)gcc
AR ?= $(PREFIX)ar
E=
CFLAGS=--std=gnu89 -Wno-variadic-macros -g
CSTDFLAG=--std=c89 -pedantic
CFLAGS=-g
CPPFLAGS += -Isrc/ev
LINKFLAGS=-lm

CPPFLAGS += -D_LARGEFILE_SOURCE
CPPFLAGS += -D_FILE_OFFSET_BITS=64

ifeq (SunOS,$(uname_S))
EV_CONFIG=config_sunos.h
EIO_CONFIG=config_sunos.h
CPPFLAGS += -Isrc/ares/config_sunos
LINKFLAGS+=-lsocket -lnsl
UV_OS_FILE=uv-sunos.c
endif

ifeq (Darwin,$(uname_S))
EV_CONFIG=config_darwin.h
EIO_CONFIG=config_darwin.h
CPPFLAGS += -Isrc/ares/config_darwin
LINKFLAGS+=-framework CoreServices
UV_OS_FILE=uv-darwin.c
endif

ifeq (Linux,$(uname_S))
EV_CONFIG=config_linux.h
EIO_CONFIG=config_linux.h
CSTDFLAG += -D_XOPEN_SOURCE=600
CPPFLAGS += -Isrc/ares/config_linux
LINKFLAGS+=-lrt
UV_OS_FILE=uv-linux.c
endif

ifeq (FreeBSD,$(uname_S))
EV_CONFIG=config_freebsd.h
EIO_CONFIG=config_freebsd.h
CPPFLAGS += -Isrc/ares/config_freebsd
LINKFLAGS+=
UV_OS_FILE=uv-freebsd.c
endif

ifneq (,$(findstring CYGWIN,$(uname_S)))
EV_CONFIG=config_cygwin.h
EIO_CONFIG=config_cygwin.h
CPPFLAGS += -Isrc/ares/config_cygwin
LINKFLAGS+=
UV_OS_FILE=uv-cygwin.c
endif

# Need _GNU_SOURCE for strdup?
Expand All @@ -35,23 +77,43 @@ RUNNER_LINKFLAGS=$(LINKFLAGS) -pthread
RUNNER_LIBS=
RUNNER_SRC=test/runner-unix.c

uv.a: uv-unix.o uv-common.o ev/ev.o
$(AR) rcs uv.a uv-unix.o uv-common.o ev/ev.o
uv.a: src/uv-unix.o src/uv-common.o src/uv-platform.o src/ev/ev.o src/uv-eio.o src/eio/eio.o $(CARES_OBJS)
$(AR) rcs uv.a src/uv-unix.o src/uv-platform.o src/uv-common.o src/uv-eio.o src/ev/ev.o \
src/eio/eio.o $(CARES_OBJS)

src/uv-platform.o: src/$(UV_OS_FILE) include/uv.h include/uv-unix.h
$(CC) $(CSTDFLAG) $(CPPFLAGS) $(CFLAGS) -c src/$(UV_OS_FILE) -o src/uv-platform.o

src/uv-unix.o: src/uv-unix.c include/uv.h include/uv-unix.h
$(CC) $(CSTDFLAG) $(CPPFLAGS) -Ieio $(CFLAGS) -c src/uv-unix.c -o src/uv-unix.o

src/uv-common.o: src/uv-common.c include/uv.h include/uv-unix.h
$(CC) $(CSTDFLAG) $(CPPFLAGS) $(CFLAGS) -c src/uv-common.c -o src/uv-common.o

src/ev/ev.o: src/ev/ev.c
$(CC) $(CPPFLAGS) $(CFLAGS) -c src/ev/ev.c -o src/ev/ev.o -DEV_CONFIG_H=\"$(EV_CONFIG)\"


uv-unix.o: uv-unix.c uv.h uv-unix.h
$(CC) $(CFLAGS) -c uv-unix.c -o uv-unix.o
EIO_CPPFLAGS += $(CPPFLAGS)
EIO_CPPFLAGS += -DEIO_CONFIG_H=\"$(EIO_CONFIG)\"
EIO_CPPFLAGS += -DEIO_STACKSIZE=65536
EIO_CPPFLAGS += -D_GNU_SOURCE

uv-common.o: uv-common.c uv.h uv-unix.h
$(CC) $(CFLAGS) -c uv-common.c -o uv-common.o
src/eio/eio.o: src/eio/eio.c
$(CC) $(EIO_CPPFLAGS) $(CFLAGS) -c src/eio/eio.c -o src/eio/eio.o

ev/ev.o: ev/config.h ev/ev.c
$(MAKE) -C ev
src/uv-eio.o: src/uv-eio.c
$(CC) $(CPPFLAGS) -Isrc/eio/ $(CSTDFLAG) $(CFLAGS) -c src/uv-eio.c -o src/uv-eio.o

ev/config.h:
cd ev && ./configure

clean-platform:
$(MAKE) -C ev clean
-rm -f src/ares/*.o
-rm -f src/ev/*.o
-rm -f src/eio/*.o
-rm -rf test/run-tests.dSYM run-benchmarks.dSYM

distclean-platform:
$(MAKE) -C ev distclean
-rm -f src/ares/*.o
-rm -f src/ev/*.o
-rm -f src/eio/*.o
-rm -rf test/run-tests.dSYM run-benchmarks.dSYM
File renamed without changes.
Loading

0 comments on commit 8229c3f

Please sign in to comment.