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: Thu, 02 Mar 2023 18:19:50 +0800 Message-ID: <87v8jjxxo9.fsf@yahoo.com> References: <87edq7ztks.fsf.ref@yahoo.com> <87edq7ztks.fsf@yahoo.com> <83pm9reccn.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18665"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org, Paul Eggert To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Mar 02 11:20:42 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 1pXg3G-0004cS-DF for ged-emacs-devel@m.gmane-mx.org; Thu, 02 Mar 2023 11:20:42 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pXg2i-00086Z-5e; Thu, 02 Mar 2023 05:20:08 -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 1pXg2d-0007ku-No for emacs-devel@gnu.org; Thu, 02 Mar 2023 05:20:04 -0500 Original-Received: from sonic316-22.consmr.mail.ne1.yahoo.com ([66.163.187.148]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pXg2b-0001HT-1Y for emacs-devel@gnu.org; Thu, 02 Mar 2023 05:20:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1677752398; bh=mkUlYSIvZ2Fl35Q+/FOlt6fWsP7eSsQEQyXr8cWqqS4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=GWW7TwLhecqeyiMQ5pfrQRDQNffCqgQEgYP/AwX1xMY4UKC+jct15WQZQ0KjFho7T580f6VKPI8/knLj5r6BfHSUzhEm3CAS1zuNBr8BDHKOu7oE72Xw+R5OF7VH1vL/Y5hOQYV3TmvUe/UDZUDLISZGiPFf7PN3Gv70wodJcyZruVucqCLTYj3kNKFrK4dHo0DzG0W4Hqv31w/SFuBAfncmd7ZB4XgQA9VaXOHTNr72cb2zdmkes0Qf9Ktc3/YEh2Gu/1AdAFtGoxspUFGpWGDigAFyE+r2pFH6KQoHv01humSLfeOi9hb+chxAA0QbMkteXDYVa4KK8NrWjvM4dg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1677752398; bh=jupVCr8Z2mdauk4SZBYAX65hPVu7DE5KFCKAx8dl5ew=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=J4zthiPhgxYHc0Axb/7OgcnVuZlm7Npj1Saxn/nT1Ps/hd9Zjw/IqQo51p4PH1CUaHgjqTeocI4f4q5IK9M5ov9a/lmCv0z92ejB9nw2f6Ldh3Mfuk7KpBeMii4JqY/tmb7VIbNFZ4mAtQMxqR5kTQHS+rGH90uUtuSTtM6v2/mPfAMBahVkd9KijIyoa1o8fNcK33Fp5uan+UKMIvPBNAq+Cqy9T+EJKjzZFgHAwabUKhPPRitKFGJJK0K+XoRC8HZ7vOlC9IUM1gRlTkIaod1M48+Pt0K9xIndVb53SDrK8NR71CWoHWcj6lhyuZBgTfwrgvMsuuJKGUdcvzib9Q== X-YMail-OSG: FVcgo8kVM1l_xOKw73QSGuep6qY5E84L8qhollNPN0McazuEY8VgmWe8hGs9Piu Gb0UBE9ZD96j.J7Ha4xKsIBUVvruAmzswEBhVysH3wbtKYENe8GWm67yAKwtfEAvBZmYdp.Dih1X 9Ui511_I7K4BXEhfgIAUi_f0Xslh8AkGvaoQxqTtYa8F7jsUCHZLFtJctmBXgcp3XF4bScfKYi1H 4wtXWtilpO.FM4kXv3J.ca50N97Pt5XycOhuUybUCKBtiMYu6aiVHRujnHNp5tStehFt8t0Ue2Zp jDLgZPZHi0RZBL91PPrjaVrK4nTwWBdMFUbD9QQbkKIQ_iC8o3gbLiQYc82mQ4GsmXErq9gkRYGo UtdTW0yZB8y_5Vo4PKxr9LhJ8VGEfc08JYJQSPM0iBzlMhvp19c8uhcXkuyXU1AGOsacMrNrorb_ OrDB73HAA.jvZYFiS45OtTwDu0uchTRazDHIG3fxCznZMNZCOQugUzyHcqpNHAPM3.allQl_O1nG N63YEPTEJbGsvrh2xUHZPZfNkHqdyQlPBpzIKRN9BKS2mimJoveWFNvkwxCWLrnYSmRhXcJqQPCI PppISsUKipNYYrDwkvorP.zHu8VJ4SLCiSo1nY3scuON7ITpyT93f8JactkaDVZg0ivg1N8U10Aj _4GSaYZowvVspWdl01Bqq0rJDX6G_5yOl6ieswJIAzjBZhfxetY0B7Zff9QqQXqDSxC_Svek6u5v jAwLenqGpHodhakFMX6i2sSeypWEDuE2qyyCFGWZForb9CWW9vebKCeuersp34e5VH0lizW7M3bu 4Nd57AvR4pd5.5BI2r8gHf2QwgNDTjgG7gsQwXC7aN X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic316.consmr.mail.ne1.yahoo.com with HTTP; Thu, 2 Mar 2023 10:19:58 +0000 Original-Received: by hermes--production-sg3-9fc5746c8-7wpmf (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 2fad987114cdd57402fea2e4b351f0f0; Thu, 02 Mar 2023 10:19:55 +0000 (UTC) In-Reply-To: <83pm9reccn.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 02 Mar 2023 11:23:04 +0200") 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.187.148; envelope-from=luangruo@yahoo.com; helo=sonic316-22.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=unavailable 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:303892 Archived-At: Eli Zaretskii writes: > How long was this branch kept in its finished state, and how many > people tried it? Does it build on the main supported systems? It builds on GNU/Linux and Haiku, I've not tested this on other systems yet. I plan to fix the MS-DOS build a while after it is merged. > If the branch in its current state is relatively "young", I'd prefer > to delay merging it for a month or so, to give more people chance to > build and try it. There's no rush in landing it. Thanks, then I guess I'll ask in April. It's been finished for about a week now. > Some specific comments below. > > The INSTALL.android file: > > . It should be in a subdirectory, like we do with nt/INSTALL (and > NEWS should be updated to that effect). > . The NDK BUILD SYSTEM IMPLEMENTATION section doesn't belong in > INSTALL, IMO. It should be a separate file, since it's mainly of > interest to Emacs developers. Sure. > . The PATCH FOR LIBXML2 part and similar parts for patching other > libraries and components should also be in separate files, suitable > for submitting to Patch or similar utilities, and INSTALL should > only mention the need for these patch and refer to those files. What would be a good place to put these patch files? admin/notes perhaps? > admin/merge-gnulib: I don't think we should change this without a > review from Paul Eggert. The additional modules you add may need to > be disabled in nt/gnulib-cfg.mk if for some reason they are compiled > without being needed. Okay. 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? > -OPTION_DEFAULT_ON([modules],[don't compile with dynamic modules support]) > +OPTION_DEFAULT_IFAVAILABLE([modules],[don't compile with dynamic modules support]) > > Why was this changed to "ifavailable"? Because the modules code has a dependency on the GCC cleanup function extension, and fails to compile when it is not present. I rewrote the configury to detect the presence of the extension and not build with modules when that is in effect. > The changes in configure.ac that disable various warning options: > > + nw="$nw -Wunknown-warning-option" # Let #pragma GCC ignore work properly > + # even when the compiler in use doesn't > + # support the option. > > + # If Emacs is being built for Android and many functions are > + # currently stubbed out for operation on the build machine, disable > + # -Wsuggest-attribute=noreturn. > + > + nw="$nw -Wsuggest-attribute=noreturn" > > + gl_WARN_ADD([-Wno-shift-overflow]) > > If these are specific to Android, they should have suitable conditions > for when to apply them. OK, thanks for catching this. > The gecos test in configure.ac: > > +# Check for pw_gecos in struct passwd; this is known to be missing on > +# Android. > + > +AC_CHECK_MEMBERS([struct passwd.pw_gecos], [], [], [#include ]) > > This could fail the MS-Windows build -- did you check that it doesn't > have any adverse effect on that? It should not, since the result of the check is only used on Unix systems. > CM_OBJ setting in configure.ac: > > -CM_OBJ="cm.o" > > Why was this deleted? It wasn't, I simply moved it further up. > + Does Emacs use Android? ${ANDROID} > > This should say "Is Emacs being built for Android?" instead. OK, thanks. > The files in cross/lib/ seem to be from Gnulib? If so, do we really > need another copy of them in the tree? any way to reuse the sources in > lib/ instead? 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. In the past cross/lib was also used to hold patches for Android, but the gnulib folks have now fixed all of the problems which required patches. > General remark about *.texi files: it looks like you used TABs there; > you should only use spaces for alignment in Texinfo. > > The code in from_unicode_buffer that is used only on Android should be > under an appropriate #ifdef. Likewise with other such code, if any. > > Thanks. I will fix these too, thanks.