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

Fix alignment detection for long integers on 32-bits platforms #8532

Merged
merged 1 commit into from Mar 21, 2019

Conversation

Projects
None yet
2 participants
@shindere
Copy link
Contributor

commented Mar 20, 2019

This should fix Issue #7938.

@xavierleroy
Copy link
Contributor

left a comment

Looks good to me. One suggested clarification below, which should not make any difference on the usual architectures. Feel free to use or not.

)
[AS_CASE([$target_cpu],
[i686], [],
[AS_IF([test x"$ac_cv_alignof_double" = "x8" ],

This comment has been minimized.

Copy link
@xavierleroy

xavierleroy Mar 21, 2019

Contributor

Technically, you want to define ARCH_ALIGN_DOUBLE if the alignment of type double is greater than one word, namely 4 in the case of a 32-bit platform. Imagine a weird platform where double must be 16-aligned... To deal with this unlikely case, you may want to write

test "$ac_cv_alignof_double" -gt 4
[i686], [],
[AS_IF([test x"$ac_cv_alignof_double" = "x8" ],
[AC_DEFINE([ARCH_ALIGN_DOUBLE], [1])])
AS_IF([test x"$ac_cv_alignof_long" = "x8" ],

This comment has been minimized.

Copy link
@xavierleroy

xavierleroy Mar 21, 2019

Contributor

Likewise, you may want to write

test "$ac_cv_alignof_long" -gt 4
@shindere

This comment has been minimized.

Copy link
Contributor Author

commented Mar 21, 2019

@shindere shindere force-pushed the shindere:fix-alignment branch from 0c64146 to 25dae30 Mar 21, 2019

@shindere shindere merged commit 6db4ead into ocaml:trunk Mar 21, 2019

0 of 2 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details

shindere added a commit that referenced this pull request Mar 21, 2019

@shindere

This comment has been minimized.

Copy link
Contributor Author

commented Mar 21, 2019

@shindere shindere deleted the shindere:fix-alignment branch May 16, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.