summaryrefslogtreecommitdiff
path: root/open_issues/llvm.mdwn
blob: 3ce4228196eeb52f5ab90c73068b62c646e9cf31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
[[!meta copyright="Copyright © 2011, 2012, 2013 Free Software Foundation,
Inc."]]

[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
id="license" text="Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no Invariant
Sections, no Front-Cover Texts, and no Back-Cover Texts.  A copy of the license
is included in the section entitled [[GNU Free Documentation
License|/fdl]]."]]"""]]

[[!tag open_issue_llvm]]

Here's what's to be done for maintaining [[/LLVM]].

Apart from the target-specific configuration machinery, there shouldn't be any
major differences within LLVM between the GNU/Hurd and GNU/Linux ports, for
example.  Especially all the compiler magic is all the same.

[[!toc levels=2]]


# [[General information|/llvm]]


# [[Sources|source_repositories/llvm]]


# Configuration

<!--

For all of llvm, clang, compiler-rt, test-suite:

git checkout reviewed
git log --reverse --topo-order --pretty=fuller --stat=$COLUMNS,$COLUMNS -w -p -C --cc ..upstream/master
-i
/^commit |^merge:|^---$|hurd|linux|nacl|nptl|glibc|gs:

-->

Last reviewed up to the [[Git mirror's sources|source_repositories/llvm]]: llvm
7bf2e1b9ef797fda5de53956a1d2aea900ce794f (2013-01-09), clang
35eb8c3e12cac22f91d1cd4c74ae092ebc94fc40 (2013-01-09), compiler-rt
b1d1ef27db5b6c7788cda3dfd5deb6037dd4a3b8 (2013-01-09), test-suite
a26cfd0ef760f09e753b76d3e633a6af9ed637f8 (2013-01-08).

  * Configure fragments that have `*linux*` cases might/should often contain
    those for us (and GNU/k*BSD) as well.

  * <http://anonscm.debian.org/viewvc/pkg-llvm/llvm/trunk/debian/patches/>.

  * [low] Some `PATH_MAX`/`MAXPATHLEN` things.

  * Review `gs:` usage in `[llvm]/lib/Target/X86/`, `[llvm]/test/CodeGen/X86/`,
    `[llvm]/test/MC/X86/`.
./clang/tschwinge/Hank_Mobley/docs/LanguageExtensions.rst:          movl    %gs:(%eax), %eax
./clang/tschwinge/Hank_Mobley/test/Sema/asm.c:  asm volatile ("movb %%gs:%P2,%b0" : "=q"(b) : "0"(0), "i"(5L));


# Build

Here's a log of a LLVM build run; this is from our [[Git repository's
sources|source_repositories/llvm]], llvm
792d08f44e4386ea671c1313cad9dfc9fc853794 (2013-01-09), clang
1d2e1d18ae77b1949a31203ed7001b5817f29b09 (2013-01-09), compiler-rt
b1d1ef27db5b6c7788cda3dfd5deb6037dd4a3b8 (2013-01-09), test-suite
a26cfd0ef760f09e753b76d3e633a6af9ed637f8 (2013-01-08), run on kepler.SCHWINGE
and coulomb.SCHWINGE.

    $ export LC_ALL=C
    $ (cd ../Horace_Silver/ && ln -sfn ../../../clang/tschwinge/Hank_Mobley tools/clang)
    $ (cd ../Horace_Silver/ && ln -sfn ../../../compiler-rt/tschwinge/Doug_Watkins projects/compiler-rt)
    $ (cd ../Horace_Silver/ && ln -sfn ../../../test-suite/tschwinge/Art_Blakey projects/test-suite)
    $ ../Horace_Silver/configure --prefix="$PWD".install --enable-optimized SHELL=/bin/dash CC=gcc-4.6 CXX=g++-4.6 2>&1 | tee log_build
    $ make VERBOSE=1 2>&1 | tee log_build_

Different hosts may default to different shells and compiler versions; thus
harmonized.

Passing `--enable-debug-symbols`, the GNU/Hurd build terminates with a SIGBUS
when linking `Release+Debug+Asserts/bin/clang` (which is bigger than 500 MiB
for the corresponding GNU/Linux build).  Using `--enable-debug-symbols
--enable-shared`, the GNU/Hurd build hang after `make[1]: Leaving directory
[...]/tools/llvm-shlib`, after (successfully) linking
`Release+Debug+Asserts/lib/libLLVM-3.3svn.so` (which is bigger than 250 MiB for
the corresponding GNU/Linux build).  Also there is a separate
`--enable-debug-runtime`.

This takes up around 3 GiB, and needs roughly 1.25 h on kepler.SCHWINGE and
4.25 h on coulomb.SCHWINGE.

<!--

    $ (make VERBOSE=1 && touch .go-install) 2>&1 | tee log_build_ && test -f .go-install && (make VERBOSE=1 install && touch .go-test) 2>&1 | tee log_install && test -f .go-test && { make -k VERBOSE=1 LIT_ARGS='-v --threads=1' check-all 2>&1 | tee log_test_check-all; make -k -C projects/test-suite/ 2>&1 | tee log_test_test-suite; }

-->


## Analysis

    $ toolchain/logs/process llvm build

        -checking type of operating system we're going to host on... Linux
        -checking type of operating system we're going to target... Linux
        +checking type of operating system we're going to host on... GNU
        +checking type of operating system we're going to target... GNU

        -checking mach/mach.h usability... no
        -checking mach/mach.h presence... no
        -checking for mach/mach.h... no
        +checking mach/mach.h usability... yes
        +checking mach/mach.h presence... yes
        +checking for mach/mach.h... yes

        -checking for mmap of files... yes
        +checking for mmap of files... no
         checking if /dev/zero is needed for mmap... no
        +configure: WARNING: mmap() of files required but not found

    Due to [[mmap_write-only]].

        -checking type of operating system we're going to target... Linux
        +checking type of operating system we're going to target... Unknown

        +In file included from [...]/tschwinge/Horace_Silver/lib/Support/Process.cpp:29:0:
        +[...]/tschwinge/Horace_Silver/lib/Support/Unix/Process.inc: In function 'unsigned int getColumns(int)':
        +[...]/tschwinge/Horace_Silver/lib/Support/Unix/Process.inc:220:21: warning: enumeral and non-enumeral type in conditional expression [enabled b

        include/llvm/Config/*
        Makefile.config

TODO


# Install

    $ make VERBOSE=1 install 2>&1 | tee log_install

This takes up around 350 MiB, and needs roughly 1 min on kepler.SCHWINGE and 12
min on coulomb.SCHWINGE.


## Analysis

    $ toolchain/logs/process llvm install

TODO


# Testsuite

    $ make -k VERBOSE=1 LIT_ARGS='-v --threads=1' check-all 2>&1 | tee log_test_check-all
    $ make -k -C projects/test-suite/ 2>&1 | tee log_test_test-suite

`LIT_ARGS=-v` is default for `VERBOSE=1`, but we want only one worker thread,
for stable order and usable test output log.

This needs roughly 10 min (`check-all`) + 145 min (test-suite) = 155 min on
kepler.SCHWINGE and 40 min (`check-all`) + 80 min (test-suite) = 120 min on
coulomb.SCHWINGE.


## Analysis

    $ toolchain/logs/process llvm test

TODO