From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:41152) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRFlO-0002vu-3q for guix-patches@gnu.org; Wed, 22 Apr 2020 09:50:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jRFlM-0004V8-KC for guix-patches@gnu.org; Wed, 22 Apr 2020 09:50:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:40105) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jRFlK-0004Sh-Pb for guix-patches@gnu.org; Wed, 22 Apr 2020 09:50:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jRFlK-00079g-Mw for guix-patches@gnu.org; Wed, 22 Apr 2020 09:50:02 -0400 Subject: [bug#40767] [PATCH] gnu: Add maradns. Resent-Message-ID: From: Mathieu Othacehe References: <20200422132922.9539-1-arunisaac@systemreboot.net> Date: Wed, 22 Apr 2020 15:49:32 +0200 In-Reply-To: <20200422132922.9539-1-arunisaac@systemreboot.net> (Arun Isaac's message of "Wed, 22 Apr 2020 18:59:22 +0530") Message-ID: <87lfmnock3.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain 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: Arun Isaac Cc: 40767@debbugs.gnu.org Hello, > + #:make-flags (list "CC=gcc" > + (string-append "PREFIX=" %output) > + (string-append "RPM_BUILD_ROOT=" %output)) Hard-coding CC variable this way prevents cross-compilation. If you run: --8<---------------cut here---------------start------------->8--- ./pre-inst-env guix build maradns --target=aarch64-linux-gnu --target=aarch64-linux-gnu --8<---------------cut here---------------end--------------->8--- you will obtain a native version of the binaries. Something like that would work better: --8<---------------cut here---------------start------------->8--- (string-append "CC=" (if target (string-append (assoc-ref %build-inputs "cross-gcc") "/bin/" target "-gcc") "gcc")) --8<---------------cut here---------------end--------------->8--- As this is a recurrent problem we may need to put this snippet into a gnu-build-system function? Thanks, Mathieu