This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Disable libcpp With GCC 4.8?
- From: Ian Lance Taylor <iant at google dot com>
- To: Cyd Haselton <chaselton at gmail dot com>
- Cc: "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>
- Date: Fri, 25 Oct 2013 06:47:56 -0700
- Subject: Re: Disable libcpp With GCC 4.8?
- Authentication-results: sourceware.org; auth=none
- References: <CAHu5PrbCvk8Vkt2byYu84tuAsb0vHE9PnQxp-Z7Fgyg2NGvwyQ at mail dot gmail dot com>
On Fri, Oct 25, 2013 at 4:05 AM, Cyd Haselton <chaselton@gmail.com> wrote:
>
> I've cross-built a native version of GCC 4.7 to run on an android device
> using
> configure --build=redhat-linux-x86_64 --host=arm-linux-androideabi
> --target=arm-linux-androideabi (options)
> make -d configure-target-libgcc
> make -d all-host all-target
>
> In (options) I basically disable everything except for
> --enable-languages=c.
>
> However, when I attempt the same with GCC 4.8, I consistently run into the
> following error:
>
> ../../gcc-4.8/libcpp/macro.c:249:34: error: invalid conversion from 'long
> unsigned int*' to 'const time_t* {aka const long int*}' [-fpermissive]
>
> Adding -fpermissive allows the build to continue for a while, but it fails
> later on with a bunch of undefined references.
> Disabling libcpp by using --disable-libcpp or --disable-cpplib or
> --enable-libcpp=no allows the build to continue for a while, but then it
> fails because of a dependency on libcpp further along in the build.
>
> Is there a way to build without libcpp? Or, remove the dependencies on
> libcpp that are causing the later portions of the build to fail?
libcpp is an essential part of the compiler; there is no way to
disable it.
This error looks to me to be a bug in the Android header files. The
code in libcpp is
tb = localtime (&st->st_mtime);
That should be fine.
If you are convinced that the Android header files are correct, then
please file a bug against GCC; see http://gcc.gnu.org/bugs/ .
In the meantime you can fix the problem by editing the GCC sources to
do something like
time_t t = (time_t) st->st_mtime;
tb = localtime (&t);
Ian