ports/lang/iverilog/patches/patch-driver_main_c

23 lines
919 B
Text

Don't exit when ivl_root not found - the user may have supplied it.
When running 'make check' without having an installed copy, find_ivl_root()
will fail on Unix systems that don't provide /proc/self/exe (e.g. MacOS).
https://github.com/steveicarus/iverilog/commit/56d2d798ecd97c09539e7748997013eddd37ab42
Index: driver/main.c
--- driver/main.c.orig
+++ driver/main.c
@@ -1061,7 +1061,11 @@ static void find_ivl_root(void)
find_ivl_root_failed("command path exceeds size of string buffer.");
}
if (len <= 0) {
- find_ivl_root_failed("couldn't get command path from OS.");
+ // We've failed, but we may yet find a -B option on the command line.
+ // Use the built-in path so the user sees a sensible error message.
+ assert(strlen(IVL_ROOT) < sizeof ivl_root);
+ strcpy(ivl_root, IVL_ROOT);
+ return;
}
s = strrchr(ivl_root, sep);
if (s == 0) {