On Mon, May 06, 2019 at 12:54:47PM +0300, Gil Bahat wrote:
> Hi,
> is cygwin still supported anymore?

Well, we never know :-)  I mean, we're always open to fixes to make it
work as long as they don't impact other platforms.

> the target seems to be present in the
> Makefiles and I'd love to be able to use it. I'm running into what seems to
> be a workable linker error:
> $ make TARGET=cygwin
>   LD      haproxy
> src/http_act.o:http_act.c:(.rdata+0x340): multiple definition of
> `.weak.ist_uc.'
> src/ev_poll.o:ev_poll.c:(.rdata+0x20): first defined here

Aie that's really bad, it means the linker doesn't support weak symbols :-(
Weak symbols are very handy as they are able to be included and linked in
only once if they are used, and not linked if unused. The info I'm finding
on the net suggest that symbols must be resolved at link time, which is the
case here. So maybe it's just a matter of definition.

I can suggest a few things to try in include/common/ist.h :

  - replace "__weak__" with "weak" just in case it's different there
    (I don't even know why I marked it "__weak__", probably just by
    mimetism with "__attribute__" and because it worked

  - add "#pragma weak ist_lc" and "#pragma weak ist_uc" in ist.h,
    before the definitions

  - add "extern const unsigned char ist_lc[256];" and
    "extern const unsigned char ist_uc[256];" before the definitions

In case one of them is enough to work, we can merge them.


Reply via email to