command line: Support "mescc --print-libgcc-file-name".

* module/mescc.scm (parse-opts): Add "--print-libgcc-file-name".
This commit is contained in:
Danny Milosavljevic 2020-08-29 23:24:31 +02:00 committed by Jan (janneke) Nieuwenhuizen
parent 237dd8a0f0
commit 443f662361
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273

View file

@ -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: <http://gnu.org/gethelp/>
(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: <http://gnu.org/gethelp/>
(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))