Mercurial > mxe-octave
annotate src/llvm.mk @ 3142:0d23e586d872
src/llvm.mk: fix compilation for LLVM-3.1
author | Michael Goffioul <michael.goffioul@gmail.com> |
---|---|
date | Mon, 15 Jul 2013 21:06:54 -0400 |
parents | 772d03100c0a |
children | 9cd2f1a4d68f |
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 := |
3140
772d03100c0a
[MSVC] enable LLVM compilation (and upgrade to LLVM-3.1)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3048
diff
changeset
|
6 $(PKG)_CHECKSUM := 234c96e73ef81aec9a54da92fc2a9024d653b059 |
2163 | 7 $(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
|
8 $(PKG)_FILE := llvm-$($(PKG)_VERSION).src.tar.gz |
2126
18dc5e1dee6f
new packages: libxml++ and llvm
Matthias Gehre <M.Gehre@gmx.de>
parents:
diff
changeset
|
9 $(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
|
10 $(PKG)_DEPS := |
3140
772d03100c0a
[MSVC] enable LLVM compilation (and upgrade to LLVM-3.1)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3048
diff
changeset
|
11 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
|
12 $(PKG)_DEPS += libffi |
772d03100c0a
[MSVC] enable LLVM compilation (and upgrade to LLVM-3.1)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3048
diff
changeset
|
13 endif |
2126
18dc5e1dee6f
new packages: libxml++ and llvm
Matthias Gehre <M.Gehre@gmx.de>
parents:
diff
changeset
|
14 |
18dc5e1dee6f
new packages: libxml++ and llvm
Matthias Gehre <M.Gehre@gmx.de>
parents:
diff
changeset
|
15 define $(PKG)_UPDATE |
2525
4d0f3a9da57e
all packages: use $(WGET) portability variable
Tony Theodore <tonyt@logyst.com>
parents:
2365
diff
changeset
|
16 $(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
|
17 grep 'Download LLVM' | \ |
c249980b95df
package llvm: add update script and ignore v2.9
Tony Theodore <tonyt@logyst.com>
parents:
2126
diff
changeset
|
18 $(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
|
19 head -1 |
2126
18dc5e1dee6f
new packages: libxml++ and llvm
Matthias Gehre <M.Gehre@gmx.de>
parents:
diff
changeset
|
20 endef |
18dc5e1dee6f
new packages: libxml++ and llvm
Matthias Gehre <M.Gehre@gmx.de>
parents:
diff
changeset
|
21 |
3030
0d67b4c363cd
Changes to llvm to build under native mingw
John Donoghue <john.donoghue@ieee.org>
parents:
3014
diff
changeset
|
22 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
|
23 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
|
24 define $(PKG)_BUILD |
772d03100c0a
[MSVC] enable LLVM compilation (and upgrade to LLVM-3.1)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3048
diff
changeset
|
25 mkdir '$(1)/.build' |
772d03100c0a
[MSVC] enable LLVM compilation (and upgrade to LLVM-3.1)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3048
diff
changeset
|
26 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
|
27 -G "NMake Makefiles" \ |
772d03100c0a
[MSVC] enable LLVM compilation (and upgrade to LLVM-3.1)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3048
diff
changeset
|
28 -DCMAKE_BUILD_TYPE="Release" \ |
772d03100c0a
[MSVC] enable LLVM compilation (and upgrade to LLVM-3.1)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3048
diff
changeset
|
29 "-DCMAKE_INSTALL_PREFIX:PATH=$(HOST_PREFIX)" \ |
772d03100c0a
[MSVC] enable LLVM compilation (and upgrade to LLVM-3.1)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3048
diff
changeset
|
30 -DLLVM_ENABLE_FFI:BOOL=ON \ |
772d03100c0a
[MSVC] enable LLVM compilation (and upgrade to LLVM-3.1)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3048
diff
changeset
|
31 "-DFFI_INCLUDE_DIR=$(HOST_LIBDIR)/libffi-$(libffi_VERSION)/include" \ |
772d03100c0a
[MSVC] enable LLVM compilation (and upgrade to LLVM-3.1)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3048
diff
changeset
|
32 ../ |
772d03100c0a
[MSVC] enable LLVM compilation (and upgrade to LLVM-3.1)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3048
diff
changeset
|
33 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
|
34 '$(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
|
35 cd '$(1)/.build' && \ |
772d03100c0a
[MSVC] enable LLVM compilation (and upgrade to LLVM-3.1)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3048
diff
changeset
|
36 env -u MAKE -u MAKEFLAGS \ |
772d03100c0a
[MSVC] enable LLVM compilation (and upgrade to LLVM-3.1)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3048
diff
changeset
|
37 LIB="`echo \`cd ../../../usr/i686-pc-mingw32/lib && pwd -W\` | sed -e 's,/,\\\\\\\\,g'`\;$$LIB" \ |
772d03100c0a
[MSVC] enable LLVM compilation (and upgrade to LLVM-3.1)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3048
diff
changeset
|
38 nmake && \ |
772d03100c0a
[MSVC] enable LLVM compilation (and upgrade to LLVM-3.1)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3048
diff
changeset
|
39 env -u MAKE -u MAKEFLAGS nmake install |
772d03100c0a
[MSVC] enable LLVM compilation (and upgrade to LLVM-3.1)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3048
diff
changeset
|
40 endef |
772d03100c0a
[MSVC] enable LLVM compilation (and upgrade to LLVM-3.1)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3048
diff
changeset
|
41 else |
3030
0d67b4c363cd
Changes to llvm to build under native mingw
John Donoghue <john.donoghue@ieee.org>
parents:
3014
diff
changeset
|
42 define $(PKG)_BUILD |
0d67b4c363cd
Changes to llvm to build under native mingw
John Donoghue <john.donoghue@ieee.org>
parents:
3014
diff
changeset
|
43 mkdir '$(1)/build' |
0d67b4c363cd
Changes to llvm to build under native mingw
John Donoghue <john.donoghue@ieee.org>
parents:
3014
diff
changeset
|
44 cd '$(1)/build' && ../configure \ |
0d67b4c363cd
Changes to llvm to build under native mingw
John Donoghue <john.donoghue@ieee.org>
parents:
3014
diff
changeset
|
45 $(CONFIGURE_CPPFLAGS) $(CONFIGURE_LDFLAGS) \ |
0d67b4c363cd
Changes to llvm to build under native mingw
John Donoghue <john.donoghue@ieee.org>
parents:
3014
diff
changeset
|
46 $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \ |
0d67b4c363cd
Changes to llvm to build under native mingw
John Donoghue <john.donoghue@ieee.org>
parents:
3014
diff
changeset
|
47 --enable-targets='host-only' \ |
0d67b4c363cd
Changes to llvm to build under native mingw
John Donoghue <john.donoghue@ieee.org>
parents:
3014
diff
changeset
|
48 --disable-docs \ |
0d67b4c363cd
Changes to llvm to build under native mingw
John Donoghue <john.donoghue@ieee.org>
parents:
3014
diff
changeset
|
49 --without-python \ |
0d67b4c363cd
Changes to llvm to build under native mingw
John Donoghue <john.donoghue@ieee.org>
parents:
3014
diff
changeset
|
50 --disable-shared --enable-static \ |
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 |
0d67b4c363cd
Changes to llvm to build under native mingw
John Donoghue <john.donoghue@ieee.org>
parents:
3014
diff
changeset
|
53 PATH='$(HOST_BINDIR):$(PATH)' $(MAKE) -C '$(1)/build' -j $(JOBS) install |
3031
951da75fd09c
improve handling of cross tool prefix
John W. Eaton <jwe@octave.org>
parents:
3030
diff
changeset
|
54 $(LN_SF) '$(HOST_BINDIR)/llvm-config' '$(BUILD_TOOLS_PREFIX)/bin/$(MXE_TOOL_PREFIX)llvm-config' |
3030
0d67b4c363cd
Changes to llvm to build under native mingw
John Donoghue <john.donoghue@ieee.org>
parents:
3014
diff
changeset
|
55 endef |
3140
772d03100c0a
[MSVC] enable LLVM compilation (and upgrade to LLVM-3.1)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3048
diff
changeset
|
56 endif |
3030
0d67b4c363cd
Changes to llvm to build under native mingw
John Donoghue <john.donoghue@ieee.org>
parents:
3014
diff
changeset
|
57 else |
2126
18dc5e1dee6f
new packages: libxml++ and llvm
Matthias Gehre <M.Gehre@gmx.de>
parents:
diff
changeset
|
58 define $(PKG)_BUILD |
18dc5e1dee6f
new packages: libxml++ and llvm
Matthias Gehre <M.Gehre@gmx.de>
parents:
diff
changeset
|
59 mkdir '$(1)/build' |
18dc5e1dee6f
new packages: libxml++ and llvm
Matthias Gehre <M.Gehre@gmx.de>
parents:
diff
changeset
|
60 cd '$(1)/build' && cmake .. \ |
18dc5e1dee6f
new packages: libxml++ and llvm
Matthias Gehre <M.Gehre@gmx.de>
parents:
diff
changeset
|
61 -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ |
2129
2373562288ba
package llvm: disable unnecessary components and targets
Tony Theodore <tonyt@logyst.com>
parents:
2127
diff
changeset
|
62 -DLIBTYPE=STATIC \ |
3142
0d23e586d872
src/llvm.mk: fix compilation for LLVM-3.1
Michael Goffioul <michael.goffioul@gmail.com>
parents:
3140
diff
changeset
|
63 -DLLVM_TARGETS_TO_BUILD="X86" \ |
2129
2373562288ba
package llvm: disable unnecessary components and targets
Tony Theodore <tonyt@logyst.com>
parents:
2127
diff
changeset
|
64 -DLLVM_BUILD_TOOLS=OFF |
2166
1b0d2421cb80
package llvm: re-enable parallel build
Tony Theodore <tonyt@logyst.com>
parents:
2165
diff
changeset
|
65 $(MAKE) -C '$(1)/build' -j $(JOBS) llvm-tblgen |
1b0d2421cb80
package llvm: re-enable parallel build
Tony Theodore <tonyt@logyst.com>
parents:
2165
diff
changeset
|
66 $(MAKE) -C '$(1)/build' -j $(JOBS) intrinsics_gen |
1b0d2421cb80
package llvm: re-enable parallel build
Tony Theodore <tonyt@logyst.com>
parents:
2165
diff
changeset
|
67 $(MAKE) -C '$(1)/build' -j $(JOBS) install |
3031
951da75fd09c
improve handling of cross tool prefix
John W. Eaton <jwe@octave.org>
parents:
3030
diff
changeset
|
68 $(LN_SF) '$(HOST_BINDIR)/llvm-config' '$(BUILD_TOOLS_PREFIX)/bin/$(MXE_TOOL_PREFIX)llvm-config' |
2126
18dc5e1dee6f
new packages: libxml++ and llvm
Matthias Gehre <M.Gehre@gmx.de>
parents:
diff
changeset
|
69 endef |
3030
0d67b4c363cd
Changes to llvm to build under native mingw
John Donoghue <john.donoghue@ieee.org>
parents:
3014
diff
changeset
|
70 endif |