diff --git a/Make.inc b/Make.inc index f536d15d9b08cc..182716a2f8b0fc 100644 --- a/Make.inc +++ b/Make.inc @@ -912,7 +912,7 @@ ifeq ($(USE_SYSTEM_LIBUV), 1) LIBUV := $(LOCALBASE)/lib/libuv-julia.a LIBUV_INC := $(LOCALBASE)/include else - LIBUV := $(build_libdir)/libuv.a + LIBUV := -luv LIBUV_INC := $(build_includedir) endif diff --git a/Makefile b/Makefile index 3dd4746f1503ed..e4412cc8e40869 100644 --- a/Makefile +++ b/Makefile @@ -171,6 +171,7 @@ JL_PRIVATE_LIBS-$(USE_SYSTEM_MBEDTLS) += libmbedtls libmbedcrypto libmbedx509 JL_PRIVATE_LIBS-$(USE_SYSTEM_CURL) += libcurl JL_PRIVATE_LIBS-$(USE_SYSTEM_LIBGIT2) += libgit2 JL_PRIVATE_LIBS-$(USE_SYSTEM_LIBUNWIND) += libunwind +JL_PRIVATE_LIBS-$(USE_SYSTEM_LIBUV) += libuv ifeq ($(USE_LLVM_SHLIB),1) JL_PRIVATE_LIBS-$(USE_SYSTEM_LLVM) += libLLVM libLLVM-6 endif diff --git a/src/Makefile b/src/Makefile index 40070d353758c3..b1b05952961672 100644 --- a/src/Makefile +++ b/src/Makefile @@ -277,7 +277,7 @@ else SONAME_DEBUG := endif -$(build_shlibdir)/libjulia-debug.$(JL_MAJOR_MINOR_SHLIB_EXT): $(SRCDIR)/julia.expmap $(DOBJS) $(BUILDDIR)/flisp/libflisp-debug.a $(BUILDDIR)/support/libsupport-debug.a $(LIBUV) +$(build_shlibdir)/libjulia-debug.$(JL_MAJOR_MINOR_SHLIB_EXT): $(SRCDIR)/julia.expmap $(DOBJS) $(BUILDDIR)/flisp/libflisp-debug.a $(BUILDDIR)/support/libsupport-debug.a @$(call PRINT_LINK, $(CXXLD) $(JCXXFLAGS) $(CXXLDFLAGS) $(DEBUGFLAGS) $(DOBJS) $(RPATH_LIB) -o $@ $(JLDFLAGS) $(JLIBLDFLAGS) $(DEBUG_LIBS) $(SONAME_DEBUG)) $(INSTALL_NAME_CMD)libjulia-debug.$(SHLIB_EXT) $@ ifneq ($(OS), WINNT) @@ -292,7 +292,7 @@ $(BUILDDIR)/libjulia-debug.a: $(SRCDIR)/julia.expmap $(DOBJS) $(BUILDDIR)/flisp/ libjulia-debug: $(build_shlibdir)/libjulia-debug.$(JL_MAJOR_MINOR_SHLIB_EXT) $(PUBLIC_HEADER_TARGETS) -$(build_shlibdir)/libjulia.$(JL_MAJOR_MINOR_SHLIB_EXT): $(SRCDIR)/julia.expmap $(OBJS) $(BUILDDIR)/flisp/libflisp.a $(BUILDDIR)/support/libsupport.a $(LIBUV) +$(build_shlibdir)/libjulia.$(JL_MAJOR_MINOR_SHLIB_EXT): $(SRCDIR)/julia.expmap $(OBJS) $(BUILDDIR)/flisp/libflisp.a $(BUILDDIR)/support/libsupport.a @$(call PRINT_LINK, $(CXXLD) $(JCXXFLAGS) $(CXXLDFLAGS) $(SHIPFLAGS) $(OBJS) $(RPATH_LIB) -o $@ $(JLDFLAGS) $(JLIBLDFLAGS) $(RELEASE_LIBS) $(SONAME)) $(INSTALL_NAME_CMD)libjulia.$(SHLIB_EXT) $@ ifneq ($(OS), WINNT) diff --git a/src/flisp/Makefile b/src/flisp/Makefile index d1d92ab4c87bf5..6cc2d3800feaa1 100644 --- a/src/flisp/Makefile +++ b/src/flisp/Makefile @@ -22,9 +22,9 @@ OBJS := $(SRCS:%.c=$(BUILDDIR)/%.o) DOBJS := $(SRCS:%.c=$(BUILDDIR)/%.dbg.obj) LLT_release := $(BUILDDIR)/$(LLTDIR)/libsupport.a LLT_debug := $(BUILDDIR)/$(LLTDIR)/libsupport-debug.a -LIBFILES_release := $(LLT_release) $(LIBUV) $(LIBUTF8PROC) -LIBFILES_debug := $(LLT_debug) $(LIBUV) $(LIBUTF8PROC) -LIBS := +LIBFILES_release := $(LLT_release) $(LIBUTF8PROC) +LIBFILES_debug := $(LLT_debug) $(LIBUTF8PROC) +LIBS := $(LIBUV) ifneq ($(OS),WINNT) LIBS += -lpthread endif @@ -79,10 +79,10 @@ CCLD := $(LD) endif $(BUILDDIR)/$(EXENAME)-debug$(EXE): $(DOBJS) $(LIBFILES_debug) $(BUILDDIR)/$(LIBTARGET)-debug.a $(BUILDDIR)/flmain.dbg.obj | $(BUILDDIR)/flisp.boot - @$(call PRINT_LINK, $(CCLD) $(DEBUGFLAGS) $(JLDFLAGS) $(DOBJS) $(BUILDDIR)/flmain.dbg.obj -o $@ $(BUILDDIR)/$(LIBTARGET)-debug.a $(LIBFILES_debug) $(LIBS) $(OSLIBS)) + @$(call PRINT_LINK, $(CCLD) $(DEBUGFLAGS) $(JLDFLAGS) $(DOBJS) $(BUILDDIR)/flmain.dbg.obj -o $@ $(BUILDDIR)/$(LIBTARGET)-debug.a $(LIBFILES_debug) -static $(LIBS) $(OSLIBS)) $(BUILDDIR)/$(EXENAME)$(EXE): $(OBJS) $(LIBFILES_release) $(BUILDDIR)/$(LIBTARGET).a $(BUILDDIR)/flmain.o | $(BUILDDIR)/flisp.boot - @$(call PRINT_LINK, $(CCLD) $(SHIPFLAGS) $(JLDFLAGS) $(OBJS) $(BUILDDIR)/flmain.o -o $@ $(BUILDDIR)/$(LIBTARGET).a $(LIBFILES_release) $(LIBS) $(OSLIBS)) + @$(call PRINT_LINK, $(CCLD) $(SHIPFLAGS) $(JLDFLAGS) $(OBJS) $(BUILDDIR)/flmain.o -o $@ $(BUILDDIR)/$(LIBTARGET).a $(LIBFILES_release) -static $(LIBS) $(OSLIBS)) ifneq ($(BUILDDIR),.) $(BUILDDIR)/flisp.boot: flisp.boot | $(BUILDDIR) diff --git a/ui/Makefile b/ui/Makefile index 8f69136d1a5014..97c65797cf57c6 100644 --- a/ui/Makefile +++ b/ui/Makefile @@ -23,7 +23,7 @@ OBJS := $(SRCS:%=$(BUILDDIR)/%.o) DOBJS := $(SRCS:%=$(BUILDDIR)/%.dbg.obj) DEBUGFLAGS += $(FLAGS) SHIPFLAGS += $(FLAGS) -JLDFLAGS += $(LDFLAGS) $(NO_WHOLE_ARCHIVE) $(OSLIBS) $(RPATH) +JLDFLAGS += $(LDFLAGS) $(NO_WHOLE_ARCHIVE) $(OSLIBS) $(LIBUV) $(RPATH) ifeq ($(USE_SYSTEM_LIBM),0) ifneq ($(UNTRUSTED_SYSTEM_LIBM),0)