Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cross-compilation of libjulia #37723

Merged
merged 4 commits into from
Dec 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion base/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ $(BUILDDIR)/errno_h.jl:
$(BUILDDIR)/file_constants.jl: $(SRCDIR)/../src/file_constants.h
@$(call PRINT_PERL, $(CPP_STDOUT) -DJULIA $< | perl -nle 'print "$$1 0o$$2" if /^(\s*const\s+[A-z_]+\s+=)\s+(0[0-9]*)\s*$$/; print "$$1" if /^\s*(const\s+[A-z_]+\s+=\s+([1-9]|0x)[0-9A-z]*)\s*$$/' > $@)

$(BUILDDIR)/uv_constants.jl: $(SRCDIR)/../src/uv_constants.h $(build_includedir)/uv/errno.h
$(BUILDDIR)/uv_constants.jl: $(SRCDIR)/../src/uv_constants.h $(LIBUV_INC)/uv/errno.h
@$(call PRINT_PERL, $(CPP_STDOUT) "-I$(LIBUV_INC)" -DJULIA $< | tail -n 16 > $@)

$(BUILDDIR)/build_h.jl.phony:
Expand Down
4 changes: 2 additions & 2 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ FLISPDIR := $(BUILDDIR)/flisp/host
else
FLISPDIR := $(BUILDDIR)/flisp
endif
FLISP_EXECUTABLE_debug := $(FLISPDIR)/flisp-debug$(EXE)
FLISP_EXECUTABLE_release := $(FLISPDIR)/flisp$(EXE)
FLISP_EXECUTABLE_debug := $(FLISPDIR)/flisp-debug$(BUILD_EXE)
FLISP_EXECUTABLE_release := $(FLISPDIR)/flisp$(BUILD_EXE)
ifeq ($(OS),WINNT)
FLISP_EXECUTABLE := $(FLISP_EXECUTABLE_release)
else
Expand Down
18 changes: 15 additions & 3 deletions src/flisp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,21 @@ OBJS := $(SRCS:%.c=$(BUILDDIR)/%.o)
DOBJS := $(SRCS:%.c=$(BUILDDIR)/%.dbg.obj)
LLT_release := $(LLT_BUILDDIR)/libsupport.a
LLT_debug := $(LLT_BUILDDIR)/libsupport-debug.a
LIBFILES_release := $(LLT_release) $(LIBUV) $(LIBUTF8PROC)
LIBFILES_debug := $(LLT_debug) $(LIBUV) $(LIBUTF8PROC)
LIBFILES_release := $(LLT_release) $(LIBUV)
LIBFILES_debug := $(LLT_debug) $(LIBUV)
LIBS :=
ifneq ($(OS),WINNT)
LIBS += -lpthread
endif

ifeq ($(USE_SYSTEM_UTF8PROC),0)
LIBFILES_release += $(LIBUTF8PROC)
LIBFILES_debug += $(LIBUTF8PROC)
else
LIBS += $(LIBUTF8PROC)
endif


FLAGS := -I$(LLTSRCDIR) $(JCFLAGS) $(HFILEDIRS:%=-I%) \
-I$(LIBUV_INC) -I$(UTF8PROC_INC) -I$(build_includedir) $(LIBDIRS:%=-L%) \
-DLIBRARY_EXPORTS -DUTF8PROC_EXPORTS
Expand Down Expand Up @@ -107,9 +115,13 @@ $(BUILDDIR)/host/Makefile:
@echo 'BUILDING_HOST_TOOLS=1' >> $@
@echo 'include $(SRCDIR)/Makefile' >> $@

$(BUILDDIR)/host/$(EXENAME): $(BUILDDIR)/host/Makefile
$(BUILDDIR)/host/$(EXENAME): $(BUILDDIR)/host/Makefile | ${BUILDDIR}/host/flisp.boot
make -C $(BUILDDIR)/host $(EXENAME)


$(BUILDDIR)/host/flisp.boot: $(SRCDIR)/flisp.boot | $(BUILDDIR)/host/Makefile
cp $< $@

ifneq ($(BUILDDIR),.)
ifneq ($(BUILDDIR),$(SRCDIR))
$(BUILDDIR)/flisp.boot: $(SRCDIR)/flisp.boot | $(BUILDDIR)
Expand Down