On Fri, Apr 18, 2014 at 01:38:42PM -0400, John Cowan wrote:
> And this one eliminates the following complaint from the assembler:
> apply-hack.x86-64.S: Assembler messages:
> apply-hack.x86-64.S:32: Warning: .type pseudo-op used outside of .def/.endef 
> ignored.
> apply-hack.x86-64.S:32: Error: junk at end of line, first unrecognized 
> character is `_'
> rules.make:184: recipe for target 'apply-hack.x86-64.o' failed
> 
> --- 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?

> With those in place, all goes well until the attempt to build 
> cygchicken-0.dll,
> which fails with:
> 
> runtime.o:runtime.c:(.text+0x24c67): undefined reference to `C_do_apply_hack'

Now I'm having some time at the Viking CHICKEN event, I looked into this
again.  I still have no access to Win64, so I can't test it, but perhaps
you can test this:

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.

Cheers,
Peter
-- 
http://www.more-magic.net

_______________________________________________
Chicken-hackers mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/chicken-hackers

Reply via email to