From 1ea1768728836526c63be99bbe89f41403a97b38 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Date: Mon, 19 Dec 2022 11:24:18 +0100 Subject: [PATCH] Compile ovni with older GCC versions --- .gitlab-ci.yml | 9 ++++++++- nix/rt.nix | 22 +++++++++++++++++++++- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 034c5df..fff6c06 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -15,9 +15,16 @@ build:debian-testing: paths: - install/ +build:old-gcc: + stage: build + tags: + - nix + script: + - nix build -L --tarball-ttl 0 --file nix/rt.nix bsc.oldOvnis + build:rt-tests: stage: build tags: - nix script: - - nix build -L --tarball-ttl 0 --file nix/rt.nix + - nix build -L --tarball-ttl 0 --file nix/rt.nix bsc.ovni-rt diff --git a/nix/rt.nix b/nix/rt.nix index abe5a7f..c1a3d6c 100644 --- a/nix/rt.nix +++ b/nix/rt.nix @@ -87,6 +87,26 @@ let ]; }); + # Build ovni with old gcc versions + genOldOvni = stdenv: (last.ovni.override { + stdenv = stdenv; + }).overrideAttrs (old: { + pname = old.name + "@" + stdenv.cc.cc.version; + }); + + oldCompilers = [ + #pkgs.gcc49Stdenv + pkgs.gcc6Stdenv + pkgs.gcc7Stdenv + pkgs.gcc8Stdenv + pkgs.gcc9Stdenv + pkgs.gcc10Stdenv + pkgs.gcc11Stdenv + pkgs.gcc12Stdenv + ]; + + oldOvnis = map last.genOldOvni last.oldCompilers; + # Now we rebuild ovni with the Nanos6 and nOS-V versions, which were # linked to the previous ovni. We need to be able to exit the chroot # to run Nanos6 tests, as they require access to /sys for hwloc @@ -108,4 +128,4 @@ let }); in - bsc.ovni-rt + pkgs // { bsc = bsc; }