From 23e955dfac18d4acafe539a071c2544538d904db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 27 Nov 2021 16:37:39 +0100 Subject: [PATCH 1/4] build-sanitized-clang: fix for aarch64 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 7ce22243..3a5ead45 100644 --- a/flake.nix +++ b/flake.nix @@ -58,7 +58,7 @@ CFLAGS = "-Werror -Wno-unused-command-line-argument"; })); build-sanitized-clang = forAllSystems (system: self.hydraJobs.build-sanitized.${system}.override { - stdenv = pkgs.libcxxStdenv; + stdenv = nixpkgsFor.${system}.libcxxStdenv; }); release = pkgs.releaseTools.aggregate From b08bdf3f37a50ff6a91ae345670017ec042b13f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 27 Nov 2021 16:37:44 +0100 Subject: [PATCH 2/4] flake: bump nixpkgs --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index a2fc179a..567877e2 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1628523294, - "narHash": "sha256-qMkH/JRRmcqb/eOa/pKksrKGOy2YEPQNH/457QyoyFg=", + "lastModified": 1637875414, + "narHash": "sha256-Ica++SXFuLyxX9Q7YxhfZulUif6/gwM8AEQYlUxqSgE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b09c989b82f7a4f7319802a1dcf8bfe859d65362", + "rev": "3bea86e918d8b54aa49780505d2d4cd9261413be", "type": "github" }, "original": { From ea6035d07206f961255a047b20ad149d2542e31d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 27 Nov 2021 17:09:45 +0100 Subject: [PATCH 3/4] fix coverage build --- flake.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 3a5ead45..6d325eb7 100644 --- a/flake.nix +++ b/flake.nix @@ -44,11 +44,16 @@ }; coverage = - pkgs.releaseTools.coverageAnalysis { + (pkgs.releaseTools.coverageAnalysis { name = "patchelf-coverage"; src = self.hydraJobs.tarball; lcovFilter = ["*/tests/*"]; - }; + }).overrideAttrs (old: { + preCheck = '' + # coverage cflag breaks this target + NIX_CFLAGS_COMPILE=''${NIX_CFLAGS_COMPILE//--coverage} make -C tests phdr-corruption.so + ''; + }); build = forAllSystems (system: nixpkgsFor.${system}.patchelf-new); build-sanitized = forAllSystems (system: nixpkgsFor.${system}.patchelf-new.overrideAttrs (old: { From 31652921faafb07f82797225a24b7d9ef90f5d66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 27 Nov 2021 17:24:44 +0100 Subject: [PATCH 4/4] exclude i686 linux clang build --- flake.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 6d325eb7..36c2d4c5 100644 --- a/flake.nix +++ b/flake.nix @@ -62,7 +62,8 @@ # our cc wrapper arguments CFLAGS = "-Werror -Wno-unused-command-line-argument"; })); - build-sanitized-clang = forAllSystems (system: self.hydraJobs.build-sanitized.${system}.override { + # 32-bit clangStdenv seems broken in nixpkgs + build-sanitized-clang = nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-linux" ] (system: self.hydraJobs.build-sanitized.${system}.override { stdenv = nixpkgsFor.${system}.libcxxStdenv; }); @@ -75,7 +76,6 @@ self.hydraJobs.build-sanitized.x86_64-linux self.hydraJobs.build-sanitized.i686-linux self.hydraJobs.build-sanitized-clang.x86_64-linux - self.hydraJobs.build-sanitized-clang.i686-linux ]; meta.description = "Release-critical builds"; };