Skip to content

Commit 8229c3f

Browse files
robarnoldbrson
authored andcommitted
Update libuv to revision ee599ec1141cc48f895de1f9d148033babdf9c2a
1 parent f4b87c7 commit 8229c3f

File tree

195 files changed

+37885
-725
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

195 files changed

+37885
-725
lines changed

mk/rt.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ RUNTIME_HDR := rt/globals.h \
6666

6767
RUNTIME_DEF := rt/rustrt$(CFG_DEF_SUFFIX)
6868
RUNTIME_INCS := -I $(S)src/rt/isaac -I $(S)src/rt/uthash \
69-
-I $(S)src/rt/arch/i386 -I $(S)src/rt/libuv
69+
-I $(S)src/rt/arch/i386 -I $(S)src/rt/libuv/include
7070
RUNTIME_OBJS := $(RUNTIME_CS:.cpp=.o) $(RUNTIME_LL:.ll=.o) $(RUNTIME_S:.s=.o)
7171
RUNTIME_LIBS := $(S)src/rt/libuv/uv.a
7272

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

100-
$(S)src/rt/libuv/uv.a: rt/libuv/LIBUV_REVISION
100+
$(S)src/rt/libuv/uv.a: $(S)src/rt/libuv/LIBUV_REVISION
101101
$(Q)$(MAKE) -C $(S)src/rt/libuv CFLAGS=\"-m32\" LDFLAGS=\"-m32\"
102102
$(Q)mkdir -p rt/libuv
103103
$(Q)cp $(S)src/rt/libuv/uv.a rt/libuv/uv.a

src/rt/libuv/.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,18 @@ test/run-tests.exe
2626
test/run-benchmarks.exe
2727
test/run-benchmarks.dSYM/
2828
test/run-tests.dSYM/
29+
30+
31+
c-ares/.deps/
32+
c-ares/.libs/
33+
c-ares/Makefile
34+
c-ares/acountry
35+
c-ares/adig
36+
c-ares/ahost
37+
c-ares/ares_config.h
38+
c-ares/config.log
39+
c-ares/config.status
40+
c-ares/libcares.pc
41+
c-ares/libtool
42+
c-ares/stamp-h1
43+
c-ares/stamp-h2

src/rt/libuv/AUTHORS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,9 @@ Ryan Dahl <[email protected]>
33
Bert Belder <[email protected]>
44
Josh Roesslein <[email protected]>
55
Alan Gutierrez <[email protected]>
6+
Igor Zinkovsky <[email protected]>
67
Vanilla Hsu <[email protected]>
8+
Ben Noordhuis <[email protected]>
9+
Henry Rawas <[email protected]>
10+
Robert Mustacchi <[email protected]>
11+
Matt Stevens <[email protected]>

src/rt/libuv/LIBUV_REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
This subtree is pulled from:
2-
2b5707d834a6b85b8e589ac04cb61a6db2dab94b
2+
ee599ec1141cc48f895de1f9d148033babdf9c2a
33

44
When pulling in a new version of libuv, please update this file to ensure that
55
everyone correctly rebuilds libuv.

src/rt/libuv/LICENSE

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,6 @@ The externally maintained libraries used by libuv are:
3535

3636
- libev, located at ev/ is copyright Marc Alexander Lehmann, and
3737
dual-licensed under the MIT license and GPL2.
38+
39+
- libeio, located at eio/ is copyright Marc Alexander Lehmann, and
40+
dual-licensed under the MIT license and GPL2.

src/rt/libuv/config-mingw.mk

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,26 +20,44 @@
2020

2121
# Use make -f Makefile.gcc PREFIX=i686-w64-mingw32-
2222
# for cross compilation
23-
CC = $(PREFIX)gcc
24-
AR = $(PREFIX)ar
23+
CC ?= $(PREFIX)gcc
24+
AR ?= $(PREFIX)ar
2525
E=.exe
2626

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

30+
CARES_OBJS += src/ares/windows_port.o
31+
3032
RUNNER_CFLAGS=$(CFLAGS) -D_GNU_SOURCE # Need _GNU_SOURCE for strdup?
3133
RUNNER_LINKFLAGS=$(LINKFLAGS)
3234
RUNNER_LIBS=-lws2_32
3335
RUNNER_SRC=test/runner-win.c
3436

35-
uv.a: uv-win.o uv-common.o
36-
$(AR) rcs uv.a uv-win.o uv-common.o
37+
uv.a: src/uv-win.o src/uv-common.o src/uv-eio.o src/eio/eio.o $(CARES_OBJS)
38+
$(AR) rcs uv.a src/uv-win.o src/uv-common.o src/uv-eio.o src/eio/eio.o $(CARES_OBJS)
3739

38-
uv-win.o: uv-win.c uv.h uv-win.h
39-
$(CC) $(CFLAGS) -c uv-win.c -o uv-win.o
40+
src/uv-win.o: src/uv-win.c include/uv.h include/uv-win.h
41+
$(CC) $(CFLAGS) -c src/uv-win.c -o src/uv-win.o
4042

41-
uv-common.o: uv-common.c uv.h uv-win.h
42-
$(CC) $(CFLAGS) -c uv-common.c -o uv-common.o
43+
src/uv-common.o: src/uv-common.c include/uv.h include/uv-win.h
44+
$(CC) $(CFLAGS) -c src/uv-common.c -o src/uv-common.o
45+
46+
EIO_CPPFLAGS += $(CPPFLAGS)
47+
EIO_CPPFLAGS += -DEIO_CONFIG_H=\"$(EIO_CONFIG)\"
48+
EIO_CPPFLAGS += -DEIO_STACKSIZE=65536
49+
EIO_CPPFLAGS += -D_GNU_SOURCE
50+
51+
src/eio/eio.o: src/eio/eio.c
52+
$(CC) $(EIO_CPPFLAGS) $(CFLAGS) -c src/eio/eio.c -o src/eio/eio.o
53+
54+
src/uv-eio.o: src/uv-eio.c
55+
$(CC) $(CPPFLAGS) -Isrc/eio/ $(CFLAGS) -c src/uv-eio.c -o src/uv-eio.o
4356

44-
distclean-platform:
4557
clean-platform:
58+
-rm -f src/ares/*.o
59+
-rm -f src/eio/*.o
60+
61+
distclean-platform:
62+
-rm -f src/ares/*.o
63+
-rm -f src/eio/*.o

src/rt/libuv/config-unix.mk

Lines changed: 77 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,56 @@
1818
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1919
# IN THE SOFTWARE.
2020

21-
CC = $(PREFIX)gcc
22-
AR = $(PREFIX)ar
21+
CC ?= $(PREFIX)gcc
22+
AR ?= $(PREFIX)ar
2323
E=
24-
CFLAGS=--std=gnu89 -Wno-variadic-macros -g
24+
CSTDFLAG=--std=c89 -pedantic
25+
CFLAGS=-g
26+
CPPFLAGS += -Isrc/ev
2527
LINKFLAGS=-lm
2628

29+
CPPFLAGS += -D_LARGEFILE_SOURCE
30+
CPPFLAGS += -D_FILE_OFFSET_BITS=64
31+
2732
ifeq (SunOS,$(uname_S))
33+
EV_CONFIG=config_sunos.h
34+
EIO_CONFIG=config_sunos.h
35+
CPPFLAGS += -Isrc/ares/config_sunos
2836
LINKFLAGS+=-lsocket -lnsl
37+
UV_OS_FILE=uv-sunos.c
38+
endif
39+
40+
ifeq (Darwin,$(uname_S))
41+
EV_CONFIG=config_darwin.h
42+
EIO_CONFIG=config_darwin.h
43+
CPPFLAGS += -Isrc/ares/config_darwin
44+
LINKFLAGS+=-framework CoreServices
45+
UV_OS_FILE=uv-darwin.c
46+
endif
47+
48+
ifeq (Linux,$(uname_S))
49+
EV_CONFIG=config_linux.h
50+
EIO_CONFIG=config_linux.h
51+
CSTDFLAG += -D_XOPEN_SOURCE=600
52+
CPPFLAGS += -Isrc/ares/config_linux
53+
LINKFLAGS+=-lrt
54+
UV_OS_FILE=uv-linux.c
55+
endif
56+
57+
ifeq (FreeBSD,$(uname_S))
58+
EV_CONFIG=config_freebsd.h
59+
EIO_CONFIG=config_freebsd.h
60+
CPPFLAGS += -Isrc/ares/config_freebsd
61+
LINKFLAGS+=
62+
UV_OS_FILE=uv-freebsd.c
63+
endif
64+
65+
ifneq (,$(findstring CYGWIN,$(uname_S)))
66+
EV_CONFIG=config_cygwin.h
67+
EIO_CONFIG=config_cygwin.h
68+
CPPFLAGS += -Isrc/ares/config_cygwin
69+
LINKFLAGS+=
70+
UV_OS_FILE=uv-cygwin.c
2971
endif
3072

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

38-
uv.a: uv-unix.o uv-common.o ev/ev.o
39-
$(AR) rcs uv.a uv-unix.o uv-common.o ev/ev.o
80+
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)
81+
$(AR) rcs uv.a src/uv-unix.o src/uv-platform.o src/uv-common.o src/uv-eio.o src/ev/ev.o \
82+
src/eio/eio.o $(CARES_OBJS)
83+
84+
src/uv-platform.o: src/$(UV_OS_FILE) include/uv.h include/uv-unix.h
85+
$(CC) $(CSTDFLAG) $(CPPFLAGS) $(CFLAGS) -c src/$(UV_OS_FILE) -o src/uv-platform.o
86+
87+
src/uv-unix.o: src/uv-unix.c include/uv.h include/uv-unix.h
88+
$(CC) $(CSTDFLAG) $(CPPFLAGS) -Ieio $(CFLAGS) -c src/uv-unix.c -o src/uv-unix.o
89+
90+
src/uv-common.o: src/uv-common.c include/uv.h include/uv-unix.h
91+
$(CC) $(CSTDFLAG) $(CPPFLAGS) $(CFLAGS) -c src/uv-common.c -o src/uv-common.o
92+
93+
src/ev/ev.o: src/ev/ev.c
94+
$(CC) $(CPPFLAGS) $(CFLAGS) -c src/ev/ev.c -o src/ev/ev.o -DEV_CONFIG_H=\"$(EV_CONFIG)\"
95+
4096

41-
uv-unix.o: uv-unix.c uv.h uv-unix.h
42-
$(CC) $(CFLAGS) -c uv-unix.c -o uv-unix.o
97+
EIO_CPPFLAGS += $(CPPFLAGS)
98+
EIO_CPPFLAGS += -DEIO_CONFIG_H=\"$(EIO_CONFIG)\"
99+
EIO_CPPFLAGS += -DEIO_STACKSIZE=65536
100+
EIO_CPPFLAGS += -D_GNU_SOURCE
43101

44-
uv-common.o: uv-common.c uv.h uv-unix.h
45-
$(CC) $(CFLAGS) -c uv-common.c -o uv-common.o
102+
src/eio/eio.o: src/eio/eio.c
103+
$(CC) $(EIO_CPPFLAGS) $(CFLAGS) -c src/eio/eio.c -o src/eio/eio.o
46104

47-
ev/ev.o: ev/config.h ev/ev.c
48-
$(MAKE) -C ev
105+
src/uv-eio.o: src/uv-eio.c
106+
$(CC) $(CPPFLAGS) -Isrc/eio/ $(CSTDFLAG) $(CFLAGS) -c src/uv-eio.c -o src/uv-eio.o
49107

50-
ev/config.h:
51-
cd ev && ./configure
52108

53109
clean-platform:
54-
$(MAKE) -C ev clean
110+
-rm -f src/ares/*.o
111+
-rm -f src/ev/*.o
112+
-rm -f src/eio/*.o
113+
-rm -rf test/run-tests.dSYM run-benchmarks.dSYM
55114

56115
distclean-platform:
57-
$(MAKE) -C ev distclean
116+
-rm -f src/ares/*.o
117+
-rm -f src/ev/*.o
118+
-rm -f src/eio/*.o
119+
-rm -rf test/run-tests.dSYM run-benchmarks.dSYM
File renamed without changes.

0 commit comments

Comments
 (0)