Skip to content

Make -lgcc_eh on mingw-w64 optional - #147

Merged
dra27 merged 1 commit into
ocaml:masterfrom
dra27:optional-libs
Apr 2, 2025
Merged

dra27 merged 1 commit into
ocaml:masterfrom
dra27:optional-libs

Conversation

@dra27

@dra27 dra27 commented Nov 22, 2024

Copy link
Copy Markdown
Member

Should fix #133. As noted in ocaml/ocaml#12996, there are configurations where -lgcc_eh isn't available (and therefore required). The change is simply to resolve -lgcc_eh and only add it to default_libs if it's actually found - although it's a slightly noisier change than that simplicity implies!

@dra27

dra27 commented Nov 22, 2024

Copy link
Copy Markdown
Member Author

@toots - no particular rush, but if you have a chance to confirm that this allows the patch you carry in opam-cross-windows to be removed, that'd be great.

@toots

toots commented Nov 22, 2024

Copy link
Copy Markdown
Contributor

Hi @dra27. The changes in ocaml/ocaml#12996 are actually the patch used by the cross-compiler so it can already be dropped.

I'm not sure that I understand the difference with this PR or what additional change this PR is doing? gcc_eh was still mentioned in the compilation workflow somehow?

@dra27

dra27 commented Nov 22, 2024

Copy link
Copy Markdown
Member Author

Ah, have I misunderstood the problem - I thought the issue was that there wasn't any libgcc_eh.a at all, so -lgcc_eh was failing. The change here is that it tries to see if there is an -lgcc_eh. Am I missing something about the failure mode that was being detected before?

@dra27

dra27 commented Nov 22, 2024

Copy link
Copy Markdown
Member Author

@toots

toots commented Nov 22, 2024

Copy link
Copy Markdown
Contributor

@dra27

dra27 commented Apr 1, 2025

Copy link
Copy Markdown
Member Author

Have you been able to look at this patch, @toots?

@toots

toots commented Apr 1, 2025

Copy link
Copy Markdown
Contributor

I think so sorry I forgot to respond. This looks good to me.

Some configurations of mingw-w64 gcc don't use -lgcc_eh - treat it as an
optional library.
@dra27
dra27 enabled auto-merge April 2, 2025 09:37
@dra27
dra27 merged commit c40b429 into ocaml:master Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Conditionally link with gcc_eh

2 participants