unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#6715: 24.0.50; [PATCH] Cygwin build should use pre-crt0.c
@ 2010-07-23 22:44 Ken Brown
  2010-07-24  1:23 ` Chong Yidong
  2010-07-24  5:13 ` Dan Nicolaescu
  0 siblings, 2 replies; 10+ messages in thread
From: Ken Brown @ 2010-07-23 22:44 UTC (permalink / raw)
  To: 6715

The conclusion of

   http://lists.gnu.org/archive/html/emacs-devel/2010-07/msg00398.html

was that the Cygwin build of Emacs should use pre-crt0.c instead of 
ecrt0.c.  The following patch accomplishes this:

--- configure.in.orig	2010-07-12 10:39:38.000000000 -0400
+++ configure.in	2010-07-23 17:01:00.468750000 -0400
@@ -1060,7 +1060,7 @@
  case $opsys in
    cygwin )
      LIB_MATH=
-    START_FILES='ecrt0.o'
+    START_FILES='pre-crt0.o'
      ;;
    darwin )
      ## Adding -lm confuses the dynamic linker, so omit it.

I'm sending this as a bug report so it doesn't get forgotten.  Please 
apply it to the trunk.

Thanks.

Ken





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

* bug#6715: 24.0.50; [PATCH] Cygwin build should use pre-crt0.c
  2010-07-23 22:44 bug#6715: 24.0.50; [PATCH] Cygwin build should use pre-crt0.c Ken Brown
@ 2010-07-24  1:23 ` Chong Yidong
  2010-07-24  5:13 ` Dan Nicolaescu
  1 sibling, 0 replies; 10+ messages in thread
From: Chong Yidong @ 2010-07-24  1:23 UTC (permalink / raw)
  To: Ken Brown; +Cc: 6715-done

Ken Brown <kbrown@cornell.edu> writes:

> The conclusion of
>
>   http://lists.gnu.org/archive/html/emacs-devel/2010-07/msg00398.html
>
> was that the Cygwin build of Emacs should use pre-crt0.c instead of
> ecrt0.c.  The following patch accomplishes this:
>
> I'm sending this as a bug report so it doesn't get forgotten.  Please
> apply it to the trunk.

Applied, thanks.





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

* bug#6715: 24.0.50; [PATCH] Cygwin build should use pre-crt0.c
  2010-07-23 22:44 bug#6715: 24.0.50; [PATCH] Cygwin build should use pre-crt0.c Ken Brown
  2010-07-24  1:23 ` Chong Yidong
@ 2010-07-24  5:13 ` Dan Nicolaescu
  2010-07-24 12:22   ` Ken Brown
  1 sibling, 1 reply; 10+ messages in thread
From: Dan Nicolaescu @ 2010-07-24  5:13 UTC (permalink / raw)
  To: Ken Brown; +Cc: 6715

Ken Brown <kbrown@cornell.edu> writes:

> The conclusion of
>
>   http://lists.gnu.org/archive/html/emacs-devel/2010-07/msg00398.html
>
> was that the Cygwin build of Emacs should use pre-crt0.c instead of
> ecrt0.c.  The following patch accomplishes this:

BTW, it would be good if you could look at configure.in and see if the
line:

  cygwin) LINKER="\$(CC)" ;;

[Just trying to remove special cases from the build system to simplify it...]



>
> --- configure.in.orig	2010-07-12 10:39:38.000000000 -0400
> +++ configure.in	2010-07-23 17:01:00.468750000 -0400
> @@ -1060,7 +1060,7 @@
>  case $opsys in
>    cygwin )
>      LIB_MATH=
> -    START_FILES='ecrt0.o'
> +    START_FILES='pre-crt0.o'
>      ;;
>    darwin )
>      ## Adding -lm confuses the dynamic linker, so omit it.
>
> I'm sending this as a bug report so it doesn't get forgotten.  Please
> apply it to the trunk.
>
> Thanks.
>
> Ken





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

* bug#6715: 24.0.50; [PATCH] Cygwin build should use pre-crt0.c
  2010-07-24  5:13 ` Dan Nicolaescu
@ 2010-07-24 12:22   ` Ken Brown
  2010-07-24 18:48     ` Ken Brown
  0 siblings, 1 reply; 10+ messages in thread
From: Ken Brown @ 2010-07-24 12:22 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: 6715@debbugs.gnu.org

[-- Attachment #1: Type: text/plain, Size: 466 bytes --]

On 7/24/2010 1:13 AM, Dan Nicolaescu wrote:
> BTW, it would be good if you could look at configure.in and see if the
> line:
>
>    cygwin) LINKER="\$(CC)" ;;
>
> [Just trying to remove special cases from the build system to simplify it...]

There's no need for cygwin to be a special case here.  Fixing this also 
makes the cygwin case irrelevant in the code that sets LIB_GCC a little 
further down in configure.in.  Please apply the attached patch.

Thanks.

Ken

[-- Attachment #2: cygwin_cleanup.patch --]
[-- Type: text/plain, Size: 868 bytes --]

--- configure.in.orig	2010-07-23 21:46:35.000000000 -0400
+++ configure.in	2010-07-24 07:54:29.328125000 -0400
@@ -3326,9 +3326,7 @@
 ORDINARY_LINK=
 case "$opsys" in
   ## gnu: GNU needs its own crt0.
-  aix4-2|darwin|gnu|usg5-4|irix6-5|sol2*|unixware) ORDINARY_LINK=yes ;;
-
-  cygwin) LINKER="\$(CC)" ;;
+  aix4-2|cygwin|darwin|gnu|usg5-4|irix6-5|sol2*|unixware) ORDINARY_LINK=yes ;;
 
   ## On post 1.3 releases of NetBSD, gcc -nostdlib also clears the
   ## library search parth, i.e. it won't search /usr/lib for libc and
@@ -3381,8 +3379,7 @@
 if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then
 
   case "$opsys" in
-    ## cygwin: don't link against static libgcc.
-    cygwin|freebsd|netbsd|openbsd) LIB_GCC= ;;
+    freebsd|netbsd|openbsd) LIB_GCC= ;;
 
     gnu-*)
       ## armin76@gentoo.org reported that the lgcc_s flag is necessary to

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

* bug#6715: 24.0.50; [PATCH] Cygwin build should use pre-crt0.c
  2010-07-24 12:22   ` Ken Brown
@ 2010-07-24 18:48     ` Ken Brown
  2010-07-24 20:26       ` Eli Zaretskii
  2010-07-24 21:34       ` Dan Nicolaescu
  0 siblings, 2 replies; 10+ messages in thread
From: Ken Brown @ 2010-07-24 18:48 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: 6715@debbugs.gnu.org

On 7/24/2010 8:22 AM, Ken Brown wrote:
> On 7/24/2010 1:13 AM, Dan Nicolaescu wrote:
>> BTW, it would be good if you could look at configure.in and see if the
>> line:
>>
>>     cygwin) LINKER="\$(CC)" ;;
>>
>> [Just trying to remove special cases from the build system to simplify it...]
>
> There's no need for cygwin to be a special case here.  Fixing this also
> makes the cygwin case irrelevant in the code that sets LIB_GCC a little
> further down in configure.in.  Please apply the attached patch.

Never mind.  I was just given access to the repository, and I applied 
the patch myself.  I didn't regenerate configure.  I wasn't sure if I 
should do that or not.

Since this is my first commit, I would appreciate it if one of the 
experienced people would check that I did it right.

Thanks.

Ken





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

* bug#6715: 24.0.50; [PATCH] Cygwin build should use pre-crt0.c
  2010-07-24 18:48     ` Ken Brown
@ 2010-07-24 20:26       ` Eli Zaretskii
  2010-07-24 21:33         ` Ken Brown
  2010-07-24 21:34       ` Dan Nicolaescu
  1 sibling, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2010-07-24 20:26 UTC (permalink / raw)
  To: Ken Brown; +Cc: dann, 6715

> Date: Sat, 24 Jul 2010 14:48:42 -0400
> From: Ken Brown <kbrown@cornell.edu>
> Cc: "6715@debbugs.gnu.org" <6715@debbugs.gnu.org>
> 
> I didn't regenerate configure.  I wasn't sure if I should do that or
> not.

Yes, you should.  But please make sure you do that with the same
version of Autoconf that was used to generate the current one.

Also, when src/config.in is affected as well (not in this case, I
think), it, too, should be regenerated.

Thanks.





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

* bug#6715: 24.0.50; [PATCH] Cygwin build should use pre-crt0.c
  2010-07-24 20:26       ` Eli Zaretskii
@ 2010-07-24 21:33         ` Ken Brown
  0 siblings, 0 replies; 10+ messages in thread
From: Ken Brown @ 2010-07-24 21:33 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: dann@gnu.org, 6715@debbugs.gnu.org

On 7/24/2010 4:26 PM, Eli Zaretskii wrote:
>> Date: Sat, 24 Jul 2010 14:48:42 -0400
>> From: Ken Brown<kbrown@cornell.edu>
>> Cc: "6715@debbugs.gnu.org"<6715@debbugs.gnu.org>
>>
>> I didn't regenerate configure.  I wasn't sure if I should do that or
>> not.
>
> Yes, you should.  But please make sure you do that with the same
> version of Autoconf that was used to generate the current one.

The current one was generated with Autoconf 2.66, but the latest version 
I have access to is 2.65.  Any suggestions?

Ken





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

* bug#6715: 24.0.50; [PATCH] Cygwin build should use pre-crt0.c
  2010-07-24 18:48     ` Ken Brown
  2010-07-24 20:26       ` Eli Zaretskii
@ 2010-07-24 21:34       ` Dan Nicolaescu
  2010-07-25 14:38         ` Ken Brown
  1 sibling, 1 reply; 10+ messages in thread
From: Dan Nicolaescu @ 2010-07-24 21:34 UTC (permalink / raw)
  To: Ken Brown; +Cc: 6715@debbugs.gnu.org

Ken Brown <kbrown@cornell.edu> writes:

> On 7/24/2010 8:22 AM, Ken Brown wrote:
>> On 7/24/2010 1:13 AM, Dan Nicolaescu wrote:
>>> BTW, it would be good if you could look at configure.in and see if the
>>> line:
>>>
>>>     cygwin) LINKER="\$(CC)" ;;
>>>
>>> [Just trying to remove special cases from the build system to simplify it...]
>>
>> There's no need for cygwin to be a special case here.  Fixing this also
>> makes the cygwin case irrelevant in the code that sets LIB_GCC a little
>> further down in configure.in.  Please apply the attached patch.
>
> Never mind.  I was just given access to the repository, and I applied
> the patch myself.  I didn't regenerate configure.  I wasn't sure if I
> should do that or not.

Please do, use autoconf-2.65 and look at the diff for configure, only
the few lines that you touched should change.  There's no need for a
ChangeLog entry for regenerating configure,

> Since this is my first commit, I would appreciate it if one of the
> experienced people would check that I did it right.

The patch looks fine.  Thanks!

Here's some other cygwin related cleanups:

- remove this:

#ifdef CYGWIN
#define BSD4_2
#endif

and instead add defined(CYGWIN) in the right place in the only user: vm-limit.c

- in configure.in the setting for lastfile.o 
cygwin is the only platform that uses different linking order.
If the "normal" linking order works on cygwin too, it would simplify the build a bit.








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

* bug#6715: 24.0.50; [PATCH] Cygwin build should use pre-crt0.c
  2010-07-24 21:34       ` Dan Nicolaescu
@ 2010-07-25 14:38         ` Ken Brown
  2010-07-25 20:39           ` Dan Nicolaescu
  0 siblings, 1 reply; 10+ messages in thread
From: Ken Brown @ 2010-07-25 14:38 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: 6715@debbugs.gnu.org

On 7/24/2010 5:34 PM, Dan Nicolaescu wrote:
> Here's some other cygwin related cleanups:
>
> - remove this:
>
> #ifdef CYGWIN
> #define BSD4_2
> #endif
>
> and instead add defined(CYGWIN) in the right place in the only user: vm-limit.c

Done.

>
> - in configure.in the setting for lastfile.o
> cygwin is the only platform that uses different linking order.
> If the "normal" linking order works on cygwin too, it would simplify the build a bit.

No, the "normal" linking order doesn't work on cygwin; 
bootstrap-emacs.exe gets built, but it hangs when trying to byte compile 
the .el files.  What about turning the question around?  Would the 
linking order that works on cygwin also work on other platforms?  Or is 
it safer to just leave this alone?

Ken





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

* bug#6715: 24.0.50; [PATCH] Cygwin build should use pre-crt0.c
  2010-07-25 14:38         ` Ken Brown
@ 2010-07-25 20:39           ` Dan Nicolaescu
  0 siblings, 0 replies; 10+ messages in thread
From: Dan Nicolaescu @ 2010-07-25 20:39 UTC (permalink / raw)
  To: Ken Brown; +Cc: 6715@debbugs.gnu.org

Ken Brown <kbrown@cornell.edu> writes:

> On 7/24/2010 5:34 PM, Dan Nicolaescu wrote:
>> Here's some other cygwin related cleanups:
>>
>> - remove this:
>>
>> #ifdef CYGWIN
>> #define BSD4_2
>> #endif
>>
>> and instead add defined(CYGWIN) in the right place in the only user: vm-limit.c
>
> Done.

Thanks.

>
>>
>> - in configure.in the setting for lastfile.o
>> cygwin is the only platform that uses different linking order.
>> If the "normal" linking order works on cygwin too, it would simplify the build a bit.
>
> No, the "normal" linking order doesn't work on cygwin;
> bootstrap-emacs.exe gets built, but it hangs when trying to byte
> compile the .el files.  What about turning the question around?  Would
> the linking order that works on cygwin also work on other platforms?

It would have to be tested on all platforms, and that's not trivial.

> Or is it safer to just leave this alone?

Most likeley.





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

end of thread, other threads:[~2010-07-25 20:39 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-23 22:44 bug#6715: 24.0.50; [PATCH] Cygwin build should use pre-crt0.c Ken Brown
2010-07-24  1:23 ` Chong Yidong
2010-07-24  5:13 ` Dan Nicolaescu
2010-07-24 12:22   ` Ken Brown
2010-07-24 18:48     ` Ken Brown
2010-07-24 20:26       ` Eli Zaretskii
2010-07-24 21:33         ` Ken Brown
2010-07-24 21:34       ` Dan Nicolaescu
2010-07-25 14:38         ` Ken Brown
2010-07-25 20:39           ` Dan Nicolaescu

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