From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 06 05:32:10 2020 Received: (at submit) by debbugs.gnu.org; 6 Apr 2020 09:32:10 +0000 Received: from localhost ([127.0.0.1]:47168 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jLO70-0006fR-Gg for submit@debbugs.gnu.org; Mon, 06 Apr 2020 05:32:10 -0400 Received: from lists.gnu.org ([209.51.188.17]:34203) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jLO6x-0006fB-Av for submit@debbugs.gnu.org; Mon, 06 Apr 2020 05:32:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42871) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLO6w-00034V-2o for bug-guix@gnu.org; Mon, 06 Apr 2020 05:32:07 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jLO6q-0004sK-H8 for bug-guix@gnu.org; Mon, 06 Apr 2020 05:32:05 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:32641) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jLO6q-0004pp-7D for bug-guix@gnu.org; Mon, 06 Apr 2020 05:32:00 -0400 X-IronPort-AV: E=Sophos;i="5.72,350,1580770800"; d="scan'208";a="444004653" Received: from 91-160-117-201.subs.proxad.net (HELO ribbon) ([91.160.117.201]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Apr 2020 11:31:53 +0200 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: bug-guix@gnu.org Subject: GCC fails to cross-build X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 18 Germinal an 228 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Mon, 06 Apr 2020 11:31:53 +0200 Message-ID: <87mu7pdkom.fsf@inria.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 192.134.164.83 X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Hello, On current =E2=80=98master=E2=80=99 GCC fails to cross build: --8<---------------cut here---------------start------------->8--- $ guix build -e '(@ (gnu packages gcc) gcc)' --target=3Darm-linux-gnueabihf= --no-grafts --log-file https://ci.guix.gnu.org/log/85q2g7xyfrqyzy1kc30kzw5y58c4i1ah-gcc-7.4.0 $ guix describe Generacio 137 Mar 31 2020 09:13:55 (nuna) guix 011f941 repository URL: https://git.savannah.gnu.org/git/guix.git branch: master commit: 011f9412795c141ea05fdfa3096ab252252d7080 --8<---------------cut here---------------end--------------->8--- The log reads (slightly edited): --8<---------------cut here---------------start------------->8--- checking for -rdynamic.../tmp/guix-build-gcc-7.4.0.drv-0/gcc-7.4.0/libcc1/c= onfigure: line 10735: -T: command not found no configure: error:=20 Building GCC with plugin support requires a host that supports -fPIC, -shared, -ldl and -rdynamic. --8<---------------cut here---------------end--------------->8--- That=E2=80=99s from libcc1/configure. =E2=80=98-rdynamic=E2=80=99 is wrong= fully determined to not be working. This is because gcc-plugin.m4 uses this: if test x$build =3D x$host; then export_sym_check=3D"objdump${exeext} -T" elif test x$host =3D x$target; then export_sym_check=3D"$gcc_cv_objdump -T" # <--- here else export_sym_check=3D fi and for some reason $gcc_cv_objdump is empty. Its value comes from the top-level configure.ac: gcc_cv_objdump=3D"$OBJDUMP_FOR_TARGET" This would need a fix that does not apply to the cross-GCC, but here we reach another problem: in gcc.scm we don=E2=80=99t distinguish between a cross-compiler and a cross-compiled compiler because we just look at =E2=80=98%current-target-system=E2=80=99. Thanks, Ludo=E2=80=99.