emacs-devel
[Top][All Lists]
Advanced

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

Re: Merging feature/android


From: Paul Eggert
Subject: Re: Merging feature/android
Date: Sun, 5 Mar 2023 01:32:26 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1

On 2023-03-04 19:16, Po Lu wrote:
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.

That's likely an earlier version of Sun C that does not support __attribute__ ((cleanup)). I doubt whether it's worth worrying about these older Sun C versions. People can get an up-to-date compiler, or (better yet) use GCC. It's not worth our time to port to obsolete Sun C.


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'.

Emacs uses HAS_ATTRIBUTE, which should use Clang's __has_attribute, which should work with a recent-enough Android NDK (as these are based on Clang).

If you're using an older Android NDK based on GCC, yes that does use GNUC_PREREQ, but again this should work unless the older Android NDKs are squirrelly about GCC version numbers (are they?).

It's true that the Autoconf Way is to write a little program to test for __attribute__((cleanup)) directly, and that may be a good way to go. However, I would suggest first understanding why the current approach does not work. (But please see below; perhaps we don't need to worry about this at all.)


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.)

Although I'm sure that ancient Android versions are still used somewhere, I suggest that we not worry about porting to Android versions so old that Google itself no longer supports them. This is the general guideline we've used for most other ports, and it should be a good guideline for Android too. We have limited development resources and it's generally not worth our time to port to an OS if it's not even worth the OS maintainer's time to support the OS.

Plus, Emacs is likely to have known security holes if we try to port it to no-longer-supported Android, and that would be bad for our users and bad publicity for Emacs. Android is one of the biggest malware targets out there.


The attribute leads to a compiler error generating while generating
debug information

If this Android NDK is so old that Google no longer supports it, I wouldn't worry about it. If not, perhaps we'll need to build Emacs without the debug-info option that is making that buggy compiler crash.



reply via email to

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