From 721b409f7dc576461ca5d34f7cd079ef30f85ab9 Mon Sep 17 00:00:00 2001 From: sandeep Date: Mon, 24 Dec 2001 03:42:03 +0000 Subject: [PATCH] added option --tini-libid added port->do_assemble function (-mTININative) has a multi command assemble git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1729 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/SDCCmain.c | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/src/SDCCmain.c b/src/SDCCmain.c index e5403843..0f746291 100644 --- a/src/SDCCmain.c +++ b/src/SDCCmain.c @@ -113,6 +113,7 @@ char DefaultExePath[128]; #define OPTION_LESS_PEDANTIC "--lesspedantic" #define OPTION_NO_GCSE "--nogcse" #define OPTION_SHORT_IS_8BITS "--short-is-8bits" +#define OPTION_TINI_LIBID "--tini-libid" /** Table of all options supported by all ports. This table provides: @@ -208,7 +209,8 @@ optionsTable[] = { { 0, "--fommit-frame-pointer", &options.ommitFramePtr, "Leave out the frame pointer." }, { 0, "--all-callee-saves", &options.all_callee_saves, "callee will always save registers used" }, { 0, "--use-accelerator", &options.useAccelerator,"generate code for DS390 Arithmetic Accelerator"}, - { 0, "--stack-probe", &options.stack_probe,"insert call to function __stack_probe at each function prologue"} + { 0, "--stack-probe", &options.stack_probe,"insert call to function __stack_probe at each function prologue"}, + { 0, "--tini-libid", NULL," LibraryID used in -mTININative"} }; /** Table of all unsupported options and help text to display when one @@ -898,6 +900,12 @@ parseCmdLine (int argc, char **argv) options.shortis8bits=1; continue; } + + if (strcmp (argv[i], OPTION_TINI_LIBID) == 0) + { + options.tini_libid = getIntArg(OPTION_TINI_LIBID, argv, &i, argc); + continue; + } if (!port->parseOption (&argc, argv, &i)) { @@ -1203,23 +1211,22 @@ linkEdit (char **envp) static void assemble (char **envp) { - if (port->assembler.cmd) - { - buildCmdLine (buffer, port->assembler.cmd, srcFileName, NULL, - options.debug ? port->assembler.debug_opts : port->assembler.plain_opts, - asmOptions); - } - else - { - buildCmdLine2 (buffer, port->assembler.mcmd); + if (port->assembler.do_assemble) { + port->assembler.do_assemble(asmOptions); + return ; + } else if (port->assembler.cmd) { + buildCmdLine (buffer, port->assembler.cmd, srcFileName, NULL, + options.debug ? port->assembler.debug_opts : port->assembler.plain_opts, + asmOptions); + } else { + buildCmdLine2 (buffer, port->assembler.mcmd); } - if (my_system (buffer)) - { - /* either system() or the assembler itself has reported an error - perror ("Cannot exec assembler"); - */ - exit (1); + if (my_system (buffer)) { + /* either system() or the assembler itself has reported an error + perror ("Cannot exec assembler"); + */ + exit (1); } } -- 2.39.5