unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: /srv/bzr/emacs/emacs-24 r111251: * pre-crt0.c (data_start): Initialize to 1.
       [not found] <E1U5LM8-00058R-OJ@vcs.savannah.gnu.org>
@ 2013-02-12 21:07 ` Glenn Morris
  2013-02-12 22:06   ` Paul Eggert
  0 siblings, 1 reply; 3+ messages in thread
From: Glenn Morris @ 2013-02-12 21:07 UTC (permalink / raw)
  To: Paul Eggert; +Cc: Emacs developers

Paul Eggert wrote:

>   * pre-crt0.c (data_start): Initialize to 1.
>   
>   This ports to compilers that optimize the external declaration
>   'int x = 0;' as if it were 'int x;' to shrink the executable.

IIUC, this is in srervice of trying to port Emacs to an platform where
it has never worked (AIX 64-bit). But the code is used by other, working
platforms. Why is this change safe/necessary for emacs-24 at this late
stage?



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: /srv/bzr/emacs/emacs-24 r111251: * pre-crt0.c (data_start): Initialize to 1.
  2013-02-12 21:07 ` /srv/bzr/emacs/emacs-24 r111251: * pre-crt0.c (data_start): Initialize to 1 Glenn Morris
@ 2013-02-12 22:06   ` Paul Eggert
  2013-02-12 23:52     ` Glenn Morris
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Eggert @ 2013-02-12 22:06 UTC (permalink / raw)
  To: Glenn Morris; +Cc: Emacs developers

On 02/12/13 13:07, Glenn Morris wrote:
> the code is used by other, working platforms.

Can you please give an example of such a platform?
I tried to find an example but came up dry (please see below).

> Why is this change safe/necessary for emacs-24 at this late stage?

The change is clearly safe as the variable's contents are
never used.  That being said, the change is not needed on a
platform that defines BSD_SYSTEM or DATA_START or
ORDINARY_LINK or CANNOT_DUMP or SYSTEM_MALLOC, as these
systems never use the address of the variable.  I just now
checked configure.ac etc. and it appears that the change is
therefore not needed on aix, *bsd, cygwin, darwin, gnu,
hpux*, irix6-5, ms-dos, ms-w32, sol2*, unixware.  Is this
the complete set of systems that Emacs ports to?  If so, the
change isn't needed and I'd like to revert it (though the
variable should be removed in the trunk, as it's no longer
used anywhere).  If not, the change is needed if the
variable is compiled with a newer GCC (or similar compiler)
with enough optimizing options that Emacs puts the variable
into bss.

I originally made the change because aix4-2 defined
ORDINARY_LINK but later AIX releases did not, which meant it
appeared that the variable was used on post-4.2 AIX
releases.  However, with my change to unexaix.c today, the
AIX port never uses the address of the variable, so the
change currently is not needed on post-4.2 AIX releases
after all.  I didn't put 2 and 2 together to see this;
sorry.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: /srv/bzr/emacs/emacs-24 r111251: * pre-crt0.c (data_start): Initialize to 1.
  2013-02-12 22:06   ` Paul Eggert
@ 2013-02-12 23:52     ` Glenn Morris
  0 siblings, 0 replies; 3+ messages in thread
From: Glenn Morris @ 2013-02-12 23:52 UTC (permalink / raw)
  To: Paul Eggert; +Cc: Emacs developers

Paul Eggert wrote:

> On 02/12/13 13:07, Glenn Morris wrote:
>> the code is used by other, working platforms.
>
> Can you please give an example of such a platform?
> I tried to find an example but came up dry (please see below).

I just saw a bunch of platforms in configure.ac add pre-crt0.o to
START_FILES, I didn't look any further. I don't really want to figure
out all the possible build permutations if we can get away with simply
not changing it in emacs-24...

> The change is clearly safe as the variable's contents are
> never used.

OK, if you say so. I just saw code that hadn't changed in over 20 years
(!) changing.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-02-12 23:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <E1U5LM8-00058R-OJ@vcs.savannah.gnu.org>
2013-02-12 21:07 ` /srv/bzr/emacs/emacs-24 r111251: * pre-crt0.c (data_start): Initialize to 1 Glenn Morris
2013-02-12 22:06   ` Paul Eggert
2013-02-12 23:52     ` Glenn Morris

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