From: borutr Date: Fri, 29 Jun 2007 17:23:09 +0000 (+0000) Subject: * src/SDCCmain.c: fixed bug #1744746: SDCC #4867: broken option --xram-size X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=11f029a039dd3f91dd9c106d8a738fcb794769a6;p=fw%2Fsdcc * src/SDCCmain.c: fixed bug #1744746: SDCC #4867: broken option --xram-size git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4871 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/ChangeLog b/ChangeLog index 2c1367ac..fbead692 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-06-29 Borut Razem + + * src/SDCCmain.c: fixed bug + #1744746: SDCC #4867: broken option --xram-size + 2007-06-28 Borut Razem * sim/ucsim/configure.in, sim/ucsim/configure, sim/ucsim/ddconfig_in.h: diff --git a/src/SDCCmain.c b/src/SDCCmain.c index ee6cd530..2fec363d 100644 --- a/src/SDCCmain.c +++ b/src/SDCCmain.c @@ -235,7 +235,7 @@ optionsTable[] = { { 0, OPTION_OUT_FMT_IHX, NULL, "Output in Intel hex format" }, { 0, OPTION_OUT_FMT_S19, NULL, "Output in S19 hex format" }, { 0, OPTION_XRAM_LOC, &options.xdata_loc, " External Ram start location", CLAT_INTEGER }, - { 0, OPTION_XRAM_SIZE, &options.xram_size, " External Ram size", CLAT_INTEGER }, + { 0, OPTION_XRAM_SIZE, NULL, " External Ram size" }, { 0, OPTION_IRAM_SIZE, &options.iram_size, " Internal Ram size", CLAT_INTEGER }, { 0, OPTION_XSTACK_LOC, &options.xstack_loc, " External Stack start location", CLAT_INTEGER }, { 0, OPTION_CODE_LOC, &options.code_loc, " Code Segment Location", CLAT_INTEGER }, @@ -988,7 +988,14 @@ parseCmdLine (int argc, char **argv) continue; } - if (strcmp (argv[i], OPTION_NO_GCSE) == 0) + if (strcmp (argv[i], OPTION_XRAM_SIZE) == 0) + { + options.xram_size = getIntArg(OPTION_XRAM_SIZE, argv, &i, argc); + options.xram_size_set = TRUE; + continue; + } + + if (strcmp (argv[i], OPTION_NO_GCSE) == 0) { optimize.global_cse = 0; continue; @@ -2284,7 +2291,7 @@ main (int argc, char **argv, char **envp) /* turn all optimizations off by default */ memset (&optimize, 0, sizeof (struct optimize)); - if (NUM_PORTS==0) + if (NUM_PORTS == 0) { fprintf (stderr, "Build error: no ports are enabled.\n"); exit (EXIT_FAILURE); @@ -2296,7 +2303,7 @@ main (int argc, char **argv, char **envp) { signal (SIGABRT, sig_handler); signal (SIGTERM, sig_handler); - signal (SIGINT , sig_handler); + signal (SIGINT, sig_handler); signal (SIGSEGV, sig_handler); }