chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] [Chicken-announce] CHICKEN 4.9.0rc1 is available


From: John Cowan
Subject: Re: [Chicken-hackers] [Chicken-announce] CHICKEN 4.9.0rc1 is available
Date: Fri, 2 May 2014 11:34:39 -0400
User-agent: Mutt/1.5.20 (2009-06-14)

Peter Bex scripsit:

> > --- apply-hack.x86-64.S 2014-04-18 13:15:27.088722500 -0400
> > +++ apply-hack.x86-64.S.orig    2014-04-18 13:12:09.893443600 -0400
> > @@ -28,8 +28,7 @@
> >         .text
> > 
> >         .globl _C_do_apply_hack
> > -#if defined(__APPLE__) || defined(__CYGWIN__)
> > -#else
> > +#ifndef __APPLE__
> >         .type _C_do_apply_hack, @function
> >  #endif
> 
> I don't see this code; my version already has #ifndef __APPLE__.
> Even 4.8.0.5 already seems to have this.  What's this patch made against?

I accidentally made a reverse patch.  But it's the Wrong Thing: the
whole thing should say "#ifdef __ELF__".

On COFF targets like Windows, the .type pseudo-op means something
completely different and irrelevant, and on Mach-O targets it
is an error.  So .type should be present only on ELF targets,
which is appropriately conditionalized with __ELF__.  See
<https://sourceware.org/binutils/docs/as/Type.html#Type> for details.

> It seems to me that your change to the apply-hack.x86-64.S file must
> be matched with a change to runtime.c, around line 130 there's this part:
> 
> #ifdef C_HACKED_APPLY
> # if defined(C_MACOSX) || defined(__MINGW32__) || defined(__CYGWIN__)
> extern void C_do_apply_hack(void *proc, C_word *args, int count) C_noret;
> # else
> extern void _C_do_apply_hack(void *proc, C_word *args, int count) C_noret;
> #  define C_do_apply_hack _C_do_apply_hack
> # endif
> #endif
> 
> I guess you'll need to append "|| defined(__CYGWIN64__)" to that.  I am
> unsure why this extra level of indirection is used, though.  Probably has
> something to do with the way the linker's and/or C's name mangling work.

Probably.  Unfortunately, there is no __CYGWIN64__, and __CYGWIN__ is defined
on both Cygwin32 and Cygwin64.  I'll experiment a bit more and see
if I can make further progress.

-- 
John Cowan          http://www.ccil.org/~cowan        address@hidden
MEET US AT POINT ORANGE AT MIDNIGHT BRING YOUR DUCK OR PREPARE TO FACE WUGGUMS



reply via email to

[Prev in Thread] Current Thread [Next in Thread]