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:
parent
b6c30b58fc
commit
0e613cdb27
18
dashboard/env/linux-x86-gccgo/Dockerfile
vendored
18
dashboard/env/linux-x86-gccgo/Dockerfile
vendored
@ -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
|
||||
|
5
dashboard/env/linux-x86-gccgo/Makefile
vendored
5
dashboard/env/linux-x86-gccgo/Makefile
vendored
@ -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
|
||||
|
2
dashboard/env/linux-x86-gccgo/README
vendored
2
dashboard/env/linux-x86-gccgo/README
vendored
@ -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 \
|
||||
|
12
dashboard/env/linux-x86-gccgo/scripts/install-apt-deps.sh
vendored
Executable file
12
dashboard/env/linux-x86-gccgo/scripts/install-apt-deps.sh
vendored
Executable 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
|
9
dashboard/env/linux-x86-gccgo/scripts/install-gold.sh
vendored
Executable file
9
dashboard/env/linux-x86-gccgo/scripts/install-gold.sh
vendored
Executable 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*
|
Loading…
Reference in New Issue
Block a user