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

Magic.hs: Fix for machines without MEM_UNALIGNED_OPS and base >= 4.17 #307

Merged
merged 1 commit into from
May 18, 2023

Conversation

kubek2k
Copy link
Contributor

@kubek2k kubek2k commented Feb 8, 2023

No description provided.

@kubek2k kubek2k changed the title Fix for machines with 64bit word and base >= 4.17 Magic.hs: Fix for machines with 64bit word and base >= 4.17 Feb 8, 2023
@centromere
Copy link

@parsonsmatt Would you be willing to review and merge this if appropriate?

@parsonsmatt
Copy link
Contributor

I'm not a maintainer for this package

@kubek2k
Copy link
Contributor Author

kubek2k commented Mar 2, 2023

Looks like it's rather @bgamari - could you have a look?

@brprice
Copy link

brprice commented Mar 16, 2023

FTR, my understanding is that this is only necessary for arches without MEM_UNALIGNED_OPS, i.e. anything other than i386 and x86_64 (and potentially for ghc<7.10) (in particular, aarch64/apple silicon). In particular, for x86_64, cborg-0.2.8.0 builds fine with ghc-9.4.3 -- I believe the cpp means that the definition on Magic.hs:171 is in effect. But it does fail to build on aarch64-darwin.

Perhaps to avoid confusion in the future the PR title and commit message could be updated to reflect this?

@kubek2k kubek2k changed the title Magic.hs: Fix for machines with 64bit word and base >= 4.17 Magic.hs: Fix for machines without MEM_UNALIGNED_OPS and base >= 4.17 Mar 16, 2023
@gelisam
Copy link

gelisam commented Apr 14, 2023

I independently came up with a mostly-identical patch, so I also think that this is the correct fix.

@Bodigrim
Copy link
Contributor

@FinleyMcIlwaine could this please be merged? Otherwise cborg does not work on M1 machines.

@unorsk
Copy link

unorsk commented May 18, 2023

Having this problem on M2 too.

@nicolashery
Copy link

We also had this problem building on Apple Silicon. Confirm that this PR fixed it. Looking forward to seeing it merged!

@bgamari bgamari merged commit 3a0f1f4 into well-typed:master May 18, 2023
brprice added a commit to hackworthltd/primer that referenced this pull request Jun 19, 2023
Now that cborg (which is a dependency of weeder) works again for aarch64
(well-typed/cborg#307), we can reenable this
check.

We also remove one weed which has grown in the period when weeder was
disabled.
brprice added a commit to hackworthltd/primer that referenced this pull request Jun 19, 2023
Now that cborg (which is a dependency of weeder) works again for aarch64
(well-typed/cborg#307), we can reenable this
check.

We also remove one weed which has grown in the period when weeder was
disabled.

Signed-off-by: Ben Price <ben@hackworthltd.com>
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.

9 participants