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.
This commit is contained in:
Guillaume Le Vaillant 2021-10-07 14:21:25 +02:00
parent 1ac5bd7c0b
commit 99d288a6b1
No known key found for this signature in database
GPG key ID: 6BE8208ADF21FE3F
3 changed files with 17 additions and 0 deletions

View file

@ -1409,6 +1409,7 @@ dist_patch_DATA = \
%D%/packages/patches/lirc-reproducible-build.patch \ %D%/packages/patches/lirc-reproducible-build.patch \
%D%/packages/patches/llhttp-bootstrap-CVE-2020-8287.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.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-bitcast-miscompilation.patch \
%D%/packages/patches/llvm-9-fix-lpad-miscompilation.patch \ %D%/packages/patches/llvm-9-fix-lpad-miscompilation.patch \
%D%/packages/patches/llvm-9-fix-scev-miscompilation.patch \ %D%/packages/patches/llvm-9-fix-scev-miscompilation.patch \

View file

@ -20,6 +20,7 @@
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be> ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2021 Julien Lepiller <julien@lepiller.eu> ;;; Copyright © 2021 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2021 Lars-Dominik Braun <lars@6xq.net> ;;; Copyright © 2021 Lars-Dominik Braun <lars@6xq.net>
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -841,6 +842,8 @@ (define-public llvm-3.6
(origin (origin
(method url-fetch) (method url-fetch)
(uri (llvm-uri "llvm" version)) (uri (llvm-uri "llvm" version))
(patches
(search-patches "llvm-3.6-fix-build-with-gcc-10.patch"))
(sha256 (sha256
(base32 (base32
"153vcvj8gvgwakzr4j0kndc0b7wn91c2g1vy2vg24s6spxcc23gn")))))) "153vcvj8gvgwakzr4j0kndc0b7wn91c2g1vy2vg24s6spxcc23gn"))))))

View file

@ -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<bool>(MDMap); }
MDMapT &MD() {
if (!MDMap)
MDMap.reset(new MDMapT);