unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludovic.courtes@inria.fr>
To: 40463@debbugs.gnu.org
Subject: bug#40463: GCC fails to cross-build
Date: Mon, 06 Apr 2020 11:31:53 +0200	[thread overview]
Message-ID: <87mu7pdkom.fsf@inria.fr> (raw)

Hello,

On current ‘master’ GCC fails to cross build:

--8<---------------cut here---------------start------------->8---
$ guix build -e '(@ (gnu packages gcc) gcc)' --target=arm-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/configure: line 10735: -T: command not found
no
configure: error: 
   Building GCC with plugin support requires a host that supports
   -fPIC, -shared, -ldl and -rdynamic.
--8<---------------cut here---------------end--------------->8---

That’s from libcc1/configure.  ‘-rdynamic’ is wrongfully determined to
not be working.  This is because gcc-plugin.m4 uses this:

       if test x$build = x$host; then
	 export_sym_check="objdump${exeext} -T"
       elif test x$host = x$target; then
	 export_sym_check="$gcc_cv_objdump -T"  # <--- here
       else
	 export_sym_check=
       fi

and for some reason $gcc_cv_objdump is empty.  Its value comes from the
top-level configure.ac:

  gcc_cv_objdump="$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’t distinguish between a
cross-compiler and a cross-compiled compiler because we just look at
‘%current-target-system’.

Thanks,
Ludo’.

                 reply	other threads:[~2020-04-06  9:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mu7pdkom.fsf@inria.fr \
    --to=ludovic.courtes@inria.fr \
    --cc=40463@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).