Skip to content

Commit

Permalink
Add libjulia 1.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin committed Oct 17, 2020
1 parent 10760ad commit 52e02e3
Show file tree
Hide file tree
Showing 7 changed files with 186 additions and 2 deletions.
16 changes: 14 additions & 2 deletions L/libjulia/common.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ function configure(version)
name = "libjulia"

checksums = Dict(
v"1.3.1" => "3d9037d281fb41ad67b443f42d8a8e400b016068d142d6fafce1952253ae93db",
v"1.4.2" => "76a94e06e68fb99822e0876a37c2ed3873e9061e895ab826fd8c9fc7e2f52795",
v"1.5.1" => "1f138205772eb1e565f1d7ccd6f237be8a4d18713a3466e3b8d3a6aad6483fd9",
)
Expand Down Expand Up @@ -71,7 +72,9 @@ function configure(version)
elif [[ "${target}" == *apple* ]]; then
LLVMLINK="-L${prefix}/lib -lLLVM"
else
if [[ "${version}" == 1.4.* ]]; then
if [[ "${version}" == 1.3.* ]]; then
LLVMLINK="-L${prefix}/lib -lLLVM-6.0"
elif [[ "${version}" == 1.4.* ]]; then
LLVMLINK="-L${prefix}/lib -lLLVM-8jl"
else
LLVMLINK="-L${prefix}/lib -lLLVM-9jl"
Expand Down Expand Up @@ -175,6 +178,10 @@ function configure(version)
platforms = supported_platforms()
# For now skip FreeBSD...
filter!(!Sys.isfreebsd, platforms)
if version < v"1.4"
# in Julia <= 1.3 skip PowerPC builds (see https://github.com/JuliaPackaging/Yggdrasil/pull/1795)
filter!(p -> !(Sys.islinux(p) && arch(p) == "powerpc64le"), platforms)
end
if version < v"1.5"
# in Julia <= 1.4 skip all musl builds
filter!(p -> !(Sys.islinux(p) && libc(p) == "musl"), platforms)
Expand Down Expand Up @@ -220,7 +227,12 @@ function configure(version)
Dependency("MPFR_jll"),
Dependency("GMP_jll"),
]
if version.major == 1 && version.minor == 4
if version.major == 1 && version.minor == 3
push!(dependencies, Dependency(PackageSpec(name="OpenBLAS_jll", version=v"0.3.5")))
# there is no libLLVM_jll 6.0.1, so we use LLVM_jll instead
push!(dependencies, Dependency(PackageSpec(name="LLVM_jll", version=v"6.0.1")))
push!(dependencies, Dependency(PackageSpec(name="LibGit2_jll", version=v"0.28.2")))
elseif version.major == 1 && version.minor == 4
push!(dependencies, Dependency(PackageSpec(name="OpenBLAS_jll", version=v"0.3.5")))
push!(dependencies, Dependency(PackageSpec(name="libLLVM_jll", version=v"8.0.1")))
push!(dependencies, Dependency(PackageSpec(name="LibGit2_jll", version=v"0.28.2")))
Expand Down
7 changes: 7 additions & 0 deletions L/libjulia/[email protected]/build_tarballs.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
include("../common.jl")

name, version, sources, script, platforms, products, dependencies = configure(v"1.3.1")

# Build the tarballs.
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; preferred_gcc_version=v"7", lock_microarchitecture=false)

Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
From 30c32040d81ba909242b6e5786772efa94e8120f Mon Sep 17 00:00:00 2001
From: Valentin Churavy <[email protected]>
Date: Wed, 23 Sep 2020 16:48:49 -0400
Subject: [PATCH] Allow flips to be built against system UTF8PROC

---
src/flisp/Makefile | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/flisp/Makefile b/src/flisp/Makefile
index 2158e2a5b2..42c4e11ed4 100644
--- a/src/flisp/Makefile
+++ b/src/flisp/Makefile
@@ -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
--
2.28.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From 85eb6fe1d4dc2d98974c5d3e78b735e887b7b439 Mon Sep 17 00:00:00 2001
From: Valentin Churavy <[email protected]>
Date: Wed, 23 Sep 2020 16:59:34 -0400
Subject: [PATCH] Use universal LIBUV_INC instead of build_includedir

---
base/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/base/Makefile b/base/Makefile
index efcf835de7..13bb3ee53d 100644
--- a/base/Makefile
+++ b/base/Makefile
@@ -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:
--
2.28.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
From 242ff9a084fe790ac589c55045efc1d5c5f95f4b Mon Sep 17 00:00:00 2001
From: Valentin Churavy <[email protected]>
Date: Wed, 23 Sep 2020 18:28:01 -0400
Subject: [PATCH] stage flisp.boot into host

---
src/flisp/Makefile | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/flisp/Makefile b/src/flisp/Makefile
index 42c4e11ed4..50566a0258 100644
--- a/src/flisp/Makefile
+++ b/src/flisp/Makefile
@@ -115,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)$(BUILDING_HOST_TOOLS),.)
$(BUILDDIR)/flisp.boot: $(SRCDIR)/flisp.boot | $(BUILDDIR)
cp $< $@
--
2.28.0

42 changes: 42 additions & 0 deletions L/libjulia/[email protected]/bundled/patches/0004-musl.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
From f0dd7818f04ea3d68d534f460b69a6c3b4afbfd2 Mon Sep 17 00:00:00 2001
From: Julian Samaroo <[email protected]>
Date: Mon, 18 May 2020 20:58:07 -0500
Subject: [PATCH] Make processor_arm.cpp compile on musl (#34777)

---
src/processor_arm.cpp | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/processor_arm.cpp b/src/processor_arm.cpp
index 7b5fe0003bb5..96ca1789f593 100644
--- a/src/processor_arm.cpp
+++ b/src/processor_arm.cpp
@@ -10,10 +10,16 @@
#include <fstream>
#include <algorithm>

-#if defined(_CPU_AARCH64_) || __GLIBC_PREREQ(2, 16)
+// This nesting is required to allow compilation on musl
+#define USE_DYN_GETAUXVAL
+#if defined(_CPU_AARCH64_)
+# undef USE_DYN_GETAUXVAL
# include <sys/auxv.h>
-#else
-# define DYN_GETAUXVAL
+#elif defined(__GLIBC_PREREQ)
+# if __GLIBC_PREREQ(2, 16)
+# undef USE_DYN_GETAUXVAL
+# include <sys/auxv.h>
+# endif
#endif

namespace ARM {
@@ -498,7 +504,7 @@ static constexpr size_t ncpu_names = sizeof(cpus) / sizeof(cpus[0]);
# define AT_HWCAP2 26
#endif

-#if defined(DYN_GETAUXVAL)
+#if defined(USE_DYN_GETAUXVAL)
static unsigned long getauxval_procfs(unsigned long type)
{
int fd = open("/proc/self/auxv", O_RDONLY);
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
From 956cf8fa2f07f43ffb0a91bd23741e83838f9e7a Mon Sep 17 00:00:00 2001
From: Valentin Churavy <[email protected]>
Date: Thu, 24 Sep 2020 09:41:49 -0400
Subject: [PATCH] use BUILD_EXE for flisp

---
src/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/Makefile b/src/Makefile
index 578677b3e1..2852b0ac86 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -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
--
2.28.0

0 comments on commit 52e02e3

Please sign in to comment.