gnu: mariadb: Fix build on armhf-linux.

* gnu/packages/databases.scm (mariadb)[arguments]: When building for
armhf-linux, add phase 'hide-default-gcc'.
[native-inputs]: Distinguish GCC-5.
This commit is contained in:
Marius Bakke 2020-04-10 17:50:25 +02:00
parent e43e980f84
commit b859a1bf79
No known key found for this signature in database
GPG key ID: A2A06DF2A33A54FA

View file

@ -774,6 +774,20 @@ (define-public mariadb
"-DINSTALL_SHAREDIR=share")
#:phases
(modify-phases %standard-phases
,@(if (string-prefix? "arm" (%current-system))
;; XXX: Because of the GCC 5 input, we need to hide GCC 7 from
;; CPLUS_INCLUDE_PATH so that its headers do not shadow GCC 5.
'((add-after 'set-paths 'hide-default-gcc
(lambda* (#:key inputs #:allow-other-keys)
(let ((gcc (assoc-ref inputs "gcc")))
(setenv "CPLUS_INCLUDE_PATH"
(string-join
(delete (string-append gcc "/include/c++")
(string-split (getenv "CPLUS_INCLUDE_PATH")
#\:))
":"))
#t))))
'())
(add-after 'unpack 'fix-pcre-detection
(lambda _
;; The bundled PCRE in MariaDB has a patch that was upstreamed
@ -906,7 +920,7 @@ (define-public mariadb
`(("bison" ,bison)
;; XXX: On armhf, use GCC 5 to work around <https://bugs.gnu.org/37605>.
,@(if (string-prefix? "armhf" (%current-system))
`(("gcc", gcc-5))
`(("gcc@5", gcc-5))
'())
("perl" ,perl)))
(inputs