1
0
mirror of https://github.com/golang/go synced 2024-11-18 16:04:44 -07:00

dashboard/env: optimize linux docker image size for gccgo

LGTM=bradfitz
R=bradfitz
CC=golang-codereviews
https://golang.org/cl/141320043
This commit is contained in:
Chris Manghane 2014-09-29 12:47:01 -07:00
parent b6c30b58fc
commit 0e613cdb27
5 changed files with 30 additions and 16 deletions

View File

@ -9,18 +9,8 @@ MAINTAINER golang-dev <golang-dev@googlegroups.com>
ENV DEBIAN_FRONTEND noninteractive
# For using numeric libraries within GCC.
RUN apt-get install -y --no-install-recommends libgmp10-dev libmpc-dev libmpfr-dev
ADD /scripts/install-apt-deps.sh /scripts/
RUN /scripts/install-apt-deps.sh
# For building binutils and gcc from source.
RUN apt-get install -y --no-install-recommends make g++ flex bison
# gccgo uses the Gold linker from binutils.
ENV BINUTILS_VERSION binutils-2.24
RUN curl -s http://ftp.gnu.org/gnu/binutils/$BINUTILS_VERSION.tar.gz | tar x --no-same-owner -zv
RUN mkdir binutils-objdir
RUN cd binutils-objdir && ../$BINUTILS_VERSION/configure --enable-gold --enable-plugins --prefix=/opt/gold
RUN cd binutils-objdir && make -sj && make install -sj
# For running the extended gccgo testsuite
RUN apt-get install -y --no-install-recommends dejagnu
ADD /scripts/install-gold.sh /scripts/
RUN /scripts/install-gold.sh

View File

@ -5,5 +5,8 @@
docker: Dockerfile
docker build -t gobuilders/linux-x86-gccgo .
docker-linux.gccgo.tar.gz: docker
upload: docker
docker save gobuilders/linux-x86-gccgo | gzip | (cd ../../coordinator/buildongce && go run create.go --write_object=go-builder-data/docker-linux.gccgo.tar.gz)
check: docker
docker run gobuilders/linux-x86-gccgo /usr/local/bin/builder -tool="gccgo" -rev=b9151e911a54 -buildroot=/gccgo -v -cmd='make check-go -kj' -report=false linux-amd64-gccgo-temp

View File

@ -1,5 +1,5 @@
$ export BUILD=linux-amd64-gccgo
$ export BUILDREV=6b61234c2552
$ export BUILDREV=b9151e911a54
$ docker run \
-v $HOME/keys/$BUILD.buildkey:/.gobuildkey \
gobuilders/linux-x86-gccgo \

View File

@ -0,0 +1,12 @@
set -ex
apt-get update
# For using numeric libraries within GCC.
apt-get install -y --no-install-recommends libgmp10-dev libmpc-dev libmpfr-dev
# For building binutils and gcc from source.
apt-get install -y --no-install-recommends make g++ flex bison
# For running the extended gccgo testsuite
apt-get install -y --no-install-recommends dejagnu
apt-get clean
rm -rf /var/lib/apt/lists

View File

@ -0,0 +1,9 @@
set -ex
# gccgo uses the Gold linker from binutils.
export BINUTILS_VERSION=binutils-2.24
mkdir -p binutils-objdir
curl -s http://ftp.gnu.org/gnu/binutils/$BINUTILS_VERSION.tar.gz | tar x --no-same-owner -zv
(cd binutils-objdir && ../$BINUTILS_VERSION/configure --enable-gold --enable-plugins --prefix=/opt/gold && make -sj && make install -sj)
rm -rf binutils*