-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CVC4: Add patches to ease building on AArch64
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.
- Loading branch information
1 parent
982ebbb
commit 7df8cbd
Showing
3 changed files
with
67 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
diff --git a/src/parser/antlr_line_buffered_input.cpp b/src/parser/antlr_line_buffered_input.cpp | ||
index cdf553880..ba0214dd4 100644 | ||
--- a/src/parser/antlr_line_buffered_input.cpp | ||
+++ b/src/parser/antlr_line_buffered_input.cpp | ||
@@ -31,6 +31,7 @@ | ||
#include "parser/antlr_line_buffered_input.h" | ||
|
||
#include <antlr3.h> | ||
+#include <stdint.h> | ||
#include <iostream> | ||
#include <string> | ||
#include <cassert> | ||
@@ -288,7 +289,7 @@ static void bufferedInputSeek(pANTLR3_INT_STREAM is, ANTLR3_MARKER seekPoint) { | ||
->line_buffer->isPtrBefore( | ||
(uint8_t*)seekPoint, input->line, input->charPositionInLine)); | ||
|
||
- while ((ANTLR3_MARKER)(input->nextChar) != seekPoint) { | ||
+ while ((ANTLR3_MARKER)((intptr_t)input->nextChar) != seekPoint) { | ||
is->consume(is); | ||
} | ||
} | ||
|