~mcf/cproc

feat: Add the "-dumpmachine" flag to driver v1 PROPOSED

John Nunley: 1
 feat: Add the "-dumpmachine" flag to driver

 1 files changed, 4 insertions(+), 0 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~mcf/cproc/patches/57521/mbox | git am -3
Learn more about email & git

[PATCH] feat: Add the "-dumpmachine" flag to driver Export this patch

Some ./configure files (including the one used by cproc) depends on the
"-dumpmachine" flag existing. This commit adds this flag to the cproc
driver. It just prints the "target" variable and exits.

Signed-off-by: John Nunley <dev@notgull.net>
---
 driver.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/driver.c b/driver.c
index 2ead711..94b7f5c 100644
--- a/driver.c
+++ b/driver.c
@@ -448,6 +448,10 @@ main(int argc, char *argv[])
		} else if (strcmp(arg, "-pthread") == 0) {
			arrayaddptr(&stages[LINK].cmd, "-l");
			arrayaddptr(&stages[LINK].cmd, "pthread");
		} else if (strcmp(arg, "-dumpmachine") == 0) {
			/* print target and exit */
			printf("%s\n", target);
			return 0;
		} else {
			if (arg[2] != '\0' && strchr("cESsv", arg[1]))
				usage(NULL);
-- 
2.34.1