diff options
author | Mathieu Othacehe <m.othacehe@gmail.com> | 2019-07-01 15:31:48 +0200 |
---|---|---|
committer | Mathieu Othacehe <m.othacehe@gmail.com> | 2019-09-24 08:12:55 +0200 |
commit | 078784ce7c1ac5ed6483a00712b6c6badac8b2c9 (patch) | |
tree | 07c7299c364cefe9c84979231294e1667a2d2c72 | |
parent | ceb9de75a6b39fd5df585418953d937361237202 (diff) | |
download | guix-078784ce7c1ac5ed6483a00712b6c6badac8b2c9.tar.gz |
gnu: http-parser: Fix cross-compilation.
* gnu/packages/web.scm (http-parser)[arguments]: Set CC and AR variables in Makefile in order to fix cross-compilation.
-rw-r--r-- | gnu/packages/web.scm | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index 5b1f60cfdd..b415a149b7 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -35,6 +35,7 @@ ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com> ;;; Copyright © 2019 Hartmut Goebel <h.goebel@crazy-compilers.com> ;;; Copyright © 2019 Jakob L. Kreuze <zerodaysfordays@sdf.lonestar.org> +;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -5243,10 +5244,22 @@ into your tests. It automatically starts up a HTTP server in a separate thread #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")) - "CC=gcc" "library") + "library" + ,@(if (%current-target-system) + '() + '("CC=gcc"))) #:phases (modify-phases %standard-phases - (delete 'configure)))) + ,@(if (%current-target-system) + '((replace 'configure + (lambda* (#:key target #:allow-other-keys) + (substitute* (find-files "." "Makefile") + (("CC\\?=.*$") + (string-append "CC=" target "-gcc\n")) + (("AR\\?=.*$") + (string-append "AR=" target "-ar\n"))) + #t))) + '((delete 'configure)))))) (synopsis "HTTP request/response parser for C") (description "This is a parser for HTTP messages written in C. It parses both requests and responses. The parser is designed to be used in |