annotate src/llvm.mk @ 4037:85abb6c3ec8b

of-netcdf: patch for --enable-64 (Bug #46060) * src/of-netcdf-1-fixes.patch: new file * dist-files.mk: add of-netcdf-1-fixes.patch
author John Donoghue <john.donoghue@ieee.org>
date Tue, 29 Sep 2015 19:43:19 -0400
parents 13be64f9f16d
children 140689282d54
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2333
f653602a0500 Rebrand to new project name MXE
Volker Grabsch <vog@notjusthosting.com>
parents: 2329
diff changeset
1 # This file is part of MXE.
2353
99516e73b368 Move doc/index.html -> index.html
Volker Grabsch <vog@notjusthosting.com>
parents: 2349
diff changeset
2 # See index.html for further information.
2126
18dc5e1dee6f new packages: libxml++ and llvm
Matthias Gehre <M.Gehre@gmx.de>
parents:
diff changeset
3
18dc5e1dee6f new packages: libxml++ and llvm
Matthias Gehre <M.Gehre@gmx.de>
parents:
diff changeset
4 PKG := llvm
2329
466e77a78672 Fix annoying whitespaces at EOL
Volker Grabsch <vog@notjusthosting.com>
parents: 2166
diff changeset
5 $(PKG)_IGNORE :=
3480
13be64f9f16d move version info from index.html to src/*.mk files
John W. Eaton <jwe@octave.org>
parents: 3314
diff changeset
6 $(PKG)_VERSION := 3.3
3279
d4364da17994 Update llvm to 3.3
John Donoghue <john.donoghue@ieee.org>
parents: 3251
diff changeset
7 $(PKG)_CHECKSUM := c6c22d5593419e3cb47cbcf16d967640e5cce133
2163
48db4bc35a28 update package llvm
Tony Theodore <tonyt@logyst.com>
parents: 2129
diff changeset
8 $(PKG)_SUBDIR := llvm-$($(PKG)_VERSION).src
3140
772d03100c0a [MSVC] enable LLVM compilation (and upgrade to LLVM-3.1)
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3048
diff changeset
9 $(PKG)_FILE := llvm-$($(PKG)_VERSION).src.tar.gz
2126
18dc5e1dee6f new packages: libxml++ and llvm
Matthias Gehre <M.Gehre@gmx.de>
parents:
diff changeset
10 $(PKG)_URL := http://llvm.org/releases/$($(PKG)_VERSION)/$($(PKG)_FILE)
3048
5ef49fb3299d treat gcc and binutils as build tools
John W. Eaton <jwe@octave.org>
parents: 3031
diff changeset
11 $(PKG)_DEPS :=
3140
772d03100c0a [MSVC] enable LLVM compilation (and upgrade to LLVM-3.1)
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3048
diff changeset
12 ifeq ($(MXE_SYSTEM),msvc)
772d03100c0a [MSVC] enable LLVM compilation (and upgrade to LLVM-3.1)
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3048
diff changeset
13 $(PKG)_DEPS += libffi
772d03100c0a [MSVC] enable LLVM compilation (and upgrade to LLVM-3.1)
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3048
diff changeset
14 endif
2126
18dc5e1dee6f new packages: libxml++ and llvm
Matthias Gehre <M.Gehre@gmx.de>
parents:
diff changeset
15
18dc5e1dee6f new packages: libxml++ and llvm
Matthias Gehre <M.Gehre@gmx.de>
parents:
diff changeset
16 define $(PKG)_UPDATE
2525
4d0f3a9da57e all packages: use $(WGET) portability variable
Tony Theodore <tonyt@logyst.com>
parents: 2365
diff changeset
17 $(WGET) -q -O- 'http://llvm.org/releases/download.html' | \
2127
c249980b95df package llvm: add update script and ignore v2.9
Tony Theodore <tonyt@logyst.com>
parents: 2126
diff changeset
18 grep 'Download LLVM' | \
c249980b95df package llvm: add update script and ignore v2.9
Tony Theodore <tonyt@logyst.com>
parents: 2126
diff changeset
19 $(SED) -n 's,.*\([0-9]\.[0-9]\).*,\1,p' | \
c249980b95df package llvm: add update script and ignore v2.9
Tony Theodore <tonyt@logyst.com>
parents: 2126
diff changeset
20 head -1
2126
18dc5e1dee6f new packages: libxml++ and llvm
Matthias Gehre <M.Gehre@gmx.de>
parents:
diff changeset
21 endef
18dc5e1dee6f new packages: libxml++ and llvm
Matthias Gehre <M.Gehre@gmx.de>
parents:
diff changeset
22
3030
0d67b4c363cd Changes to llvm to build under native mingw
John Donoghue <john.donoghue@ieee.org>
parents: 3014
diff changeset
23 ifeq ($(MXE_NATIVE_MINGW_BUILD),yes)
3140
772d03100c0a [MSVC] enable LLVM compilation (and upgrade to LLVM-3.1)
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3048
diff changeset
24 ifeq ($(MXE_SYSTEM),msvc)
772d03100c0a [MSVC] enable LLVM compilation (and upgrade to LLVM-3.1)
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3048
diff changeset
25 define $(PKG)_BUILD
772d03100c0a [MSVC] enable LLVM compilation (and upgrade to LLVM-3.1)
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3048
diff changeset
26 mkdir '$(1)/.build'
772d03100c0a [MSVC] enable LLVM compilation (and upgrade to LLVM-3.1)
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3048
diff changeset
27 cd '$(1)/.build' && cmake \
772d03100c0a [MSVC] enable LLVM compilation (and upgrade to LLVM-3.1)
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3048
diff changeset
28 -G "NMake Makefiles" \
3147
9cd2f1a4d68f [MSVC] make LLVM compilation to use clgcc/clg++
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3142
diff changeset
29 -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \
3310
a606177f2057 Support file listing for libffi and llvm.
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3280
diff changeset
30 -DBUILD_SHARED_LIBS=OFF \
3147
9cd2f1a4d68f [MSVC] make LLVM compilation to use clgcc/clg++
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3142
diff changeset
31 -DLLVM_TARGETS_TO_BUILD="X86" \
3310
a606177f2057 Support file listing for libffi and llvm.
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3280
diff changeset
32 -DLLVM_ENABLE_FFI=ON \
3140
772d03100c0a [MSVC] enable LLVM compilation (and upgrade to LLVM-3.1)
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3048
diff changeset
33 "-DFFI_INCLUDE_DIR=$(HOST_LIBDIR)/libffi-$(libffi_VERSION)/include" \
3310
a606177f2057 Support file listing for libffi and llvm.
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3280
diff changeset
34 -DLLVM_REQUIRES_EH=ON \
3140
772d03100c0a [MSVC] enable LLVM compilation (and upgrade to LLVM-3.1)
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3048
diff changeset
35 ../
772d03100c0a [MSVC] enable LLVM compilation (and upgrade to LLVM-3.1)
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3048
diff changeset
36 sed -i '/^ echo "/ {s/echo "/echo /;s/" >>/ >>/;}' \
772d03100c0a [MSVC] enable LLVM compilation (and upgrade to LLVM-3.1)
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3048
diff changeset
37 '$(1)/.build/tools/llvm-config/CMakeFiles/llvm-config.dir/build.make'
772d03100c0a [MSVC] enable LLVM compilation (and upgrade to LLVM-3.1)
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3048
diff changeset
38 cd '$(1)/.build' && \
3310
a606177f2057 Support file listing for libffi and llvm.
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3280
diff changeset
39 env -u MAKE -u MAKEFLAGS nmake && \
a606177f2057 Support file listing for libffi and llvm.
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3280
diff changeset
40 env -u MAKE -u MAKEFLAGS nmake DESTDIR='$(3)' install
3140
772d03100c0a [MSVC] enable LLVM compilation (and upgrade to LLVM-3.1)
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3048
diff changeset
41 endef
772d03100c0a [MSVC] enable LLVM compilation (and upgrade to LLVM-3.1)
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3048
diff changeset
42 else
3030
0d67b4c363cd Changes to llvm to build under native mingw
John Donoghue <john.donoghue@ieee.org>
parents: 3014
diff changeset
43 define $(PKG)_BUILD
0d67b4c363cd Changes to llvm to build under native mingw
John Donoghue <john.donoghue@ieee.org>
parents: 3014
diff changeset
44 mkdir '$(1)/build'
0d67b4c363cd Changes to llvm to build under native mingw
John Donoghue <john.donoghue@ieee.org>
parents: 3014
diff changeset
45 cd '$(1)/build' && ../configure \
0d67b4c363cd Changes to llvm to build under native mingw
John Donoghue <john.donoghue@ieee.org>
parents: 3014
diff changeset
46 $(CONFIGURE_CPPFLAGS) $(CONFIGURE_LDFLAGS) \
0d67b4c363cd Changes to llvm to build under native mingw
John Donoghue <john.donoghue@ieee.org>
parents: 3014
diff changeset
47 $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \
0d67b4c363cd Changes to llvm to build under native mingw
John Donoghue <john.donoghue@ieee.org>
parents: 3014
diff changeset
48 --enable-targets='host-only' \
0d67b4c363cd Changes to llvm to build under native mingw
John Donoghue <john.donoghue@ieee.org>
parents: 3014
diff changeset
49 --disable-docs \
3247
2419325342a5 Update mingw native llvm for dynamic lib
John Donoghue <john.donoghue@ieee.org>
parents: 3239
diff changeset
50 $(ENABLE_SHARED_OR_STATIC) \
3030
0d67b4c363cd Changes to llvm to build under native mingw
John Donoghue <john.donoghue@ieee.org>
parents: 3014
diff changeset
51 --prefix='$(HOST_PREFIX)'
0d67b4c363cd Changes to llvm to build under native mingw
John Donoghue <john.donoghue@ieee.org>
parents: 3014
diff changeset
52
3310
a606177f2057 Support file listing for libffi and llvm.
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3280
diff changeset
53 PATH='$(HOST_BINDIR):$(PATH)' $(MAKE) -C '$(1)/build' -j $(JOBS) install DESTDIR='$(3)'
3247
2419325342a5 Update mingw native llvm for dynamic lib
John Donoghue <john.donoghue@ieee.org>
parents: 3239
diff changeset
54
2419325342a5 Update mingw native llvm for dynamic lib
John Donoghue <john.donoghue@ieee.org>
parents: 3239
diff changeset
55 # create import lib for the dll
2419325342a5 Update mingw native llvm for dynamic lib
John Donoghue <john.donoghue@ieee.org>
parents: 3239
diff changeset
56 $(if $(filter yes, $(BUILD_SHARED)),
2419325342a5 Update mingw native llvm for dynamic lib
John Donoghue <john.donoghue@ieee.org>
parents: 3239
diff changeset
57 cd '$(1)/build/tools/llvm-shlib/Release+Asserts' && \
2419325342a5 Update mingw native llvm for dynamic lib
John Donoghue <john.donoghue@ieee.org>
parents: 3239
diff changeset
58 $(MXE_DLLTOOL) \
3310
a606177f2057 Support file listing for libffi and llvm.
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3280
diff changeset
59 --dllname "LLVM-`$(3)$(HOST_BINDIR)/llvm-config --version`.dll" \
a606177f2057 Support file listing for libffi and llvm.
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3280
diff changeset
60 --def "LLVM-`$(3)$(HOST_BINDIR)/llvm-config --version`.def" \
a606177f2057 Support file listing for libffi and llvm.
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3280
diff changeset
61 --output-lib "libLLVM-`$(3)$(HOST_BINDIR)/llvm-config --version`.a"
a606177f2057 Support file listing for libffi and llvm.
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3280
diff changeset
62 $(INSTALL) -d "$(3)$(HOST_LIBDIR)"
3247
2419325342a5 Update mingw native llvm for dynamic lib
John Donoghue <john.donoghue@ieee.org>
parents: 3239
diff changeset
63 cd '$(1)/build/tools/llvm-shlib/Release+Asserts' && \
2419325342a5 Update mingw native llvm for dynamic lib
John Donoghue <john.donoghue@ieee.org>
parents: 3239
diff changeset
64 $(INSTALL) -m644 \
3310
a606177f2057 Support file listing for libffi and llvm.
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3280
diff changeset
65 "libLLVM-`$(3)$(HOST_BINDIR)/llvm-config --version`.a" \
a606177f2057 Support file listing for libffi and llvm.
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3280
diff changeset
66 "$(3)$(HOST_LIBDIR)"
3247
2419325342a5 Update mingw native llvm for dynamic lib
John Donoghue <john.donoghue@ieee.org>
parents: 3239
diff changeset
67 )
3030
0d67b4c363cd Changes to llvm to build under native mingw
John Donoghue <john.donoghue@ieee.org>
parents: 3014
diff changeset
68 endef
3140
772d03100c0a [MSVC] enable LLVM compilation (and upgrade to LLVM-3.1)
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3048
diff changeset
69 endif
3030
0d67b4c363cd Changes to llvm to build under native mingw
John Donoghue <john.donoghue@ieee.org>
parents: 3014
diff changeset
70 else
2126
18dc5e1dee6f new packages: libxml++ and llvm
Matthias Gehre <M.Gehre@gmx.de>
parents:
diff changeset
71 define $(PKG)_BUILD
18dc5e1dee6f new packages: libxml++ and llvm
Matthias Gehre <M.Gehre@gmx.de>
parents:
diff changeset
72 mkdir '$(1)/build'
3279
d4364da17994 Update llvm to 3.3
John Donoghue <john.donoghue@ieee.org>
parents: 3251
diff changeset
73 cd '$(1)/build' && ../configure \
d4364da17994 Update llvm to 3.3
John Donoghue <john.donoghue@ieee.org>
parents: 3251
diff changeset
74 $(CONFIGURE_CPPFLAGS) $(CONFIGURE_LDFLAGS) \
d4364da17994 Update llvm to 3.3
John Donoghue <john.donoghue@ieee.org>
parents: 3251
diff changeset
75 $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \
d4364da17994 Update llvm to 3.3
John Donoghue <john.donoghue@ieee.org>
parents: 3251
diff changeset
76 --enable-targets='x86' \
d4364da17994 Update llvm to 3.3
John Donoghue <john.donoghue@ieee.org>
parents: 3251
diff changeset
77 --disable-docs \
d4364da17994 Update llvm to 3.3
John Donoghue <john.donoghue@ieee.org>
parents: 3251
diff changeset
78 $(ENABLE_SHARED_OR_STATIC) \
d4364da17994 Update llvm to 3.3
John Donoghue <john.donoghue@ieee.org>
parents: 3251
diff changeset
79 --prefix='$(HOST_PREFIX)'
d4364da17994 Update llvm to 3.3
John Donoghue <john.donoghue@ieee.org>
parents: 3251
diff changeset
80
d4364da17994 Update llvm to 3.3
John Donoghue <john.donoghue@ieee.org>
parents: 3251
diff changeset
81 $(MAKE) -C '$(1)/build' -j $(JOBS)
3310
a606177f2057 Support file listing for libffi and llvm.
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3280
diff changeset
82 $(MAKE) -C '$(1)/build' -j 1 install DESTDIR='$(3)'
3279
d4364da17994 Update llvm to 3.3
John Donoghue <john.donoghue@ieee.org>
parents: 3251
diff changeset
83
3216
11f8ec654cd4 Avoid copying or linking files that are the same when doing native build
John W. Eaton <jwe@octave.org>
parents: 3147
diff changeset
84 if [ $(MXE_NATIVE_BUILD) = no ]; then \
3310
a606177f2057 Support file listing for libffi and llvm.
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3280
diff changeset
85 $(INSTALL) -d '$(3)$(BUILD_TOOLS_PREFIX)/bin'; \
3314
e973e59452dd llvm: Cross compile modifications from filelist support changes
John Donoghue <john.donoghue@ieee.org>
parents: 3310
diff changeset
86 $(INSTALL) -m755 '$(3)$(HOST_BINDIR)/llvm-config-host' '$(3)$(BUILD_TOOLS_PREFIX)/bin/llvm-config'; \
3216
11f8ec654cd4 Avoid copying or linking files that are the same when doing native build
John W. Eaton <jwe@octave.org>
parents: 3147
diff changeset
87 fi
3279
d4364da17994 Update llvm to 3.3
John Donoghue <john.donoghue@ieee.org>
parents: 3251
diff changeset
88
d4364da17994 Update llvm to 3.3
John Donoghue <john.donoghue@ieee.org>
parents: 3251
diff changeset
89 # create import lib for the dll
d4364da17994 Update llvm to 3.3
John Donoghue <john.donoghue@ieee.org>
parents: 3251
diff changeset
90 if [ $(MXE_SYSTEM) = mingw -a $(BUILD_SHARED) = yes ]; then \
d4364da17994 Update llvm to 3.3
John Donoghue <john.donoghue@ieee.org>
parents: 3251
diff changeset
91 cd '$(1)/build/tools/llvm-shlib/Release+Asserts' && \
d4364da17994 Update llvm to 3.3
John Donoghue <john.donoghue@ieee.org>
parents: 3251
diff changeset
92 $(MXE_DLLTOOL) \
3310
a606177f2057 Support file listing for libffi and llvm.
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3280
diff changeset
93 --dllname "LLVM-`$(3)$(BUILD_TOOLS_PREFIX)/bin/llvm-config --version`.dll" \
a606177f2057 Support file listing for libffi and llvm.
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3280
diff changeset
94 --def "LLVM-`$(3)$(BUILD_TOOLS_PREFIX)/bin/llvm-config --version`.def" \
a606177f2057 Support file listing for libffi and llvm.
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3280
diff changeset
95 --output-lib "libLLVM-`$(3)$(BUILD_TOOLS_PREFIX)/bin/llvm-config --version`.a"; \
a606177f2057 Support file listing for libffi and llvm.
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3280
diff changeset
96 $(INSTALL) -d "$(3)$(HOST_LIBDIR)"; \
3279
d4364da17994 Update llvm to 3.3
John Donoghue <john.donoghue@ieee.org>
parents: 3251
diff changeset
97 cd '$(1)/build/tools/llvm-shlib/Release+Asserts' && \
d4364da17994 Update llvm to 3.3
John Donoghue <john.donoghue@ieee.org>
parents: 3251
diff changeset
98 $(INSTALL) -m644 \
3310
a606177f2057 Support file listing for libffi and llvm.
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3280
diff changeset
99 "libLLVM-`$(3)$(BUILD_TOOLS_PREFIX)/bin/llvm-config --version`.a" \
a606177f2057 Support file listing for libffi and llvm.
Michael Goffioul <michael.goffioul@gmail.com>
parents: 3280
diff changeset
100 "$(3)$(HOST_LIBDIR)"; \
3279
d4364da17994 Update llvm to 3.3
John Donoghue <john.donoghue@ieee.org>
parents: 3251
diff changeset
101 fi
d4364da17994 Update llvm to 3.3
John Donoghue <john.donoghue@ieee.org>
parents: 3251
diff changeset
102
2126
18dc5e1dee6f new packages: libxml++ and llvm
Matthias Gehre <M.Gehre@gmx.de>
parents:
diff changeset
103 endef
3030
0d67b4c363cd Changes to llvm to build under native mingw
John Donoghue <john.donoghue@ieee.org>
parents: 3014
diff changeset
104 endif