From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:47301) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hqfb9-0005GB-D9 for guix-patches@gnu.org; Thu, 25 Jul 2019 11:24:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hqfb8-0005jk-FZ for guix-patches@gnu.org; Thu, 25 Jul 2019 11:24:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59669) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hqfb8-0005jd-9e for guix-patches@gnu.org; Thu, 25 Jul 2019 11:24:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hqfb8-0007MU-43 for guix-patches@gnu.org; Thu, 25 Jul 2019 11:24:02 -0400 Subject: [bug#36477] [PATCH 26/31] gnu: tcsh: Fix cross-compilation. Resent-Message-ID: References: <20190708095913.3460-1-m.othacehe@gmail.com> <20190708095913.3460-27-m.othacehe@gmail.com> <87ftngo00s.fsf@devup.no> From: Mathieu Othacehe In-reply-to: <87ftngo00s.fsf@devup.no> Date: Thu, 25 Jul 2019 17:23:27 +0200 Message-ID: <87imrqi1e8.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: Marius Bakke Cc: 36477@debbugs.gnu.org >> @@ -356,6 +357,14 @@ written by Paul Haahr and Byron Rakitzis.") >> (arguments >> `(#:phases >> (modify-phases %standard-phases >> + ,@(if (%current-target-system) >> + '((add-before 'configure 'set-cross-cc >> + (lambda _ >> + (substitute* "configure" >> + (("CC_FOR_GETHOST=\"cc\"") >> + "CC_FOR_GETHOST=\"gcc\"")) >> + #t))) >> + '()) > > Actually, can we pass this in #:configure-flags instead? Maybe even > also for the native build? Sadly I think we cannot. The problematic piece is: --8<---------------cut here---------------start------------->8--- dnl Require build CC to create gethost helper when cross building if test "x${cross_compiling}" = xyes ; then CC_FOR_GETHOST="cc" else CC_FOR_GETHOST="\$(CC)" fi AC_SUBST(CC_FOR_GETHOST) --8<---------------cut here---------------end--------------->8--- CC_FOR_GETHOST cannot be overwritten by a configure-flag. Mathieu