This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] glibc / uclibc / bionic switch vs. non-Linux, GNU-based systems
On Wed, 8 Dec 2010, Thomas Schwinge wrote:
> > This patch works by defining SINGLE_LIBC (along with DEFAULT_LIBC) for
>
> Why not just SINGLE_LIBC for (a) triggering this single libc case, and
> (b) specifying which one to use? That is:
Because of the existing conditionals defining CHOOSE_DYNAMIC_LINKER, users
of linux.h need to define DEFAULT_LIBC anyway (see the definitions for
various uClinux targets that I replaced by a single central definition for
uClinux targets) and it seemed simplest to have a single macro specifying
the default in all cases rather than different macros for the default in
different cases.
(I see the first definition of DEFAULT_LIBC in my patch is actually
redundant with the one a few lines below
case $target in
*-*-*android*)
tm_defines="$tm_defines DEFAULT_LIBC=LIBC_BIONIC"
;;
*-*-*uclibc*)
tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC"
;;
*)
tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC"
;;
esac
so reviewers should feel free to review my patch on the basis of the
duplicate being removed, i.e.
- tm_defines="$tm_defines OPTION_GLIBC=1";;
+ tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC SINGLE_LIBC";;
being changed to
- tm_defines="$tm_defines OPTION_GLIBC=1";;
+ tm_defines="$tm_defines SINGLE_LIBC";;
.)
--
Joseph S. Myers
joseph@codesourcery.com