summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/julia/files/julia-0.7.0-fix_build_system.patch')
-rw-r--r--dev-lang/julia/files/julia-0.7.0-fix_build_system.patch86
1 files changed, 86 insertions, 0 deletions
diff --git a/dev-lang/julia/files/julia-0.7.0-fix_build_system.patch b/dev-lang/julia/files/julia-0.7.0-fix_build_system.patch
new file mode 100644
index 000000000000..028a2f7e08cc
--- /dev/null
+++ b/dev-lang/julia/files/julia-0.7.0-fix_build_system.patch
@@ -0,0 +1,86 @@
+diff --git a/Make.inc b/Make.inc
+index 8cb2c1014..d3be9de8e 100644
+--- a/Make.inc
++++ b/Make.inc
+@@ -178,7 +178,7 @@ USE_GPL_LIBS ?= 1
+ # Directories where said libraries get installed to
+ prefix ?= $(BUILDROOT)/julia-$(JULIA_COMMIT)
+ bindir := $(prefix)/bin
+-libdir := $(prefix)/lib
++libdir := $(prefix)/GENTOOLIBDIR
+ libexecdir := $(prefix)/libexec
+ datarootdir := $(prefix)/share
+ docdir := $(datarootdir)/doc/julia
+@@ -410,7 +410,7 @@ ifneq ($(OS), WINNT)
+ JCXXFLAGS += -pedantic
+ endif
+ DEBUGFLAGS := -O0 -ggdb2 -DJL_DEBUG_BUILD -fstack-protector-all
+-SHIPFLAGS := -O3 -ggdb2 -falign-functions
++SHIPFLAGS := GENTOOCFLAGS
+ endif
+
+ ifeq ($(USECLANG),1)
+@@ -421,7 +421,7 @@ JCFLAGS := -pipe $(fPIC) -fno-strict-aliasing -D_FILE_OFFSET_BITS=64
+ JCPPFLAGS := -fasynchronous-unwind-tables
+ JCXXFLAGS := -pipe $(fPIC) -fno-rtti -pedantic
+ DEBUGFLAGS := -O0 -g -DJL_DEBUG_BUILD -fstack-protector-all
+-SHIPFLAGS := -O3 -g
++SHIPFLAGS := GENTOOCFLAGS
+ ifeq ($(OS), Darwin)
+ ifeq ($(USE_LIBCPP), 1)
+ MACOSX_VERSION_MIN := 10.8
+@@ -450,7 +450,7 @@ JCFLAGS := -std=gnu11 -pipe $(fPIC) -fno-strict-aliasing -D_FILE_OFFSET_BITS=64
+ JCPPFLAGS :=
+ JCXXFLAGS := -pipe $(fPIC) -fno-rtti
+ DEBUGFLAGS := -O0 -g -DJL_DEBUG_BUILD -fstack-protector-all
+-SHIPFLAGS := -O3 -g -falign-functions
++SHIPFLAGS := GENTOOCFLAGS
+ endif
+
+ ifeq ($(USECCACHE), 1)
+diff --git a/doc/Makefile b/doc/Makefile
+index 89b79880d..c3125fde1 100644
+--- a/doc/Makefile
++++ b/doc/Makefile
+@@ -29,7 +29,7 @@ deps: UnicodeData.txt
+ $(JLCHECKSUM) UnicodeData.txt
+
+ clean:
+- -rm -rf _build/* deps/* docbuild.log UnicodeData.txt
++ @echo "Do not clean doc/_build/html. Just use it..."
+
+ cleanall: clean
+
+diff --git a/src/Makefile b/src/Makefile
+index 257152d24..240a4a350 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -85,16 +85,7 @@ UV_HEADERS += uv/*.h
+ endif
+ PUBLIC_HEADER_TARGETS := $(addprefix $(build_includedir)/julia/,$(notdir $(PUBLIC_HEADERS)) $(UV_HEADERS))
+
+-ifeq ($(JULIACODEGEN),LLVM)
+-# In LLVM < 3.4, --ldflags includes both options and libraries, so use it both before and after --libs
+-# In LLVM >= 3.4, --ldflags has only options, and --system-libs has the libraries.
+-ifneq ($(USE_LLVM_SHLIB),1)
+-LLVMLINK += $(shell $(LLVM_CONFIG_HOST) --ldflags) $(shell $(LLVM_CONFIG_HOST) --libs $(LLVM_LIBS)) $(shell $(LLVM_CONFIG_HOST) --ldflags) $(shell $(LLVM_CONFIG_HOST) --system-libs 2> /dev/null)
+-else
+-LLVMLINK += $(shell $(LLVM_CONFIG_HOST) --ldflags) -lLLVM
+-FLAGS += -DLLVM_SHLIB
+-endif # USE_LLVM_SHLIB == 1
+-endif
++LLVMLINK = $(call exec,$(LLVM_CONFIG) --ldflags) $(call exec,$(LLVM_CONFIG) --libs) $(call exec,$(LLVM_CONFIG) --ldflags) $(call exec,$(LLVM_CONFIG) --system-libs)
+
+ COMMON_LIBS := -L$(build_shlibdir) -L$(build_libdir) $(LIBUV) $(LIBUTF8PROC) $(NO_WHOLE_ARCHIVE) $(LLVMLINK) $(OSLIBS)
+ DEBUG_LIBS := $(WHOLE_ARCHIVE) $(BUILDDIR)/flisp/libflisp-debug.a $(WHOLE_ARCHIVE) $(BUILDDIR)/support/libsupport-debug.a $(COMMON_LIBS)
+
+--- a/base/Makefile 2018-08-10 23:56:13.825429621 -0400
++++ b/base/Makefile 2018-08-10 23:43:29.461769645 -0400
+@@ -207,7 +207,6 @@
+ ln -sf "$$REALPATH" "$@"
+ ifneq ($(USE_SYSTEM_LLVM),0)
+ ifneq ($(USE_LLVM_SHLIB),0)
+-SYMLINK_SYSTEM_LIBRARIES += symlink_libLLVM
+ endif
+ endif
+