From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Ruslan Babayev <ruslan@babayev.com>
Cc: poky@yoctoproject.org
Subject: Re: gcc cross-compiler hangs with musl libc
Date: Sat, 07 May 2016 09:40:54 +0100 [thread overview]
Message-ID: <1462610454.21674.149.camel@linuxfoundation.org> (raw)
In-Reply-To: <8760uq4yok.fsf@babayev.com>
On Fri, 2016-05-06 at 15:19 -0700, Ruslan Babayev wrote:
> Hi Richard,
>
> I recently noticed GCC in meta-toolchain misteriously hangs when
> trying to build
> anything. This is my config (with meta-intel layers added):
>
> MACHINE = "crystalforest"
> TCLIBC = "musl"
>
> I narrowed it down to gcc not liking '-m64' flag followed by '
> -mmusl'.
>
> $ x86_64-poky-linux-musl-gcc --sysroot=/opt/poky/2.1/sysroots/corei7
> -64-poky-linux-musl hello.c -o hello -m64 #works
> $ x86_64-poky-linux-musl-gcc --sysroot=/opt/poky/2.1/sysroots/corei7
> -64-poky-linux-musl hello.c -o hello -mmusl #works
>
> $ x86_64-poky-linux-musl-gcc --sysroot=/opt/poky/2.1/sysroots/corei7
> -64-poky-linux-musl hello.c -o hello -mmusl -m64 #works
> $ x86_64-poky-linux-musl-gcc --sysroot=/opt/poky/2.1/sysroots/corei7
> -64-poky-linux-musl hello.c -o hello -m64 -mmusl #hangs
> ^C
>
> So it seems passing -mmusl is not required. Just to try this out I
> commented out TARGET_CC_ARCH_append_libc-musl line in
> meta/classes/toolchain-scripts.bbclass and rebuilt my meta-toolchain
> to
> make GCC happy.
>
> I have seen this with musl and x86_64 with -m64 but I am guessing the
> issue might also affect other architechtures and tunes as well x86(
> -m64,
> -m32, -mx32), powerpc (-m64, -m32) etc.
>
> While this looks like a bug in GCC, is there a reason we need to pass
> -mmusl flag?
I'd imagine its telling gcc to link against the musl libc rather than
the glibc one. Certainly, the order of the options shouldn't hang gcc,
in fact gcc shouldn't ever hang due to the options passed so this
sounds like a gcc bug.
I've cc'd Khem who knows more about the musl patches.
Cheers,
Richard
next parent reply other threads:[~2016-05-07 8:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <8760uq4yok.fsf@babayev.com>
2016-05-07 8:40 ` Richard Purdie [this message]
2016-05-07 15:41 ` gcc cross-compiler hangs with musl libc Khem Raj
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1462610454.21674.149.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=poky@yoctoproject.org \
--cc=ruslan@babayev.com \
/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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.