-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update magic numbers for 4.14.1-22 (and add tools/bump_magic_numbers.sh)
- Loading branch information
Showing
5 changed files
with
46 additions
and
14 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
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,32 @@ | ||
#!/bin/bash | ||
|
||
set -eu -o pipefail | ||
|
||
# Needs GNU sed which is not the default on macOS | ||
sed=gsed | ||
gsed --version >/dev/null || sed=sed | ||
|
||
if [ "$(git status --porcelain --untracked-files=no)" != "" ]; then | ||
echo "There must be a clean 'git status' before running this script" | ||
exit 1 | ||
fi | ||
|
||
git clean -dfX | ||
(cd ocaml && ./configure && make -j8 coldstart && make -j8 coreall) | ||
|
||
# Unfortunately the "e" modifier appears not to work except for replacing | ||
# a whole line | ||
|
||
$sed -i \ | ||
-e 's/^#define EXEC_MAGIC "Caml1999X\([0-9][0-9][0-9]\)"/echo "#define EXEC_MAGIC \\x22Caml1999X$((\1 + 1))\\x22"/ge' \ | ||
ocaml/runtime/caml/exec.h | ||
|
||
$sed -i \ | ||
-e 's/^\(let\|and\) \([a-z][a-z_]*\) = "Caml\([0-9][0-9][0-9][0-9]\)\([a-zA-Z]\)\(5[0-9][0-9]\)"/echo "\1 \2 = \\x22Caml\3\4$((\5 + 1))\\x22"/ge' \ | ||
ocaml/utils/config.mlp | ||
|
||
$sed -i \ | ||
-e 's/^ "Caml\([0-9][0-9][0-9][0-9]\)\([a-zA-Z]\)\(5[0-9][0-9]\)"/echo " \\x22Caml\1\2$((\3 + 1))\\x22"/ge' \ | ||
ocaml/utils/config.mlp | ||
|
||
(cd ocaml && make -j8 coreall && make -j8 bootstrap) |