From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: Merging feature/android Date: Sun, 05 Mar 2023 18:40:24 +0800 Message-ID: <87bkl7traf.fsf@yahoo.com> References: <87edq7ztks.fsf.ref@yahoo.com> <87fsanxoah.fsf@yahoo.com> <83zg8vckx5.fsf@gnu.org> <87bklay7wg.fsf@yahoo.com> <83ilficn4k.fsf@gnu.org> <87zg8uw9b9.fsf@yahoo.com> <837cvycjse.fsf@gnu.org> <87ttz2w4c3.fsf@yahoo.com> <83356mcbxw.fsf@gnu.org> <87pm9qvu9w.fsf@yahoo.com> <83y1odc37g.fsf@gnu.org> <87cz5pwf9c.fsf@yahoo.com> <83edq5asb3.fsf@gnu.org> <875ybhvt4w.fsf@yahoo.com> <83356kbxnh.fsf@gnu.org> <87lekcvho4.fsf@yahoo.com> <83r0u4adgd.fsf@gnu.org> <87a60suknn.fsf@yahoo.com> <563e9da9-c45e-a4d2-6dda-074ac035c256@cs.ucla.edu> <871qm3vqez.fsf@yahoo.com> <154a7bcc-f42d-21f1-1780-2dc3bb5443eb@cs.ucla.edu> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39947"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Mar 05 11:41:11 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pYlni-000AEn-Rq for ged-emacs-devel@m.gmane-mx.org; Sun, 05 Mar 2023 11:41:10 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pYlnC-0002DX-EL; Sun, 05 Mar 2023 05:40:38 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYlnA-0002CS-8A for emacs-devel@gnu.org; Sun, 05 Mar 2023 05:40:36 -0500 Original-Received: from sonic305-20.consmr.mail.ne1.yahoo.com ([66.163.185.146]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pYln8-0004zU-Hx for emacs-devel@gnu.org; Sun, 05 Mar 2023 05:40:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1678012831; bh=vkYkdJKRT3D7J5K1vBf2Gul5ZTd1yN5HdYWouogu17E=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=URhbmJhNqZZYn+ktuu70f6tolwf2ohU340+I36c27hLzWWAyvuiQP0tY6O1KwbHWfEWrnqyhdyG8eRZF+ZZ0OmOyJ5XaLe2KMK+obdQW8Bd9FWFKpIktT0B2DKQv9AuKwiIRPWqC94YuxYeDHPjMpzRo9Tnw7xmeoU1DBTzr6vmUFIT7ZSjeQFneE6jDgIjkPb9RYquQubnxhXz/GisA7uv8ZSS0dPomGhUP+9SxjlZhUfp6ERCgC8gvYPI3gp/LtO4upGzuGa6VABWIQHbHRvGjLqNR2a9LApM443MU9tZTf+XE+BusmNsmAVz2k14VbRQpRvcdlTAtJIyRvmcYTA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1678012831; bh=8SEwHJWQ3DCUe2oMuIO4bvLUrhWOAJtvvy5q+acw/8J=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=Jhv9M1r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PPOxHtAhDu XF9EuhlmyPq_1sMHnCu7sBZkPgL0RKEyOVvXTdOiAll.asbepoD18FXXFBQbhvBcK1eFS_j8ujgI rkdSJZzIGj7viB4ahKAhfDOLwzM3LcjmflJljj2KQX X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.ne1.yahoo.com with HTTP; Sun, 5 Mar 2023 10:40:31 +0000 Original-Received: by hermes--production-sg3-67c57bccff-wt27l (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 5f2395ed9d133e66dfe6731e36e6d241; Sun, 05 Mar 2023 10:40:28 +0000 (UTC) In-Reply-To: <154a7bcc-f42d-21f1-1780-2dc3bb5443eb@cs.ucla.edu> (Paul Eggert's message of "Sun, 5 Mar 2023 01:32:26 -0800") X-Mailer: WebService/1.1.21221 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.185.146; envelope-from=luangruo@yahoo.com; helo=sonic305-20.consmr.mail.ne1.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:303972 Archived-At: Paul Eggert writes: > 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. But nothing prevents us from making this tiny change to our configury to make Emacs work with those old compilers. >> 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?). The problem with GNUC_PREREQ is that while it works as intended, the check in emacs-module.c doesn't catch the r16 gcc which throws ICEs compiling a program, and the fallback is not to disable dynamic module support, but to cause a compilation error. > 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.) It is best to follow the Autoconf Way. Otherwise, we will be heading back to the age where configure looked for the a m/ header and then ran Makefile.c through sed and cpp. > 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. I cannot agree with this statement when I see every day my relatives and coworkers using such old versions of Android, which are also supported by many proprietary software developers. An old version of the NDK works fine, and is in fact still supported by Google (r16 is provided in the SDK manager's downloads page as an LTS release), aside from having this nasty compiler problem.