From 443f66236155b78bd297626d39570684f0f84f66 Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Sat, 29 Aug 2020 23:24:31 +0200 Subject: [PATCH] command line: Support "mescc --print-libgcc-file-name". * module/mescc.scm (parse-opts): Add "--print-libgcc-file-name". --- module/mescc.scm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/module/mescc.scm b/module/mescc.scm index 9772d858..2d7b5725 100644 --- a/module/mescc.scm +++ b/module/mescc.scm @@ -66,6 +66,7 @@ (define (single-char #\D) (value #t)) (debug-info (single-char #\g)) (dumpmachine) + (print-libgcc-file-name) (fno-builtin) (fno-stack-protector) (help (single-char #\h)) @@ -91,8 +92,9 @@ (help? (option-ref options 'help #f)) (files (option-ref options '() '())) (dumpmachine? (option-ref options 'dumpmachine #f)) + (print-libgcc-file-name? (option-ref options 'print-libgcc-file-name #f)) (version? (option-ref options 'version #f)) - (usage? (and (not dumpmachine?) (not help?) (not version?) (null? files)))) + (usage? (and (not dumpmachine?) (not print-libgcc-file-name?) (not help?) (not version?) (null? files)))) (cond (version? (format #t "mescc (GNU Mes) ~a\n" %version) (exit 0)) (else (and (or help? usage?) @@ -175,6 +177,7 @@ General help using GNU software: (options (acons 'numbered-arch? numbered-arch? options)) (dumpmachine? (option-ref options 'dumpmachine #f)) (preprocess? (option-ref options 'preprocess #f)) + (print-libgcc-file-name? (option-ref options 'print-libgcc-file-name #f)) (compile? (option-ref options 'compile #f)) (assemble? (option-ref options 'assemble #f)) (verbose? (count-opt options 'verbose))) @@ -183,6 +186,7 @@ General help using GNU software: (when (> verbose? 1) (format (current-error-port) "options=~s\n" options))) (cond (dumpmachine? (display (mescc:get-host options))) + (print-libgcc-file-name? (display "-lmescc\n")) (preprocess? (mescc:preprocess options)) (compile? (mescc:compile options)) (assemble? (mescc:assemble options))