Skip to content

Remove outdated comments on Windows extra-libraries - #502

Merged
sjakobi merged 1 commit into
masterfrom
sjakobi/outdated-comments
Mar 14, 2022
Merged

sjakobi merged 1 commit into
masterfrom
sjakobi/outdated-comments

Conversation

@sjakobi

@sjakobi sjakobi commented Mar 14, 2022

Copy link
Copy Markdown
Member

Follow-up to #500, which removed the gcc_s extra-library dependency.

Follow-up to #500, which removed the gcc_s extra-library dependency.
@sjakobi

sjakobi commented Mar 14, 2022

Copy link
Copy Markdown
Member Author

Actually I'm still very confused about #498. @kozross, can you help me understand? You added the gcc_s dependency in #423, but now it turned out to that it causes problems. What's going on?

@kozross

kozross commented Mar 14, 2022

Copy link
Copy Markdown
Contributor

@sjakobi This was to do with a __builtin, as without that, it wouldn't build on Windows. It's possibly a false alarm, but as neither @Bodigrim nor I are Windows-knowledgeable, we went on recommendations from what looked like a related issue.

@sjakobi

sjakobi commented Mar 14, 2022

Copy link
Copy Markdown
Member Author

Thanks for the quick response, @kozross. Sounds like a case where nearly everyone is stumbling in the dark.

@kozross

kozross commented Mar 14, 2022

Copy link
Copy Markdown
Contributor

Windows amirite?

@Bodigrim

Copy link
Copy Markdown
Contributor

AFAIR it started with a linking issue. I recalled that adding gcc_s helped for text and suggested adding it to bytestring. It did not work out and someone (@Mistuke?) suggested adding gcc as well. This helped, and we left both gcc and gcc_s. Apparently, gcc_s is redundant and leaks dependency on MSYS.

@kozross

kozross commented Mar 14, 2022

Copy link
Copy Markdown
Contributor

@Bodigrim Yeah, that's basically how I remember it as well. We can remove gcc_s quite safely as a dependency I think.

@Mistuke

Mistuke commented Mar 14, 2022

Copy link
Copy Markdown

AFAIR it started with a linking issue. I recalled that adding gcc_s helped for text and suggested adding it to bytestring. It did not work out and someone (@Mistuke?) suggested adding gcc as well. This helped, and we left both gcc and gcc_s. Apparently, gcc_s is redundant and leaks dependency on MSYS.

To be clear, gcc and gcc_s are mostly the same thing, except libgcc.a is static archive while libgcc_s.a is an import library to a dynamic library. There are some cases where you need both (particularly when shared state is involved) but in this case you don't need to.

Typically speaking saying -lgcc can mean either of those two libraries depending on how the compiler was configured. However in GHC we pass -static-libgcc to tell the compiler we want the static version of the gcc support library. Using the name gcc_s explicitly circumvents this as the only library it can find with such name is the dynamic one.

@sjakobi

sjakobi commented Mar 14, 2022

Copy link
Copy Markdown
Member Author

Thank you for the explanation, @Mistuke! :)

@sjakobi
sjakobi merged commit 0066cf8 into master Mar 14, 2022
@sjakobi
sjakobi deleted the sjakobi/outdated-comments branch March 14, 2022 21:05
Bodigrim pushed a commit to Bodigrim/bytestring that referenced this pull request Mar 22, 2022
Follow-up to haskell#500, which removed the gcc_s extra-library dependency.
@Bodigrim Bodigrim added this to the 0.11.3.1 milestone May 4, 2022
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.

4 participants