From 1444c67010600cfa98af36c4320e124c4e8c991f Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Wed, 29 May 2019 00:04:47 +0200 Subject: [PATCH] mescc: Fix -dumpmachine to respect -m bits selection. * module/mescc.scm (parse-opts): Fix -dumpmachine to respect -m bits selection. Also display kernel. --- module/mescc.scm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/module/mescc.scm b/module/mescc.scm index 6a4bd695..c7e533a2 100644 --- a/module/mescc.scm +++ b/module/mescc.scm @@ -79,11 +79,13 @@ (language (single-char #\x) (value #t)))) (options (getopt-long args option-spec)) (help? (option-ref options 'help #f)) + (machine (option-ref options 'machine "32")) (files (option-ref options '() '())) (usage? (and (not help?) (null? files))) (version? (option-ref options 'version #f))) (cond ((option-ref options 'dumpmachine #f) - (display "x86-mes") + (cond ((equal? machine "32") (display "x86-linux-mes\n")) + (else (display "x86_64-linux-mes\n"))) (exit 0)) (version? (format #t "mescc (GNU Mes) ~a\n" %version) (exit 0)) (else @@ -91,7 +93,7 @@ (format (or (and usage? (current-error-port)) (current-output-port)) "\ Usage: mescc [OPTION]... FILE... --align align globals - -dumpmachine display the compiler's target processor + -dumpmachine display the compiler's target machine --base-address=ADRRESS use BaseAddress ADDRESS [0x1000000] -D DEFINE[=VALUE] define DEFINE [VALUE=1]