dev-lang/julia: add new ebuild for 0.6.0
[gentoo.git] / dev-lang / julia / files / julia-9999-fix_build_system.patch
1 diff --git a/Make.inc b/Make.inc
2 index e30c150..e6fdbb2 100644
3 --- a/Make.inc
4 +++ b/Make.inc
5 @@ -399,7 +399,7 @@ ifneq ($(OS), WINNT)
6  JCXXFLAGS += -pedantic
7  endif
8  DEBUGFLAGS := -O0 -ggdb2 -DJL_DEBUG_BUILD -fstack-protector-all
9 -SHIPFLAGS := -O3 -ggdb2 -falign-functions
10 +SHIPFLAGS := GENTOOCFLAGS
11  endif
12  
13  ifeq ($(USECLANG),1)
14 @@ -410,7 +410,7 @@ JCFLAGS := -pipe $(fPIC) -fno-strict-aliasing -D_FILE_OFFSET_BITS=64
15  JCPPFLAGS := -fasynchronous-unwind-tables
16  JCXXFLAGS := -pipe $(fPIC) -fno-rtti -pedantic
17  DEBUGFLAGS := -O0 -g -DJL_DEBUG_BUILD -fstack-protector-all
18 -SHIPFLAGS := -O3 -g
19 +SHIPFLAGS := GENTOOCFLAGS
20  ifeq ($(OS), Darwin)
21  ifeq ($(USE_LIBCPP), 1)
22  MACOSX_VERSION_MIN := 10.8
23 @@ -439,7 +439,7 @@ JCFLAGS := -std=gnu11 -pipe $(fPIC) -fno-strict-aliasing -D_FILE_OFFSET_BITS=64
24  JCPPFLAGS :=
25  JCXXFLAGS := -pipe $(fPIC) -fno-rtti
26  DEBUGFLAGS := -O0 -g -DJL_DEBUG_BUILD -fstack-protector-all
27 -SHIPFLAGS := -O3 -g -falign-functions
28 +SHIPFLAGS := GENTOOCFLAGS
29  endif
30  
31  ifeq ($(USECCACHE), 1)
32 diff --git a/deps/tools/jldownload b/deps/tools/jldownload
33 index ab4fd69..e2c2408 100755
34 --- a/deps/tools/jldownload
35 +++ b/deps/tools/jldownload
36 @@ -5,9 +5,9 @@
37  
38  CACHE_HOST=https://cache.julialang.org
39  
40 -WGET=$(which wget 2>/dev/null)
41 -CURL=$(which curl 2>/dev/null)
42 -FETCH=$(which fetch 2>/dev/null)
43 +WGET=/bin/true
44 +CURL=/bin/true
45 +FETCH=/bin/true
46  
47  TIMEOUT=15 # seconds
48  WGET_OPTS="--no-check-certificate --tries=1 --timeout=$TIMEOUT"
49 diff --git a/doc/Makefile b/doc/Makefile
50 index 743804d..e06dde0 100644
51 --- a/doc/Makefile
52 +++ b/doc/Makefile
53 @@ -25,7 +25,7 @@ deps: UnicodeData.txt
54         $(JLCHECKSUM) UnicodeData.txt
55  
56  clean:
57 -       -rm -rf _build/* deps/* docbuild.log UnicodeData.txt
58 +       @echo "Do not clean doc/_build/html. Just use it..."
59  
60  cleanall: clean
61  
62 diff --git a/src/Makefile b/src/Makefile
63 index f71f53d..7cdd23f 100644
64 --- a/src/Makefile
65 +++ b/src/Makefile
66 @@ -85,20 +85,8 @@ PUBLIC_HEADER_TARGETS := $(addprefix $(build_includedir)/julia/,$(notdir $(PUBLI
67  
68  # In LLVM < 3.4, --ldflags includes both options and libraries, so use it both before and after --libs
69  # In LLVM >= 3.4, --ldflags has only options, and --system-libs has the libraries.
70 -ifneq ($(USE_LLVM_SHLIB),1)
71 -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)
72 -else
73 -ifeq ($(LLVM_USE_CMAKE),1)
74 -LLVMLINK += $(shell $(LLVM_CONFIG_HOST) --ldflags) -lLLVM
75 -else
76 -ifeq ($(OS),WINNT)
77 -LLVMLINK += $(shell $(LLVM_CONFIG_HOST) --ldflags) -lLLVM-$(LLVM_VER_SHORT)
78 -else
79 -LLVMLINK += $(shell $(LLVM_CONFIG_HOST) --ldflags) -lLLVM-$(shell $(LLVM_CONFIG_HOST) --version)
80 -endif # OS == WINNT
81 -endif # LLVM_USE_CMAKE == 1
82 +LLVMLINK = $(call exec,$(LLVM_CONFIG) --ldflags) $(call exec,$(LLVM_CONFIG) --libs) $(call exec,$(LLVM_CONFIG) --ldflags) $(call exec,$(LLVM_CONFIG) --system-libs)
83  FLAGS += -DLLVM_SHLIB
84 -endif # USE_LLVM_SHLIB == 1
85  
86  COMMON_LIBS := -L$(build_shlibdir) -L$(build_libdir) $(LIBUV) $(LIBUTF8PROC) $(NO_WHOLE_ARCHIVE) $(LLVMLINK) $(OSLIBS)
87  DEBUG_LIBS := $(WHOLE_ARCHIVE) $(BUILDDIR)/flisp/libflisp-debug.a $(WHOLE_ARCHIVE) $(BUILDDIR)/support/libsupport-debug.a $(COMMON_LIBS)