From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:54779) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkQRQ-00059K-HX for guix-patches@gnu.org; Mon, 08 Jul 2019 06:00:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hkQRP-00034c-9m for guix-patches@gnu.org; Mon, 08 Jul 2019 06:00:12 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49041) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hkQRP-00034N-2n for guix-patches@gnu.org; Mon, 08 Jul 2019 06:00:11 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hkQRO-0004tV-VV for guix-patches@gnu.org; Mon, 08 Jul 2019 06:00:10 -0400 Subject: [bug#36477] [PATCH 09/31] gnu: http-parser: Fix cross-compilation. Resent-Message-ID: From: Mathieu Othacehe Date: Mon, 8 Jul 2019 11:58:51 +0200 Message-Id: <20190708095913.3460-10-m.othacehe@gmail.com> In-Reply-To: <20190708095913.3460-1-m.othacehe@gmail.com> References: <20190708095913.3460-1-m.othacehe@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 36477@debbugs.gnu.org Cc: Mathieu Othacehe * gnu/packages/web.scm (http-parser)[arguments]: Set CC and AR variables in Makefile in order to fix cross-compilation. --- gnu/packages/web.scm | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index 1d9190ef63..589997e832 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -33,6 +33,7 @@ ;;; Copyright © 2019 Nicolas Goaziou ;;; Copyright © 2019 Brendan Tildesley ;;; Copyright © 2019 Alex Griffin +;;; Copyright © 2019 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -5171,10 +5172,18 @@ 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") #:phases (modify-phases %standard-phases - (delete 'configure)))) + (replace 'configure + (lambda* (#:key target #:allow-other-keys) + (when ,(%current-target-system) + (substitute* (find-files "." "Makefile") + (("CC\\?=.*$") + (string-append "CC=" target "-gcc\n")) + (("AR\\?=.*$") + (string-append "AR=" target "-ar\n")))) + #t))))) (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 -- 2.17.1