Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Revert "Makefile: Compile zlib .c files with DMD via importC"" #8873

Conversation

thewilsonator
Copy link
Contributor

Reverts #8870

The regression for this was fixed by dlang/dmd#15975

@dlang-bot
Copy link
Contributor

Thanks for your pull request and interest in making D better, @thewilsonator! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

Please see CONTRIBUTING.md for more information.


If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + phobos#8873"

@thewilsonator
Copy link
Contributor Author

Something very odd is going on with the CI, its using the results of the previous PR

@thewilsonator thewilsonator merged commit 097ffd4 into dlang:master Jan 5, 2024
18 of 26 checks passed
@thewilsonator thewilsonator deleted the revert-8870-revert-8865-zlib_importc branch January 5, 2024 22:15
@ibuclaw
Copy link
Member

ibuclaw commented Feb 13, 2024

This PR caused a regression https://issues.dlang.org/show_bug.cgi?id=24389

jmdavis added a commit to jmdavis/phobos that referenced this pull request Feb 23, 2024
zlib can't be built with importC on FreeBSD 14, because qsort_r in
stdlib.h uses some asm instructions, which dmd can't handle.

dlang#8873 fixed it so that we got a
proper error message about it (and theoretically making it so that zlib
could be compiled on FreeBSD 14 with gdc or ldc, though I haven't tried
that), but it didn't fix it so that it could build on dmd, since that
would require that dmd be able to handle GNU assembly code, which isn't
a planned feature AFAIK.

dlang#8914 fixed it so that it's possible
to build Phobos without using importC by providing a make variable, but
it didn't do anything for FreeBSD specifically.

This commit changes it so that FreeBSD sets that make variable in the
makefile so that you don't have to do it manually to get FreeBSD 14 to
build. It's not necessary for FreeBSD 13.2 (which is what the auto
testers currently use), but it will be necessary for FreeBSD 14 (14.0
currently being the latest release of FreeBSD).

I can confirm from testing that explicitly setting USE_IMPORTC=1 on the
command line will overrides this change, so that variable can still be
set one way or the other on FreeBSD. It's just now 0 by default so that
it will build by default on FreeBSD 14.
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