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

Avoid __builtin_ctzll on some platforms #604

Merged
merged 1 commit into from
Aug 3, 2023

Conversation

clyring
Copy link
Member

@clyring clyring commented Aug 3, 2023

Fixes #601.

I haven't worked out how to reproduce the problem (outside of GHC's CI), but that doesn't seem critical. (And this patch does fix the problem there.)

@Bodigrim Bodigrim merged commit 514f7d9 into haskell:master Aug 3, 2023
24 checks passed
clyring added a commit that referenced this pull request Aug 4, 2023
@@ -50,6 +50,7 @@ SUCH DAMAGE.
#endif

#include <MachDeps.h>
#include "Rts.h"
Copy link

@juhp juhp Aug 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to break x86_64 on Fedora for me... booting 9.4.6 with either 9.2.8 or 9.4.5:

In file included from /usr/lib64/ghc-9.4.5/lib/x86_64-linux-ghc-9.4.5/rts-1.0.2/include/Rts.h:235,
                 from libraries/bytestring/cbits/is-valid-utf8.c:53:0: error:
    
/usr/lib64/ghc-9.4.5/lib/x86_64-linux-ghc-9.4.5/rts-1.0.2/include/rts/OSThreads.h:38:5: error:
     error: unknown type name ‘clockid_t’
       38 |     clockid_t timeout_clk;
          |     ^~~~~~~~~
   |
38 |     clockid_t timeout_clk;
   |     ^

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks to me like that #include should be conditional somehow.

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.

Use of __builtin_ctzll can cause runtime linker issues
3 participants