From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ali Bahrami Newsgroups: gmane.emacs.bugs Subject: bug#1191: How to contribute back changes for Emacs on Solaris Date: Sat, 18 Oct 2008 21:18:30 -0600 Message-ID: <48FAA706.2050806@emvision.com> References: <48F80A14.7010502@emvision.com> <200810170622.m9H6Mipv013865@mothra.ics.uci.edu> <48F8BD05.5010102@emvision.com> <200810172352.m9HNqwSb016244@mothra.ics.uci.edu> Reply-To: Ali Bahrami , 1191@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=ISO-8859-1 Content-Transfer-Encoding: 7BIT X-Trace: ger.gmane.org 1224387014 2284 80.91.229.12 (19 Oct 2008 03:30:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 19 Oct 2008 03:30:14 +0000 (UTC) Cc: 1191@emacsbugs.donarmstrong.com To: Dan Nicolaescu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 19 05:31:17 2008 connect(): Connection refused Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KrP0d-0002eq-Dg for geb-bug-gnu-emacs@m.gmane.org; Sun, 19 Oct 2008 05:31:15 +0200 Original-Received: from localhost ([127.0.0.1]:33896 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KrOzX-00021R-Gh for geb-bug-gnu-emacs@m.gmane.org; Sat, 18 Oct 2008 23:30:07 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KrOzT-00021M-TX for bug-gnu-emacs@gnu.org; Sat, 18 Oct 2008 23:30:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KrOzT-00021A-1a for bug-gnu-emacs@gnu.org; Sat, 18 Oct 2008 23:30:03 -0400 Original-Received: from [199.232.76.173] (port=32776 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KrOzS-000217-UB for bug-gnu-emacs@gnu.org; Sat, 18 Oct 2008 23:30:02 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:53778) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KrOzS-00047G-JV for bug-gnu-emacs@gnu.org; Sat, 18 Oct 2008 23:30:02 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9J3U0vT028598; Sat, 18 Oct 2008 20:30:00 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m9J3P3jr027413; Sat, 18 Oct 2008 20:25:03 -0700 X-Loop: don@donarmstrong.com Resent-From: Ali Bahrami Original-Sender: Ali.Bahrami@Sun.COM Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sun, 19 Oct 2008 03:25:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1191 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 1191-submit@emacsbugs.donarmstrong.com id=B1191.122438631625996 (code B ref 1191); Sun, 19 Oct 2008 03:25:03 +0000 Original-Received: (at 1191) by emacsbugs.donarmstrong.com; 19 Oct 2008 03:18:36 +0000 Original-Received: from brmea-mail-3.sun.com (brmea-mail-3.Sun.COM [192.18.98.34]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9J3IWS8025987 for <1191@emacsbugs.donarmstrong.com>; Sat, 18 Oct 2008 20:18:33 -0700 Original-Received: from fe-amer-10.sun.com ([192.18.109.80]) by brmea-mail-3.sun.com (8.13.6+Sun/8.12.9) with ESMTP id m9J3IVfa013249 for <1191@emacsbugs.donarmstrong.com>; Sun, 19 Oct 2008 03:18:31 GMT Original-Received: from conversion-daemon.mail-amer.sun.com by mail-amer.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) id <0K8Y00801UA4J200@mail-amer.sun.com> (original mail from ali_gnu@emvision.com) for 1191@emacsbugs.donarmstrong.com; Sat, 18 Oct 2008 21:18:31 -0600 (MDT) Original-Received: from [198.182.198.27] ([199.45.162.234]) by mail-amer.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) with ESMTPSA id <0K8Y00IIFUIU5A60@mail-amer.sun.com>; Sat, 18 Oct 2008 21:18:31 -0600 (MDT) In-reply-to: <200810172352.m9HNqwSb016244@mothra.ics.uci.edu> User-Agent: Thunderbird 2.0.0.12 (X11/20080228) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Sat, 18 Oct 2008 23:30:03 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:21668 Archived-At: Dan Nicolaescu wrote: > > I don't feel comfortable doing these changes without any testing at > all. In that case, the best would be to add a new file > emacs/src/s/sol2-10.h that includes sol2-6.h and also contains your > changes. > Then change configure.in to use that new file for Solaris 10+. I've done that, and built the result on Solaris Nevada (amd64), Solaris 10 (sparc), and Solaris 9 (x86). It seems to work properly, and to use dldump() for S10 and Nevada (aka OpenSolaris), while using the generic dump for S9. I rolled the amd64 configure change into this as well --- I needed it to test, and it makes sense to do the complete deal in one go. Here is the contents of src/s/sol2-10.h, in between the '====' lines: ========================================================================== /* Handle Solaris 2.10 */ #include "sol2-6.h" /* * Use the Solaris dldump() function to dump emacs, instead of * the generic unexelf code. The resulting binary has a complete * symbol table, and is better for debugging and other observability * tools (debuggers, pstack, etc). * * If you encounter a problem using dldump(), please consider sending * a message to the OpenSolaris tools-linking mailing list: * http://mail.opensolaris.org/mailman/listinfo/tools-linking * * Note: Emacs used to use dldump() before, but this was changed * in revision 1.3 of sol2-6.h, on September 13, 2002, with the comment: * * dldump does not handle all the extensions used by GNU ld * * It is not clear what extensions this refers to. Testing with * OpenSolaris shows that it works on newer Solaris versions. * If a problem surfaces, please post the details to the OpenSolaris * mailing list given above. * * It is likely that dldump() works with older Solaris too, * but this has not been tested, and so, this change is for S10 * and newer only at this time. */ #undef UNEXEC #define UNEXEC unexsol.o ========================================================================== And here are the context diffs for the changes to configure.in ========================================================================== *** configure.in.orig Sat Oct 18 17:40:27 2008 --- configure.in Sat Oct 18 18:27:43 2008 *************** *** 974,980 **** ;; *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \ ! | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \ | rs6000-*-solaris2*) case "${canonical}" in m68*-sunos1* ) machine=sun1 ;; --- 974,980 ---- ;; *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \ ! | i[3456]86-*-solaris2* | x86_64-*-solaris2* | i[3456]86-*-sunos5* | power pc*-*-solaris2* \ | rs6000-*-solaris2*) case "${canonical}" in m68*-sunos1* ) machine=sun1 ;; *************** *** 988,993 **** --- 988,1001 ---- sparc* ) machine=sparc ;; * ) unported=yes ;; esac + ## FIXME: make this into a proper fix that checks the compiler type, + ## rather than relying on path. Or is /usr/ccs/lib/cpp a bad default now? + if [ "x$CC" = x/opt/SUNWspro/bin/cc ]; then + ## -Xs prevents spurious whitespace. + SOLARIS_NON_GNU_CPP="/opt/SUNWspro/bin/cc -E -Xs" + else + SOLARIS_NON_GNU_CPP=/usr/ccs/lib/cpp + fi case "${canonical}" in ## The Sun386 didn't get past 4.0. i[3456]86-*-sunos4 ) opsys=sunos4-0 ;; *************** *** 1028,1044 **** NON_GNU_CPP=/usr/ccs/lib/cpp RANLIB="ar -ts" ;; ! *-sunos5* | *-solaris* ) opsys=sol2-6 ! ## FIXME: make this into a proper fix that checks the compiler type, ! ## rather than relying on path. Or is /usr/ccs/lib/cpp a bad default now? ! if [ "x$CC" = x/opt/SUNWspro/bin/cc ]; then ! ## -Xs prevents spurious whitespace. ! NON_GNU_CPP="/opt/SUNWspro/bin/cc -E -Xs" ! else ! NON_GNU_CPP=/usr/ccs/lib/cpp ! fi ;; * ) opsys=bsd4-2 ;; esac ## Watch out for a compiler that we know will not work. --- 1036,1049 ---- NON_GNU_CPP=/usr/ccs/lib/cpp RANLIB="ar -ts" ;; ! *-sunos5.[7-9] | *-solaris2.[7-9] ) opsys=sol2-6 ! NON_GNU_CPP=${SOLARIS_NON_GNU_CPP} ;; + *-sunos5* | *-solaris* ) + opsys=sol2-10 + NON_GNU_CPP=${SOLARIS_NON_GNU_CPP} + ;; * ) opsys=bsd4-2 ;; esac ## Watch out for a compiler that we know will not work. ========================================================================== - Ali