-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile-gcc4
73 lines (69 loc) · 1.66 KB
/
Dockerfile-gcc4
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
#
# Dockerfile to build adtools GCC 4 cross-compiler
#
# The binaries will ultimately be found in /opt/adtools
#
# The idea with this image is to produce a bare minimum base from
# which to create more specific builders. The cross-compiler
# executes but no other tools are available.
#
FROM debian:jessie
LABEL maintainer="Steven Solie <[email protected]>"
#
# This is where the build will take place and is removed when finished.
#
WORKDIR /work
#
# Perform all the steps in a single RUN to avoid creating file system layers.
#
RUN apt-get update && apt-get upgrade --yes && \
apt-get install -y \
git \
python2.7 \
make \
libgmp-dev \
libmpc-dev \
g++-4.9 \
libtool \
flex \
bison \
texinfo \
wget \
lhasa \
&& \
ln -s /usr/bin/python2.7 /usr/bin/python && \
ln -s /usr/bin/g++-4.9 /usr/bin/g++ \
&& \
git config --global user.email [email protected] && \
git clone https://github.com/sba1/adtools . && \
git submodule init && \
git submodule update && \
echo "4.9\treleases/gcc-4.9.3\thttp://ftp.gnu.org/gnu/gcc/gcc-4.9.3/gcc-4.9.3.tar.bz2" > /work/gcc/series && \
gild/bin/gild clone && \
gild/bin/gild checkout binutils 2.23.2 && \
gild/bin/gild checkout gcc 4.9 \
&& \
make -C native-build gcc-cross CROSS_PREFIX=/opt/adtools \
&& \
rm -rf /work/* && \
rm /usr/bin/python && \
rm /usr/bin/gcc && \
rm /usr/bin/g++ \
&& \
apt-get --assume-yes purge \
git \
python2.7 \
make \
g++-4.9 \
libgmp-dev \
libmpc-dev \
libtool \
flex \
bison \
texinfo \
wget \
lhasa \
&& \
apt-get --assume-yes autoremove && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*