From 99d288a6b1efba1ce53f07b01644bd8932979d4f Mon Sep 17 00:00:00 2001 From: Guillaume Le Vaillant Date: Thu, 7 Oct 2021 14:21:25 +0200 Subject: gnu: llvm-3.6: Fix build. * gnu/packages/patches/llvm-3.6-fix-build-with-gcc-10.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/llvm.scm (llvm-3.6)[source]: Use it. --- gnu/local.mk | 1 + gnu/packages/llvm.scm | 3 +++ gnu/packages/patches/llvm-3.6-fix-build-with-gcc-10.patch | 13 +++++++++++++ 3 files changed, 17 insertions(+) create mode 100644 gnu/packages/patches/llvm-3.6-fix-build-with-gcc-10.patch diff --git a/gnu/local.mk b/gnu/local.mk index bfecbfa6a1..dfb9e50b73 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1409,6 +1409,7 @@ dist_patch_DATA = \ %D%/packages/patches/lirc-reproducible-build.patch \ %D%/packages/patches/llhttp-bootstrap-CVE-2020-8287.patch \ %D%/packages/patches/llvm-3.5-fix-clang-build-with-gcc5.patch \ + %D%/packages/patches/llvm-3.6-fix-build-with-gcc-10.patch \ %D%/packages/patches/llvm-9-fix-bitcast-miscompilation.patch \ %D%/packages/patches/llvm-9-fix-lpad-miscompilation.patch \ %D%/packages/patches/llvm-9-fix-scev-miscompilation.patch \ diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm index 3d62965cb8..debcbf8148 100644 --- a/gnu/packages/llvm.scm +++ b/gnu/packages/llvm.scm @@ -20,6 +20,7 @@ ;;; Copyright © 2021 Maxime Devos ;;; Copyright © 2021 Julien Lepiller ;;; Copyright © 2021 Lars-Dominik Braun +;;; Copyright © 2021 Guillaume Le Vaillant ;;; ;;; This file is part of GNU Guix. ;;; @@ -841,6 +842,8 @@ of programming tools as well as libraries with equivalent functionality.") (origin (method url-fetch) (uri (llvm-uri "llvm" version)) + (patches + (search-patches "llvm-3.6-fix-build-with-gcc-10.patch")) (sha256 (base32 "153vcvj8gvgwakzr4j0kndc0b7wn91c2g1vy2vg24s6spxcc23gn")))))) diff --git a/gnu/packages/patches/llvm-3.6-fix-build-with-gcc-10.patch b/gnu/packages/patches/llvm-3.6-fix-build-with-gcc-10.patch new file mode 100644 index 0000000000..4982587d15 --- /dev/null +++ b/gnu/packages/patches/llvm-3.6-fix-build-with-gcc-10.patch @@ -0,0 +1,13 @@ +Adapted from https://github.com/digego/extempore/pull/322/files + +--- a/include/llvm/IR/ValueMap.h 2015-08-04 00:30:24.000000000 +0200 ++++ b/include/llvm/IR/ValueMap.h 2018-07-14 21:09:09.769502736 +0200 +@@ -99,7 +99,7 @@ + explicit ValueMap(const ExtraData &Data, unsigned NumInitBuckets = 64) + : Map(NumInitBuckets), Data(Data) {} + +- bool hasMD() const { return MDMap; } ++ bool hasMD() const { return static_cast(MDMap); } + MDMapT &MD() { + if (!MDMap) + MDMap.reset(new MDMapT); -- cgit v1.2.3