I have tested the following patch to skip building target libiberty
for arm*-*-linux-androideabi. It works as intended when building
Android arm-linux-androideabi toolchain.

Doug, do we want to skip building libiberty for non arm android
toolchain, say *-linux-android*?

Joseph, do you think if similar patch is possible for trunk? I will
send a separate email for review if this approach is the right way to
go.

Thanks,
Jing

Index: configure.ac
===================================================================
--- configure.ac        (revision 174299)
+++ configure.ac        (working copy)
@@ -515,7 +515,7 @@
   sh*-*-pe|mips*-*-pe|*arm-wince-pe)
     noconfigdirs="$noconfigdirs target-libiberty"
     ;;
-  arm*-*-symbianelf*)
+  arm*-*-symbianelf*|arm*-*-linux-androideabi)
     noconfigdirs="$noconfigdirs target-libiberty"
     ;;
   avr-*-*)
Index: configure
===================================================================
--- configure   (revision 174299)
+++ configure   (working copy)
@@ -3069,7 +3069,7 @@
   sh*-*-pe|mips*-*-pe|*arm-wince-pe)
     noconfigdirs="$noconfigdirs target-libiberty"
     ;;
-  arm*-*-symbianelf*)
+  arm*-*-symbianelf*|arm*-*-linux-androideabi)
     noconfigdirs="$noconfigdirs target-libiberty"
     ;;
   avr-*-*)




On Thu, May 26, 2011 at 5:00 AM, Joseph S. Myers
<jos...@codesourcery.com> wrote:
> On Wed, 25 May 2011, Jing Yu wrote:
>
>> I am wondering how to disable build of libiberty for target? I
>
> Tear out all the target-libiberty code unconditionally?  See
> <http://gcc.gnu.org/ml/gcc-patches/2011-05/msg01308.html> and references
> therein; building target libiberty at all is a bug in my view.
>
>> 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.
>
> See what I said in
> <http://gcc.gnu.org/ml/gcc-patches/2011-05/msg01311.html>.  libstdc++-v3
> does not use target libiberty; it uses one source file from the libiberty
> directory.
>
> --
> Joseph S. Myers
> jos...@codesourcery.com
>

Reply via email to