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: Sun, 05 Mar 2023 11:16:20 +0800
User-agent: Gnus/5.13 (Gnus v5.13)

Paul Eggert <eggert@cs.ucla.edu> writes:

> Actually dynamic module support should build with Sun C 5.15 (i.e.,
> Oracle Solaris Studio 12.6), because Sun C supports GNU C's
> __attribute__ ((cleanup)) extension. I think icc also supports that
> extension. Not that I've ever used modules on those platforms.

Well, I do recall /opt/SUNwspro/bin/cc choking on emacs-module.c at some
point in the past.  I didn't think much of it at the time and just gave:

  ./configure CC=gcc7

but that's not something we want to make everyone do.  In retrospect, it
probably failed because the ifdefs in emacs-module.c did not detect the
attribute support correctly.

> As I vaguely recall, this issue came up in 2015 when Emacs modules
> were added, and it was decided that there wasn't a practical way to
> get Emacs modules to work if the compiler did not support a cleanup
> attribute of some sort.

Right, so the correct solution is to check whether or not the compiler
supports such an extension, and disable dynamic module support should it
not.  Which is why we use configure in the first place, instead of
performing ``checks'' with `GNUC_PREREQ'.

> I'm a bit surprised that the Android NDK doesn't support the
> attribute, though, as I thought it was based on Clang. Perhaps there's
> an alternate compiler you can use to build on Android.

The attribute leads to a compiler error generating while generating
debug information, or alternatively the

 #error "__attribute__ ((cleanup)) not supported by this compiler; try GCC"

in emacs-module.c being triggered, depending on the version of the NDK
you use.

r21 and r25 are free of this illness, but they don't support old
versions of Android that Emacs does, such as Android 4.4 or 2.2.

  (And the other day someone asked me for a build of Emacs that runs on
   Android 4.1, so these versions are evidently being used.)


reply via email to

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