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

CVC4: Add patches to ease building on AArch64 #54

Merged
merged 1 commit into from
Nov 12, 2024
Merged

Conversation

RyanGlScott
Copy link
Contributor

This adds three patches from #50, which will make it easier to build CVC4 on AArch64 (and especially AArch64 Linux) in the future:

  • cvc4-antlr-update-config-guess.patch: This updates the very old config.guess script that ANTLR uses (dating back to 2009) to a more recent one that is aware of AArch64 Linux and Darwin. Doing so fixes a spurious warning about building for 32-bit on AArch64 Darwin (thereby fixing Suspicious warning when building CVC4 on macos-14 #53) and unbreaks the AArch64 Linux build when combined with the next patch...

  • cvc4-antlr-check-aarch64.patch: By default, ANTLR's configure script will pass x86-specific flags such as -m64, which aren't supported by gcc on other architectures (e.g., AArch64). We can prevent this by passing --disable-abiflags to configure on these architectures.

  • cvc4-antlr-pointer-to-integer-cast.patch: Fix an implicit pointer-to-integer cast that causes x86-64 gcc to warn, but causes AArch64 gcc to fail with a full-blown error.

This adds the patches from #50, which will make it easier to build CVC4 on
AArch64 (and especially AArch64 Linux) in the future:

* `cvc4-antlr-check-aarch64.patch` This updates the very old
  `config.guess` and `config.sub` scripts that ANTLR uses (dating back to 2009)
  to more recent ones that are aware of AArch64 Linux and Darwin. Doing so
  fixes a spurious warning about building for 32-bit on AArch64 Darwin (thereby
  fixing #53) and unbreaks the AArch64 Linux build.

  Also, ANTLR's `configure` script will pass x86-specific flags such as `-m64`
  by default, which aren't supported by `gcc` on other architectures (e.g.,
  AArch64). We can prevent this by passing `--disable-abiflags` to `configure`
  on these architectures.

* `cvc4-antlr-pointer-to-integer-cast.patch`: Fix an implicit
  pointer-to-integer cast that causes x86-64 `gcc` to warn, but causes AArch64
  `gcc` to fail with a full-blown error.
@RyanGlScott RyanGlScott force-pushed the aarch64-patches branch 2 times, most recently from 2b227e3 to 7df8cbd Compare November 12, 2024 13:15
@RyanGlScott RyanGlScott marked this pull request as ready for review November 12, 2024 13:15
Copy link

@mccleeary-galois mccleeary-galois left a comment

Choose a reason for hiding this comment

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

LGTM, we should consider if this is what makes us sunset CVC4...

Copy link

@sauclovian-g sauclovian-g left a comment

Choose a reason for hiding this comment

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

LGTM

@RyanGlScott RyanGlScott merged commit 0401feb into main Nov 12, 2024
46 checks passed
@RyanGlScott RyanGlScott deleted the aarch64-patches branch November 12, 2024 18:49
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.

3 participants