From 7e8cd544b675885368c6d15f68aac2ea4af3bae6 Mon Sep 17 00:00:00 2001 From: Roberto Rosmaninho Date: Mon, 11 Sep 2023 14:15:33 -0300 Subject: [PATCH 1/2] Replacing date/gdate with perl program to improve compatibility across unix systems --- bin/utils.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/bin/utils.sh b/bin/utils.sh index 24a496de6..cb73b236e 100644 --- a/bin/utils.sh +++ b/bin/utils.sh @@ -5,14 +5,9 @@ export DEPTH=0 verbose=${verbose:-false} profile=${profile:-false} -if [[ "$OSTYPE" == "darwin"* ]]; then - DATE_CMD="gdate" -else - DATE_CMD="date" -fi time_now_ms () { - "$DATE_CMD" "+%s%3N" + perl -MTime::HiRes=time -e 'printf "%d\n", time*1000' } indented () { From 23e289c8d1b09a72aad4a246c4598bcca9abbcae Mon Sep 17 00:00:00 2001 From: Roberto Rosmaninho Date: Tue, 12 Sep 2023 10:04:39 -0300 Subject: [PATCH 2/2] Deleting `gdate` replacement in nix file --- nix/llvm-backend.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/nix/llvm-backend.nix b/nix/llvm-backend.nix index 9c8fb1141..233c9d346 100644 --- a/nix/llvm-backend.nix +++ b/nix/llvm-backend.nix @@ -28,9 +28,6 @@ stdenv.mkDerivation { --replace 'extra_python_flags=()' \ 'extra_python_flags=($(${python-env}/bin/pybind11-config --includes))' - substituteInPlace bin/utils.sh \ - --replace 'gdate' 'date' - substituteInPlace bin/llvm-kompile-clang \ --replace 'uname' '${coreutils}/bin/uname' \ --replace '"-lgmp"' '"-I${gmp.dev}/include" "-L${gmp}/lib" "-lgmp"' \