Skip to content

Commit

Permalink
Merge pull request #628 from amazonlinux/sdk-gcc92
Browse files Browse the repository at this point in the history
sdk: update to gcc 9.2
  • Loading branch information
bcressey authored Jan 7, 2020
2 parents 31d515e + 68d3587 commit 74bacfa
Show file tree
Hide file tree
Showing 14 changed files with 509 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ DOCKER_BUILDKIT = "1"

[env.development]
# Defined here to allow us to override ${BUILDSYS_ARCH} on the command line.
BUILDSYS_SDK_IMAGE = "thar/sdk-${BUILDSYS_ARCH}:0.0.2"
BUILDSYS_SDK_IMAGE = "thar/sdk-${BUILDSYS_ARCH}:v0.3"
# Permit pulling directly Upstream URLs when lookaside cache results in MISSes.
BUILDSYS_ALLOW_UPSTREAM_SOURCE_URL = "true"
# Extra flags used when spawning containers.
Expand Down
10 changes: 7 additions & 3 deletions extras/sdk-container/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ RUN \
git config --global user.name "Builder" && \
git config --global user.email "builder@localhost"

ARG BRVER="2019.08.2"
ARG KVER="4.19.81"
ARG BRVER="2019.08.3"
ARG KVER="4.19.88"

WORKDIR /home/builder
COPY ./hashes/buildroot ./hashes
Expand All @@ -48,6 +48,7 @@ RUN \

FROM toolchain as toolchain-gnu
ARG ARCH
ARG KVER="4.19.88"
RUN \
make O=output/${ARCH}-gnu defconfig BR2_DEFCONFIG=configs/sdk_${ARCH}_gnu_defconfig && \
make O=output/${ARCH}-gnu toolchain && \
Expand All @@ -57,6 +58,7 @@ RUN \

FROM toolchain as toolchain-musl
ARG ARCH
ARG KVER="4.19.88"
RUN \
make O=output/${ARCH}-musl defconfig BR2_DEFCONFIG=configs/sdk_${ARCH}_musl_defconfig && \
make O=output/${ARCH}-musl toolchain && \
Expand All @@ -69,7 +71,7 @@ FROM base as sdk
USER root

ARG ARCH
ARG KVER="4.19.81"
ARG KVER="4.19.88"

WORKDIR /

Expand Down Expand Up @@ -156,6 +158,7 @@ RUN \
rm musl-${MUSLVER}.tar.gz && \
mv musl-${MUSLVER} musl

ARG ARCH
ARG TARGET="${ARCH}-thar-linux-musl"
ARG SYSROOT="/${TARGET}/sys-root"
ARG CFLAGS="-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-clash-protection"
Expand Down Expand Up @@ -220,6 +223,7 @@ RUN make install-unwind DESTDIR="${SYSROOT}"

FROM sdk as sdk-libc

ARG ARCH
ARG GNU_TARGET="${ARCH}-thar-linux-gnu"
ARG GNU_SYSROOT="/${GNU_TARGET}/sys-root"
ARG MUSL_TARGET="${ARCH}-thar-linux-musl"
Expand Down
2 changes: 1 addition & 1 deletion extras/sdk-container/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARCH ?= $(shell uname -m)

VERSION := 0.0.2
VERSION := v0.3
TAG := thar/sdk-$(ARCH):$(VERSION)
ARCHIVE := thar-sdk-$(ARCH)-$(VERSION).tar.gz

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
BR2_KERNEL_HEADERS_4_19=y
BR2_BINUTILS_VERSION_2_32_X=y
BR2_GCC_VERSION_9_X=y
BR2_GCC_VERSION="9.2.0"
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_GCC_ENABLE_LTO=y
BR2_GCC_ENABLE_GRAPHITE=y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ BR2_TOOLCHAIN_BUILDROOT_MUSL=y
BR2_KERNEL_HEADERS_4_19=y
BR2_BINUTILS_VERSION_2_32_X=y
BR2_GCC_VERSION_9_X=y
BR2_GCC_VERSION="9.2.0"
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_GCC_ENABLE_LTO=y
BR2_GCC_ENABLE_GRAPHITE=y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
BR2_KERNEL_HEADERS_4_19=y
BR2_BINUTILS_VERSION_2_32_X=y
BR2_GCC_VERSION_9_X=y
BR2_GCC_VERSION="9.2.0"
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_GCC_ENABLE_LTO=y
BR2_GCC_ENABLE_GRAPHITE=y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ BR2_TOOLCHAIN_BUILDROOT_MUSL=y
BR2_KERNEL_HEADERS_4_19=y
BR2_BINUTILS_VERSION_2_32_X=y
BR2_GCC_VERSION_9_X=y
BR2_GCC_VERSION="9.2.0"
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_GCC_ENABLE_LTO=y
BR2_GCC_ENABLE_GRAPHITE=y
Expand Down
2 changes: 1 addition & 1 deletion extras/sdk-container/hashes/buildroot
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SHA512 (buildroot-2019.08.2.tar.gz) = e8c7481ac53f360a751fe3374e560cdea6ca5c8d0de07aa021bc91b925f5f5c45a6ebdbba523e3a1379eeaed25b3f49e1e521d2d71b3e6be632388d838cb29aa
SHA512 (buildroot-2019.08.3.tar.gz) = d5c00a38c92eb115648cd807ea70a24b18663261f884ea76246bf703f23f605563c161ad2d2d1121d7003ecbd61ee8caaff087a6a78b4ffd054c84071650c997
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From b12604ebee623187352f1430ad7b87ccfc58b3a0 Mon Sep 17 00:00:00 2001
From: Ben Cressey <[email protected]>
Date: Sun, 6 Aug 2017 23:15:02 +0000
Subject: [PATCH 1/5] disable shared for host builds of gmp, isl, mpc, mpfr
Subject: [PATCH 1/6] disable shared for host builds of gmp, isl, mpc, mpfr

Building these GCC dependencies as static libraries avoids the need to
provide the shared library paths at runtime, using either rpath entries
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From d668eab1928c59ce9885528f057016d4d1afbd88 Mon Sep 17 00:00:00 2001
From: Ben Cressey <[email protected]>
Date: Sun, 6 Aug 2017 23:35:06 +0000
Subject: [PATCH 2/5] add TOOLS_DIR and SYSROOT_DIR to control output
Subject: [PATCH 2/6] add TOOLS_DIR and SYSROOT_DIR to control output

The sysroot directory is essential to our purpose of building a
relocatable toolchain, as GCC will look for it relative to the
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From ca0ae13b3e36a1eb5b913e550c1986582145ee1a Mon Sep 17 00:00:00 2001
From: Ben Cressey <[email protected]>
Date: Sun, 6 Aug 2017 23:40:50 +0000
Subject: [PATCH 3/5] build binutils with TOOLS_DIR and SYSROOT_DIR
Subject: [PATCH 3/6] build binutils with TOOLS_DIR and SYSROOT_DIR

The binutils build only needs one stage, so we can write the binaries
directly to the new output path.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From bb41cbf1a393416e74efa9dc7bee0610a2ec3fbb Mon Sep 17 00:00:00 2001
From: Ben Cressey <[email protected]>
Date: Sun, 6 Aug 2017 23:58:27 +0000
Subject: [PATCH 4/5] build gcc with TOOLS_DIR and SYSROOT_DIR
Subject: [PATCH 4/6] build gcc with TOOLS_DIR and SYSROOT_DIR

Most of the changes here are to the second and final stage of our GCC
build, so that the binaries are written to the new output path, and
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From d35e7e4616527f6e3b3807cd185aee4d2c911818 Mon Sep 17 00:00:00 2001
From: Ben Cressey <[email protected]>
Date: Fri, 15 Mar 2019 18:32:49 +0000
Subject: [PATCH 5/5] package/binutils: bring back sysroot fix for 2.32
Subject: [PATCH 5/6] package/binutils: bring back sysroot fix for 2.32

Signed-off-by: Ben Cressey <[email protected]>
---
Expand Down
Loading

0 comments on commit 74bacfa

Please sign in to comment.