RE: Building Elfutils with Mingw32

2023-09-14 Thread McAllister, Colin via Elfutils-devel
Hi Ulf,

I did see that there were quite a few patches sent to the ML toward the end of 
2022 that attempted to add Windows support.
https://sourceware.org/pipermail/elfutils-devel/2022q4/005449.html
https://sourceware.org/pipermail/elfutils-devel/2022q4/005667.html

It looks like some of the patches were merged, but quite a few were never 
applied. I'm wondering if it'd be possible to finish adding support upstream 
such that a fork would no longer be needed?

I would be happy to help contribute however I can.

Best,
Colin

-Original Message-
From: Ulf Hermann  
Sent: Thursday, September 14, 2023 1:34 AM
To: McAllister, Colin ; 
elfutils-devel@sourceware.org
Subject: Re: Building Elfutils with Mingw32

CAUTION - EXTERNAL EMAIL: Do not click any links or open any attachments unless 
you trust the sender and know the content is safe.


Hi,

keeping the windows/elfutils fork up to date definitely is a lot of work, which 
is why I haven't found the time to do it for a while.
However, perfparser could in fact also use debuginfod (with some caveats).

I guess that some more of my patches could be upstreamed if properly cleaned 
up. A rebase rather than a merge may be more conductive to this.

All I can do right now is tell you that I'd be happy about any contribution. 
The repository I've been using still exists and accepts outside contributions. 
See 
https://urldefense.com/v3/__https://codereview.qt-project.org/q/repo:qt-creator/elfutils__;!!EJc4YC3iFmQ!V-n1VhUSf6Zz6kOtv6XIbgO0el_54wkfPU0fV7nrQMXmpser6j6-rFUtlaE2bw6kNlqXpIYTJpkFBTF13J0n02PTDg$
  . You have to go through the Qt CLA process to work with it, but the CLA is 
largely meaningless in this case. I'd be happy to move the repository to a more 
"official" place without CLA.

There have also been other people on this mailing list talking about porting 
elfutils to windows. Maybe if we combine our efforts we'll actually find a way 
to maintain a port.

best regards,
Ulf


Re: Building Elfutils with Mingw32

2023-09-14 Thread Ulf Hermann via Elfutils-devel
Indeed I have noticed the other patches, but I don't think they are the 
same as mine. So, now we have a three way merge.


I guess some more of the changes could be merged if properly cleaned up 
and made to benefit other obscure platforms, too. However, there are a 
few I got a definite "no" for. In particular the windows dance around 
text/binary mode when opening files was not welcome. I couldn't come up 
with a better solution than adding an O_BINARY or O_TEXT to every single 
open() call. We actually need the distinction as some files need to be 
opened in text mode for the tests to pass. If you can come up with 
anything better here, please let me know.


best regards,
Ulf