This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Fix GNU/Hurd build
ClosedPublic

Authored by sthibaul on Aug 23 2023, 12:32 AM.

Details

Reviewers
ldionne
phosek
Mordante
Group Reviewers
Restricted Project
Commits
rG1cfcc36812ff: [libc++] Fix GNU/Hurd build
Summary

GNU/Hurd does have clock_gettime, it just doesn't define _POSIX_TIMERS because its support for timers is not complete.

Diff Detail

Event Timeline

sthibaul created this revision.Aug 23 2023, 12:32 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 23 2023, 12:32 AM
Herald added a subscriber: krytarowski. · View Herald Transcript
sthibaul requested review of this revision.Aug 23 2023, 12:32 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 23 2023, 12:32 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript

No real objections, but I like to use a better macro if possible.

Another question in general libc++ likes to have a pre-commit CI (https://buildkite.com/llvm-project) for all platforms we support. Would it be possible to provide a CI runner for GNU/Hurd?

libcxx/src/chrono.cpp
34

Based on https://github.com/cpredef/predef/blob/master/OperatingSystems.md this macro works too. When that information is correct I prefer this macro; it easier to understand this is for the GNU/Hurd platform and it's not a typo of __GNUC__.

Having the full name makes it easier to understand which OS this is. I know it from the context of the patch. but __GNU__ does not ring a bell for me, and I know GNU/Hurd is an OS.

sthibaul updated this revision to Diff 552898.Aug 23 2023, 2:58 PM

Use gnu_hurd instead of GNU

sthibaul marked an inline comment as done.Aug 23 2023, 3:02 PM

Another question in general libc++ likes to have a pre-commit CI (https://buildkite.com/llvm-project) for all platforms we support. Would it be possible to provide a CI runner for GNU/Hurd?

If we can, sure. What technology is used for that? Is that buildbot https://lab.llvm.org/buildbot/#/builders ? How much load would that give?

libcxx/src/chrono.cpp
34

Right, why not.

Another question in general libc++ likes to have a pre-commit CI (https://buildkite.com/llvm-project) for all platforms we support. Would it be possible to provide a CI runner for GNU/Hurd?

If we can, sure. What technology is used for that? Is that buildbot https://lab.llvm.org/buildbot/#/builders ? How much load would that give?

At the moment we use Buildkite @ldionne can give you a BuildKite Agent token. The advantage is we can officially support GNU/Hurd. In general we prefer to validate patches in the CI, especially when larger changes are needed.

Mordante accepted this revision.Aug 25 2023, 9:37 AM

LGTM, thanks!

This revision is now accepted and ready to land.Aug 25 2023, 9:37 AM
sthibaul marked an inline comment as done.Aug 25 2023, 9:50 AM

(I don't have commit access)

At the moment we use Buildkite

Is this free software? The installation instructions are not talking about source code, only pre-built binaries, which are of course not available for GNU/Hurd.

(I don't have commit access)

Can you provide your name and e-mail address, then I'll commit it on your behalf.

At the moment we use Buildkite

Is this free software? The installation instructions are not talking about source code, only pre-built binaries, which are of course not available for GNU/Hurd.

Good question. I'm not sure. In the future we plan to move to github actions, maybe that's easier to use on GNU/Hurd.

Can you provide your name and e-mail address, then I'll commit it on your behalf

Samuel Thibault <samuel.thibault@ens-lyon.org>

Thanks!

This revision was automatically updated to reflect the committed changes.

Could you also backport this to the 17 branch? Thanks

Could you also backport this to the 17 branch? Thanks

I've prepared a PR for the release manager https://github.com/llvm/llvm-project-release-prs/pull/650