From: jesusc Date: Sun, 13 Jul 2003 19:31:19 +0000 (+0000) Subject: added option --no-std-crt0 for the z80 and gbz80 ports X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=a67118bcb326c4a7e7361e494016e7d1af10157c;p=fw%2Fsdcc added option --no-std-crt0 for the z80 and gbz80 ports git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2732 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/ChangeLog b/ChangeLog index 9679048b..99666497 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2003-07-13 Jesus Calvino-Fraga + + * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0 + 2003-07-12 Jesus Calvino-Fraga * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp: diff --git a/doc/sdccman.lyx b/doc/sdccman.lyx index 09123715..724d824d 100644 --- a/doc/sdccman.lyx +++ b/doc/sdccman.lyx @@ -5198,6 +5198,73 @@ status Collapsed ). \layout Subsubsection +Z80 Options +\begin_inset LatexCommand \index{Options Z80} + +\end_inset + + +\begin_inset LatexCommand \index{Z80 options} + +\end_inset + + +\layout List +\labelwidthstring 00.00.0000 + + +\series bold +- +\begin_inset ERT +status Collapsed + +\layout Standard + +\backslash +/ +\end_inset + +-callee-saves-bc +\series default + +\begin_inset LatexCommand \index{-\/-callee-saves-bc} + +\end_inset + + +\size large +\emph on + +\size default +\emph default +Force a called function to always save BC. +\layout List +\labelwidthstring 00.00.0000 + + +\series bold +- +\begin_inset ERT +status Collapsed + +\layout Standard + +\backslash +/ +\end_inset + +-no-std-crt0 +\series default + +\begin_inset LatexCommand \index{-\/-no-std-crt0} + +\end_inset + + When linking, skip the standard crt0.o object file. + You must provide your own crt0.o for your system when linking. + +\layout Subsubsection + Optimization Options \begin_inset LatexCommand \index{Options optimization} diff --git a/src/SDCCglobl.h b/src/SDCCglobl.h index 711aa74d..6262f815 100644 --- a/src/SDCCglobl.h +++ b/src/SDCCglobl.h @@ -244,6 +244,7 @@ struct options int printSearchDirs; /* display the directories in the compiler's search path */ int vc_err_style; /* errors and warnings are compatible with Micro$oft visual studio */ int use_stdout; /* send errors to stdout instead of stderr */ + int no_std_crt0; /*For the z80/gbz80 do not link default crt0.o*/ /* sets */ set *calleeSavesSet; /* list of functions using callee save */ set *excludeRegsSet; /* registers excluded from saving */ diff --git a/src/SDCCmain.c b/src/SDCCmain.c index 84310c15..9368e9fe 100644 --- a/src/SDCCmain.c +++ b/src/SDCCmain.c @@ -182,7 +182,7 @@ optionsTable[] = { { 0, OPTION_PEEP_FILE, NULL, " use this extra peep-hole file" }, { 0, OPTION_LIB_PATH, NULL, " use this path to search for libraries" }, { 0, "--int-long-reent", &options.intlong_rent, "Use reenterant calls on the int and long support functions" }, - { 0, "--float-reent", &options.float_rent, "Use reenterant calls on the floar support functions" }, + { 0, "--float-reent", &options.float_rent, "Use reenterant calls on the float support functions" }, { 0, OPTION_OUT_FMT_IHX, NULL, NULL }, { 0, "--out-fmt-s19", &options.out_fmt, NULL }, { 0, "--cyclomatic", &options.cyclomatic, NULL }, @@ -225,6 +225,9 @@ optionsTable[] = { { 0, OPTION_PRINT_SEARCH_DIRS, &options.printSearchDirs, "display the directories in the compiler's search path"}, { 0, OPTION_MSVC_ERROR_STYLE, &options.vc_err_style, "messages are compatible with Micro$oft visual studio"}, { 0, OPTION_USE_STDOUT, &options.use_stdout, "send errors to stdout instead of stderr"}, +#if !OPT_DISABLE_Z80 || !OPT_DISABLE_GBZ80 + { 0, "--no-std-crt0", &options.no_std_crt0, "For the z80/gbz80 do not link default crt0.o"}, +#endif /* End of options */ #if 0 /* 10jun03 !OPT_DISABLE_PIC16 */ { 0, "--no-movff", &options.no_movff, "disable generating MOVFF opcode in PIC16 port"}, @@ -1481,7 +1484,7 @@ linkEdit (char **envp) /*For the z80 and gbz80 ports, try to find where crt0.o is... It is very important for this file to be first on the linking proccess so the areas are set in the correct order, expecially _GSINIT*/ - if (TARGET_IS_Z80 || TARGET_IS_GBZ80) /*For the z80, gbz80*/ + if ((TARGET_IS_Z80 || TARGET_IS_GBZ80) && !options.no_std_crt0) /*For the z80, gbz80*/ { char crt0path[PATH_MAX]; FILE * crt0fp;