From d933654805b29d17bfaa19f070ceb770554e0a81 Mon Sep 17 00:00:00 2001
From: Julien Muchembled <jm@nexedi.com>
Date: Thu, 5 Mar 2020 15:21:46 +0100
Subject: [PATCH] gcc: clean up

---
 component/gcc/buildout.cfg | 50 ++++++++++++++------------------------
 1 file changed, 18 insertions(+), 32 deletions(-)

diff --git a/component/gcc/buildout.cfg b/component/gcc/buildout.cfg
index 5e6094d8f..19d6e5987 100644
--- a/component/gcc/buildout.cfg
+++ b/component/gcc/buildout.cfg
@@ -7,7 +7,6 @@ extends =
   ../patch/buildout.cfg
   ../perl/buildout.cfg
   ../tar/buildout.cfg
-  ../xz-utils/buildout.cfg
   ../binutils/buildout.cfg
 
 parts =
@@ -16,16 +15,7 @@ parts =
 [gcc-common]
 recipe = slapos.recipe.cmmi
 shared = true
-url = http://ftp.gnu.org/gnu/gcc/gcc-5.5.0/gcc-5.5.0.tar.gz
-md5sum = 781bc0195edeb0ceaace8428f63ae63d
-# make install does not work when several core are used
-make-targets = install -j1
-patch-options = -p1
-patches =
-  ${:_profile_base_location_}/libsanitizer_Use_pre-computed_size_of_struct_ustat_for_Linux.patch#1e5f33e89f9fe1ca3e406eabcc621762
-
-[gcc]
-<= gcc-common
+url = http://ftp.gnu.org/gnu/gcc/gcc-${:version}/gcc-${:version}.tar.xz
 configure-options =
   --disable-bootstrap
   --disable-multilib
@@ -40,8 +30,24 @@ environment =
   LDFLAGS=-Wl,-rpath=${gmp:location}/lib -Wl,-rpath=${isl:location}/lib -Wl,-rpath=${mpc:location}/lib -Wl,-rpath=${mpfr:location}/lib
   PATH=${binutils:location}/bin:${gettext:location}/bin:${perl:location}/bin:${tar:location}/bin:%(PATH)s
 
-[gcc-minimal]
+[gcc]
 <= gcc-common
+version = 5.5.0
+md5sum = 0f70424213b4a1113c04ba66ddda0c1f
+# make install does not work when several core are used
+make-targets = install -j1
+patch-binary = ${patch:location}/bin/patch
+patch-options = -p1
+patches =
+  ${:_profile_base_location_}/libsanitizer_Use_pre-computed_size_of_struct_ustat_for_Linux.patch#1e5f33e89f9fe1ca3e406eabcc621762
+
+[gcc-8.2]
+<= gcc-common
+version = 8.2.0
+md5sum = 4ab282f414676496483b3e1793d07862
+
+[gcc-minimal]
+<= gcc
 configure-options =
   --disable-bootstrap
   --disable-multilib
@@ -54,23 +60,3 @@ configure-options =
 environment =
   LDFLAGS=-Wl,-rpath=${gmp:location}/lib -Wl,-rpath=${mpc:location}/lib -Wl,-rpath=${mpfr:location}/lib
   PATH=${perl:location}/bin:${tar:location}/bin:%(PATH)s
-
-
-[gcc-8.2]
-recipe = slapos.recipe.cmmi
-shared = true
-url = https://ftp.gnu.org/gnu/gcc/gcc-8.2.0/gcc-8.2.0.tar.gz
-md5sum = ee04f0c22a941f5f17d93809387f2729
-configure-options =
-  --disable-bootstrap
-  --disable-multilib
-  --with-gmp=${gmp:location}
-  --with-mpfr=${mpfr:location}
-  --with-mpc=${mpc:location}
-  --enable-languages="c,c++,fortran"
-  --with-isl=${isl:location}
-  --with-ld=${binutils:location}/bin/ld
-  --with-as=${binutils:location}/bin/as
-environment =
-  LDFLAGS=-Wl,-rpath=${gmp:location}/lib -Wl,-rpath=${isl:location}/lib -Wl,-rpath=${mpc:location}/lib -Wl,-rpath=${mpfr:location}/lib
-  PATH=${binutils:location}/bin:${gettext:location}/bin:${perl:location}/bin:${tar:location}/bin:%(PATH)s
-- 
2.30.9