Skip to content

Commit 405e2f1

Browse files
committed
---
yaml --- r: 33439 b: refs/heads/snap-stage3 c: 5fc4e51 h: refs/heads/master i: 33437: defe6b2 33435: 880dccc 33431: 5079c1b 33423: 014d738 33407: e26dfff v: v3
1 parent d2c38b1 commit 405e2f1

File tree

503 files changed

+12504
-11365
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

503 files changed

+12504
-11365
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 7947bb1732f513906acef459a6e8c839481f135b
4+
refs/heads/snap-stage3: 5fc4e51ab77ad0fce9c16c7bbc06c5f68008c52b
55
refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/AUTHORS.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ Aleksander Balicki <[email protected]>
99
Alex Rønne Petersen <[email protected]>
1010
Alexander Stavonin <[email protected]>
1111
Andreas Gal <[email protected]>
12+
Andrew Paseltiner <[email protected]>
1213
Arkaitz Jimenez <[email protected]>
1314
Armin Ronacher <[email protected]>
1415
Austin Seipp <[email protected]>
16+
1517
1618
Ben Striegel <[email protected]>
1719
Benjamin Herr <[email protected]>
@@ -41,11 +43,13 @@ Evan McClanahan <[email protected]>
4143
Francisco Souza <[email protected]>
4244
Gareth Daniel Smith <[email protected]>
4345
Glenn Willen <[email protected]>
46+
Gonçalo Cabrita <[email protected]>
4447
Graham Fawcett <[email protected]>
4548
Grahame Bowland <[email protected]>
4649
Haitao Li <[email protected]>
4750
Ian D. Bollinger <[email protected]>
4851
Ivano Coppola <[email protected]>
52+
Jacob Harris Cryer Kragh <[email protected]>
4953
Jacob Parker <[email protected]>
5054
Jason Orendorff <[email protected]>
5155
Jed Davis <[email protected]>
@@ -68,7 +72,9 @@ Kevin Cantu <[email protected]>
6872
Lennart Kudling
6973
Lindsey Kuper <[email protected]>
7074
Luca Bruno <[email protected]>
75+
Luqman Aden <[email protected]>
7176
Magnus Auvinen <[email protected]>
77+
Mahmut Bulut <[email protected]>
7278
Margaret Meyerhofer <[email protected]>
7379
Marijn Haverbeke <[email protected]>
7480
Matt Brubeck <[email protected]>
@@ -103,4 +109,5 @@ Tomoki Aonuma <[email protected]>
103109
Tycho Sci <[email protected]>
104110
Vincent Belliard <[email protected]>
105111
Wade Mealing <[email protected]>
112+
Yasuhiro Fujii <[email protected]>
106113
Zack Corr <[email protected]>

branches/snap-stage3/Makefile.in

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ LIBSYNTAX_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,syntax)
132132

133133
# version-string calculation
134134
CFG_GIT_DIR := $(CFG_SRC_DIR).git
135-
CFG_RELEASE = 0.4
135+
CFG_RELEASE = 0.5
136136
CFG_VERSION = $(CFG_RELEASE)
137137

138138
ifneq ($(wildcard $(CFG_GIT)),)
@@ -144,8 +144,9 @@ ifneq ($(wildcard $(CFG_GIT_DIR)),)
144144
endif
145145
endif
146146

147-
ifdef CFG_DISABLE_VALGRIND
148-
$(info cfg: disabling valgrind (CFG_DISABLE_VALGRIND))
147+
ifdef CFG_ENABLE_VALGRIND
148+
$(info cfg: enabling valgrind (CFG_ENABLE_VALGRIND))
149+
else
149150
CFG_VALGRIND :=
150151
endif
151152
ifdef CFG_BAD_VALGRIND

branches/snap-stage3/README.md

Lines changed: 36 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,52 +6,61 @@ documentation.
66

77
## Installation
88

9-
The Rust compiler is slightly unusual in that it is written in Rust and
10-
therefore must be built by a precompiled "snapshot" version of itself (made in
11-
an earlier state of development). As such, source builds require that:
9+
The Rust compiler currently must be built from a [tarball], unless you
10+
are on Windows, in which case using the [installer][win-exe] is
11+
recommended.
1212

13-
* You are connected to the internet, to fetch snapshots.
13+
Since the Rust compiler is written in Rust, it must be built by
14+
a precompiled "snapshot" version of itself (made in an earlier state
15+
of development). As such, source builds require a connection to
16+
the Internet, to fetch snapshots, and an OS that can execute the
17+
available snapshot binaries.
1418

15-
* You can at least execute snapshot binaries of one of the forms we offer
16-
them in. Currently we build and test snapshots on:
19+
Snapshot binaries are currently built and tested on several platforms:
1720

18-
* Windows (7, server 2008 r2) x86 only
19-
* Linux 2.6.x (various distributions) x86 and x86-64
20-
* OSX 10.6 ("Snow Leopard") or 10.7 ("Lion") x86 and x86-64
21+
* Windows (7, Server 2008 R2), x86 only
22+
* Linux (various distributions), x86 and x86-64
23+
* OSX 10.6 ("Snow Leopard") or greater, x86 and x86-64
2124

22-
You may find other platforms work, but these are our "tier 1" supported build
23-
environments that are most likely to work. Further platforms will be added to
24-
the list in the future via cross-compilation.
25+
You may find that other platforms work, but these are our "tier 1"
26+
supported build environments that are most likely to work.
2527

26-
To build from source you will also need the following prerequisite packages:
28+
> ***Note:*** Windows users should read the detailed
29+
> [getting started][wiki-start] notes on the wiki. Even when using
30+
> the binary installer the Windows build requires a MinGW installation,
31+
> the precise details of which are not discussed here.
32+
33+
To build from source you will also need the following prerequisite
34+
packages:
2735

2836
* g++ 4.4 or clang++ 3.x
29-
* python 2.6 or later
37+
* python 2.6 or later (but not 3.x)
3038
* perl 5.0 or later
3139
* gnu make 3.81 or later
3240
* curl
3341

34-
Assuming you're on a relatively modern Linux/OSX system and have met the
35-
prerequisites, something along these lines should work:
42+
Assuming you're on a relatively modern *nix system and have met the
43+
prerequisites, something along these lines should work.
3644

45+
$ wget http://dl.rust-lang.org/dist/rust-0.4.tar.gz
3746
$ tar -xzf rust-0.4.tar.gz
3847
$ cd rust-0.4
3948
$ ./configure
4049
$ make && make install
4150

42-
When complete, make install will place the following programs into
43-
/usr/local/bin:
44-
45-
* rustc, the Rust compiler
46-
* rustdoc, the API-documentation tool
47-
* cargo, the Rust package manager
51+
You may need to use `sudo make install` if you do not normally have
52+
permission to modify the destination directory. The install locations
53+
can be adjusted by passing a `--prefix` argument to
54+
`configure`. Various other options are also supported, pass `--help`
55+
for more information on them.
4856

49-
In addition to a manual page under /usr/local/share/man and a set of host and
50-
target libraries under /usr/local/lib/rustc.
57+
When complete, `make install` will place several programs into
58+
`/usr/local/bin`: `rustc`, the Rust compiler; `rustdoc`, the
59+
API-documentation tool, and `cargo`, the Rust package manager.
5160

52-
The install locations can be adjusted by passing a --prefix argument to
53-
configure. Various other options are also supported, pass --help for more
54-
information on them.
61+
[wiki-start]: https://github.com/mozilla/rust/wiki/Note-getting-started-developing-Rust
62+
[tarball]: http://dl.rust-lang.org/dist/rust-0.4.tar.gz
63+
[win-exe]: http://dl.rust-lang.org/dist/rust-0.4-install.exe
5564

5665

5766
## License

branches/snap-stage3/RELEASES.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Version 0.4 (October 2012)
22
--------------------------
33

4-
* ~1500 changes, numerous bugfixes
4+
* ~2000 changes, numerous bugfixes
55

66
* Syntax
77
* All keywords are now strict and may not be used as identifiers anywhere

branches/snap-stage3/configure

Lines changed: 90 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ need_cmd cmp
187187
need_cmd mkdir
188188
need_cmd printf
189189
need_cmd cut
190+
need_cmd head
190191
need_cmd grep
191192
need_cmd xargs
192193
need_cmd cp
@@ -257,6 +258,16 @@ case $CFG_CPUTYPE in
257258
err "unknown CPU type: $CFG_CPUTYPE"
258259
esac
259260

261+
# Detect 64 bit linux systems with 32 bit userland and force 32 bit compilation
262+
if [ $CFG_OSTYPE = unknown-linux-gnu -a $CFG_CPUTYPE = x86_64 ]
263+
then
264+
file -L "$SHELL" | grep -q "x86[_-]64"
265+
if [ $? != 0 ]; then
266+
CFG_CPUTYPE=i686
267+
fi
268+
fi
269+
270+
260271
DEFAULT_HOST_TRIPLE="${CFG_CPUTYPE}-${CFG_OSTYPE}"
261272

262273
CFG_SRC_DIR="$(cd $(dirname $0) && pwd)/"
@@ -283,7 +294,7 @@ else
283294
fi
284295

285296
opt sharedstd 1 "build libstd as a shared library"
286-
opt valgrind 1 "run tests with valgrind (memcheck by default)"
297+
opt valgrind 0 "run tests with valgrind (memcheck by default)"
287298
opt helgrind 0 "run tests with helgrind instead of memcheck"
288299
opt docs 1 "build documentation"
289300
opt optimize 1 "build optimized rust code"
@@ -295,6 +306,7 @@ opt manage-submodules 1 "let the build manage the git submodules"
295306
opt mingw-cross 0 "cross-compile for win32 using mingw"
296307
opt clang 0 "prefer clang to gcc for building the runtime"
297308
opt local-rust 0 "use an installed rustc rather than downloading a snapshot"
309+
opt pax-flags 0 "apply PaX flags to rustc binaries (required for GRSecurity/PaX-patched kernels)"
298310
valopt prefix "/usr/local" "set installation prefix"
299311
valopt local-rust-root "/usr/local" "set prefix for local rust binary"
300312
valopt llvm-root "" "set LLVM root"
@@ -343,14 +355,69 @@ probe CFG_PDFLATEX pdflatex
343355
probe CFG_XETEX xetex
344356
probe CFG_LUATEX luatex
345357
probe CFG_NODE nodejs node
358+
if [ "$CFG_OSTYPE" = "unknown-linux-gnu" ]
359+
then
360+
probe CFG_PAXCTL paxctl /sbin/paxctl
361+
probe CFG_ZCAT zcat
362+
fi
346363

347364
if [ ! -z "$CFG_PANDOC" ]
348365
then
349-
PV=$(pandoc --version | awk '/^pandoc/ {print $2}')
350-
if [ "$PV" \< "1.8" ]
366+
PANDOC_VER_LINE=$(pandoc --version | grep '^pandoc ')
367+
PANDOC_VER=${PANDOC_VER_LINE#pandoc }
368+
PV_MAJOR_MINOR=${PANDOC_VER%.[0-9]*}
369+
PV_MAJOR=${PV_MAJOR_MINOR%%[.][0-9]*}
370+
PV_MINOR=${PV_MAJOR_MINOR#[0-9]*[.]}
371+
PV_MINOR=${PV_MINOR%%[.][0-9]*}
372+
if [ "$PV_MAJOR" -lt "1" ] || [ "$PV_MINOR" -lt "8" ]
351373
then
352-
step_msg "pandoc $PV is too old. disabling"
353-
BAD_PANDOC=1
374+
step_msg "pandoc $PV_MAJOR.$PV_MINOR is too old. disabling"
375+
BAD_PANDOC=1
376+
fi
377+
fi
378+
379+
if [ "$CFG_OSTYPE" = "unknown-linux-gnu" ]
380+
then
381+
if [ ! -z "$CFG_ENABLE_PAX_FLAGS" -a -z "$CFG_PAXCTL" ]
382+
then
383+
err "enabled PaX markings but no paxctl binary found"
384+
fi
385+
386+
if [ -z "$CFG_DISABLE_PAX_FLAGS" ]
387+
then
388+
# GRSecurity/PaX detection. This can be very flaky.
389+
GRSEC_DETECTED=
390+
391+
# /dev/grsec only exists if CONFIG_GRKERNSEC_NO_RBAC is not set.
392+
# /proc/sys/kernel/grsecurity is not available if ÇONFIG_GRKERNSEC_SYSCTL is not set.
393+
if [ -e /dev/grsec -o -d /proc/sys/kernel/grsecurity ]
394+
then
395+
GRSEC_DETECTED=1
396+
# /proc/config.gz is normally only available to root, and only if CONFIG_IKCONFIG_PROC has been set.
397+
elif [ -r /proc/config.gz -a ! -z "$CFG_ZCAT" ]
398+
then
399+
if "$CFG_ZCAT" /proc/config.gz | grep --quiet "CONFIG_GRKERNSEC=y"
400+
then
401+
GRSEC_DETECTED=1
402+
fi
403+
# Flaky.
404+
elif grep --quiet grsec /proc/version
405+
then
406+
GRSEC_DETECTED=1
407+
fi
408+
409+
if [ ! -z "$GRSEC_DETECTED" ]
410+
then
411+
step_msg "GRSecurity: yes"
412+
if [ ! -z "$CFG_PAXCTL" ]
413+
then
414+
CFG_ENABLE_PAX_FLAGS=1
415+
else
416+
warn "GRSecurity kernel detected but no paxctl binary found: not setting CFG_ENABLE_PAX_FLAGS"
417+
fi
418+
else
419+
step_msg "GRSecurity: no"
420+
fi
354421
fi
355422
fi
356423

@@ -523,15 +590,23 @@ then
523590
msg "git: submodule sync"
524591
"${CFG_GIT}" submodule --quiet sync
525592

593+
msg "git: submodule update"
594+
"${CFG_GIT}" submodule --quiet update --init
595+
need_ok "git failed"
596+
597+
msg "git: submodule foreach sync"
598+
"${CFG_GIT}" submodule --quiet foreach --recursive git submodule sync
599+
need_ok "git failed"
600+
601+
msg "git: submodule foreach update"
602+
"${CFG_GIT}" submodule --quiet update --init --recursive
603+
need_ok "git failed"
604+
526605
# NB: this is just for the sake of getting the submodule SHA1 values
527606
# and status written into the build log.
528607
msg "git: submodule status"
529608
"${CFG_GIT}" submodule status --recursive
530609

531-
msg "git: submodule update"
532-
"${CFG_GIT}" submodule --quiet update --init --recursive
533-
need_ok "git failed"
534-
535610
msg "git: submodule clobber"
536611
"${CFG_GIT}" submodule --quiet foreach --recursive git clean -dxf
537612
need_ok "git failed"
@@ -699,6 +774,12 @@ putvar CFG_C_COMPILER
699774
putvar CFG_LIBDIR
700775
putvar CFG_DISABLE_MANAGE_SUBMODULES
701776

777+
if [ ! -z "$CFG_ENABLE_PAX_FLAGS" ]
778+
then
779+
putvar CFG_ENABLE_PAX_FLAGS
780+
putvar CFG_PAXCTL
781+
fi
782+
702783
if [ ! -z $BAD_PANDOC ]
703784
then
704785
CFG_PANDOC=

branches/snap-stage3/doc/lib/codemirror-rust.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ CodeMirror.defineMode("rust", function() {
99
"as": "op", "true": "atom", "false": "atom", "assert": "op", "check": "op",
1010
"claim": "op", "extern": "ignore", "unsafe": "ignore", "import": "else-style",
1111
"export": "else-style", "copy": "op", "log": "op",
12-
"use": "op", "self": "atom"
12+
"use": "op", "self": "atom", "pub": "atom", "priv": "atom"
1313
};
1414
var typeKeywords = function() {
1515
var keywords = {"fn": "fn"};

branches/snap-stage3/doc/prep.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,10 @@ while ((line = lines[cur++]) != null) {
6060
var html = '<pre class="cm-s-default">', curstr = "", curstyle = null;
6161
function add(str, style) {
6262
if (style != curstyle) {
63-
if (curstyle) html += '<span class="cm-' + curstyle + '">' + curstr
64-
+ "</span>";
65-
else if (curstr) html += curstr;
63+
if (curstyle) html +=
64+
'<span class="cm-' + CodeMirror.htmlEscape(curstyle) + '">' +
65+
CodeMirror.htmlEscape(curstr) + "</span>";
66+
else if (curstr) html += CodeMirror.htmlEscape(curstr);
6667
curstr = str; curstyle = style;
6768
} else curstr += str;
6869
}

0 commit comments

Comments
 (0)