unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Ali Bahrami <ali_gnu@emvision.com>
To: Dan Nicolaescu <dann@ics.uci.edu>
Cc: 1191@emacsbugs.donarmstrong.com
Subject: bug#1191: How to contribute back changes for Emacs on Solaris
Date: Sat, 18 Oct 2008 21:18:30 -0600	[thread overview]
Message-ID: <48FAA706.2050806@emvision.com> (raw)
In-Reply-To: <200810172352.m9HNqwSb016244@mothra.ics.uci.edu>

Dan Nicolaescu wrote:
<snip>
 >
 > 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






  reply	other threads:[~2008-10-19  3:18 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200812120309.mBC392kD002742@mothra.ics.uci.edu>
2008-10-17  3:44 ` bug#1191: How to contribute back changes for Emacs on Solaris Ali Bahrami
2008-10-17  6:22   ` Dan Nicolaescu
2008-10-17 16:27     ` Ali Bahrami
2008-10-17 23:52       ` Dan Nicolaescu
2008-10-19  3:18         ` Ali Bahrami [this message]
2008-10-20 22:29           ` Dan Nicolaescu
2008-10-23  6:45             ` Ali Bahrami
2008-10-23 16:23               ` Ali Bahrami
2008-10-23 19:35               ` Dan Nicolaescu
2008-10-23 22:51                 ` Ali Bahrami
2008-10-23 23:06                   ` Dan Nicolaescu
2008-10-23 23:21                     ` Ali Bahrami
2008-10-24  0:22                       ` Dan Nicolaescu
2008-12-11 17:47   ` Dan Nicolaescu
2008-12-11 18:10     ` Ali Bahrami
2008-12-11 18:14       ` Dan Nicolaescu
2008-12-11 18:21         ` Ali Bahrami
2008-12-12  2:55         ` Ali Bahrami
2008-12-12  3:15   ` bug#1191: marked as done (How to contribute back changes for Emacs on Solaris) Emacs bug Tracking System

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48FAA706.2050806@emvision.com \
    --to=ali_gnu@emvision.com \
    --cc=1191@emacsbugs.donarmstrong.com \
    --cc=dann@ics.uci.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).