From: Nathan Froyd <froydnj@codesourcery.com>
To: Maxim Kuvyrkov <maxim@codesourcery.com>
Cc: Anthony Green <green@moxielogic.com>,
gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Fix building several uclinux target
Date: Tue, 20 Jul 2010 18:20:00 -0000 [thread overview]
Message-ID: <20100720182034.GJ26037@codesourcery.com> (raw)
In-Reply-To: <4C3F3098.4060407@codesourcery.com>
On Thu, Jul 15, 2010 at 08:00:24PM +0400, Maxim Kuvyrkov wrote:
>> The following patch should fix the build of moxie-uclinux toolchain. The
>> problem was that the piece of config.gcc defining supported linux C
>> libraries isn't executed for most uclinux targets, moxie included.
>> Still, many uclinux targets includes linux.h and linux.opt, which
>> yielded an error.
This patch breaks building a cross to powerpc-eabispe (possibly other
powerpc SysV4-ish non-Linux targets). Reverting this
bit:
> Index: gcc/config.gcc
> ===================================================================
> --- gcc/config.gcc (revision 162059)
> +++ gcc/config.gcc (working copy)
> @@ -405,6 +405,9 @@ case ${target} in
> ;;
> esac
>
> +# Common C libraries. There are mere constants.
> +tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3"
> +
> # Common parts for widely ported systems.
> case ${target} in
> *-*-darwin*)
> @@ -508,8 +511,6 @@ case ${target} in
> *-*-gnu*)
> tmake_file="$tmake_file t-gnu";;
> esac
> - # Common C libraries.
> - tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3"
> # glibc / uclibc / bionic switch.
> # uclibc and bionic aren't usable for GNU/Hurd and neither for GNU/k*BSD.
> case $target in
fixes things.
I think this is because of this hunk in config/rs6000/sysv4.h:
#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
#if DEFAULT_LIBC == LIBC_UCLIBC
#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
#elif DEFAULT_LIBC == LIBC_GLIBC
#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}"
#else
#error "Unsupported DEFAULT_LIBC"
#endif
#define LINUX_DYNAMIC_LINKER \
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER)
After your patch, LIBC_{UCLIBC,GLIBC} are defined unconditionally;
DEFAULT_LIBC is not defined, so we now fall through to the #error case.
Perhaps the toplevel code should now be:
case $target in
*-*-*linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu)
# Common C libraries.
tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3"
;;
esac
to catch the uclinux targets as well?
-Nathan
next prev parent reply other threads:[~2010-07-20 18:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4C370662.8050906@moxielogic.com>
[not found] ` <4C374760.8070705@codesourcery.com>
[not found] ` <4C378A3A.8070309@moxielogic.com>
2010-07-11 19:21 ` Problem configuring uclinux toolchain Maxim Kuvyrkov
2010-07-12 12:44 ` Anthony Green
2010-07-15 16:00 ` [PATCH] Fix building several uclinux target Maxim Kuvyrkov
2010-07-19 16:33 ` Mark Mitchell
2010-07-20 18:20 ` Nathan Froyd [this message]
2010-07-21 18:39 ` Maxim Kuvyrkov
2010-07-21 23:09 ` David Edelsohn
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=20100720182034.GJ26037@codesourcery.com \
--to=froydnj@codesourcery.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=green@moxielogic.com \
--cc=maxim@codesourcery.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 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).