emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Merging feature/android


From: Po Lu
Subject: Re: Merging feature/android
Date: Sat, 04 Mar 2023 16:19:24 +0800
User-agent: Gnus/5.13 (Gnus v5.13)

Eli Zaretskii <eliz@gnu.org> writes:

>> Date: Fri, 3 Mar 2023 13:17:00 -0800
>> Cc: emacs-devel@gnu.org
>> From: Paul Eggert <eggert@cs.ucla.edu>
>> 
>> On 2023-03-02 02:19, Po Lu wrote:
>> 
>> > Paul, the Android port really needs the `printf-posix' and
>> > `vasprintf-posix' modules (as Android's printf ranges from ``completely
>> > broken'' to ``just missing %td'' depending on the OS version being
>> > used), but stpncpy and getline are only ``nice-to-have''s.  Is there any
>> > downside to depending on those additional gnulib modules?  And will they
>> > build on MS Windows as well?
>> 
>> They should build. They'll bring in a lot of support modules, but if we 
>> play our cards right those modules will be built only on Android so it's 
>> only a matter of library code clutter.
>
> Just having lib/ files that aren't built on some platforms is not a
> problem, from my POV.  We have that already, actually: many of those
> files aren't built on GNU/Linux with new enough kernel and glibc.
>
>> > I tried multiple times, but the gnulib stuff kept trying to include
>> > generated headers from the wrong copy of gnulib, so in the end I
>> > couldn't find any way around having to keep two copies of gnulib
>> > in-tree.
>> 
>> This should be doable by having two build directories, but only one copy 
>> of the Gnulib source should be needed. The two build directories would 
>> have different config.h files. You'd run 'configure' twice (or have two 
>> 'configure' files if you want to be fancier). That sort of thing.
>
> I think running configure twice could be a minor annoyance, but we
> could arrange for the configure script or for some Makefile to run
> another configure script when needed.  The Sourceware build tree does
> something like that when you build GCC, Binutils, or GDB.

We already run configure twice: if you configure --with-android, then
very early on (after initializing the Java compiler stuff), configure
calls a stripped-down version of itself to generate Makefiles using the
Android compiler.  This includes gnulib.mk and lib/Makefile.in, which
are copied to cross/lib and used there to cross-compile gnulib.

So ``cross'' itself kind of serves as this second build directory.  The
problem is that the ``first'' build directory happens to be the same
directory containing the gnulib sources.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]