public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jing Yu <jingyu@google.com>
To: "Doug Kwan (關振德)" <dougkwan@google.com>,
	"Joseph S. Myers" <joseph@codesourcery.com>
Cc: Guozhi Wei <carrot@google.com>,
	reply@codereview.appspotmail.com,
	       gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [google] Disable getpagesize() for Android toolchain (issue4515131)
Date: Thu, 26 May 2011 04:23:00 -0000	[thread overview]
Message-ID: <BANLkTin6L2CkW0UmCNBOF6zuLDa524sBgQ@mail.gmail.com> (raw)
In-Reply-To: <BANLkTik7UQEs+DL+ETDuzX4_BmJQLi+_0Q@mail.gmail.com>

Hi Joseph,

We notice that gcc starts to build libiberty for target as a multilib
since gcc-4.6, even if we give --disable-stdc++-v3.
Since then, we run into the incompatible getpagesize() error.

I am wondering how to disable build of libiberty for target? I
searched mailing list. One guy said --disable-libiberty controls the
host libiberty, not the target one, another guy said the option
controls both host and target builds.

In some environment we still need to build libstdc++ libraries, where
libiberty has to be built for target. Can we use #ifndef __ANDROID__
to wrap around the getpagesize() definition? It is working for us.

Thanks,
Jing


On Tue, May 24, 2011 at 11:07 AM, Doug Kwan (關振德) <dougkwan@google.com> wrote:
> Shouldn't we test
>
> ifndef __ANDROID__
>
> instead?
>
> -Doug
>
> On Tue, May 24, 2011 at 2:39 AM, Guozhi Wei <carrot@google.com> wrote:
>> Hi
>>
>> This patch is for google/main.
>>
>> In order to be compatible with current bionic and sysroot, we need to disable
>> getpagesize(). After getpagesize() in bionic is changed and ndk contains that
>> change, we can reenable it.
>>
>> Jing can give more details about it.
>>
>> This patch has been tested on arm qemu without regression.
>>
>> thanks
>> Carrot
>>
>> 2011-05-24  Jing Yu  <jingyu@google.com>
>>
>>        * ChangeLog.google-main: New file.
>>        * getpagesize.c(getpagesize): Disable it for bionic.
>>
>>
>> Index: ChangeLog.google-main
>> ===================================================================
>> --- ChangeLog.google-main       (revision 0)
>> +++ ChangeLog.google-main       (revision 0)
>> @@ -0,0 +1,5 @@
>> +Copyright (C) 2011 Free Software Foundation, Inc.
>> +
>> +Copying and distribution of this file, with or without modification,
>> +are permitted in any medium without royalty provided the copyright
>> +notice and this notice are preserved.
>> Index: getpagesize.c
>> ===================================================================
>> --- getpagesize.c       (revision 174099)
>> +++ getpagesize.c       (working copy)
>> @@ -60,11 +60,13 @@ BUGS
>>  # endif /* PAGESIZE */
>>  #endif /* GNU_OUR_PAGESIZE */
>>
>> +#if DEFAULT_LIBC != LIBC_BIONIC
>>  int
>>  getpagesize (void)
>>  {
>>   return (GNU_OUR_PAGESIZE);
>>  }
>> +#endif
>>
>>  #else /* VMS */
>>
>>
>> --
>> This patch is available for review at http://codereview.appspot.com/4515131
>>
>

  reply	other threads:[~2011-05-26  0:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-24 11:45 Guozhi Wei
2011-05-24 12:37 ` Joseph S. Myers
2011-05-24 19:23 ` Doug Kwan (關振德)
2011-05-26  4:23   ` Jing Yu [this message]
2011-05-26  6:20     ` Doug Kwan (關振德)
2011-05-26  8:58       ` Jing Yu
2011-05-26 12:42     ` Joseph S. Myers
2011-05-27  4:01       ` Jing Yu
2011-05-27  4:02         ` Andrew Pinski
2011-05-26  9:56   ` Carrot Wei

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=BANLkTin6L2CkW0UmCNBOF6zuLDa524sBgQ@mail.gmail.com \
    --to=jingyu@google.com \
    --cc=carrot@google.com \
    --cc=dougkwan@google.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=joseph@codesourcery.com \
    --cc=reply@codereview.appspotmail.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).