* doc/sdccman.lyx, src/SDCCmain.c, src/SDCCglobal.h, src/ds390/gen.c,
[fw/sdcc] / src / SDCCmain.c
index 62d11db7e94d450daaf18f63b635e5e2a2a77077..e1cac49bf90239a2e66b0de85ded5db35eb8e738 100644 (file)
@@ -135,7 +135,7 @@ char buffer[PATH_MAX * 2];
 #define OPTION_PACK_IRAM        "--pack-iram"
 #define OPTION_NO_PACK_IRAM     "--no-pack-iram"
 #define OPTION_NO_PEEP_COMMENTS "--no-peep-comments"
-#define OPTION_NO_GEN_COMMENTS  "--no-gen-comments"
+#define OPTION_VERBOSE_ASM      "--fverbose-asm"
 #define OPTION_OPT_CODE_SPEED   "--opt-code-speed"
 #define OPTION_OPT_CODE_SIZE    "--opt-code-size"
 #define OPTION_STD_C89          "--std-c89"
@@ -220,7 +220,7 @@ optionsTable[] = {
     { 0,    OPTION_NO_XINIT_OPT,    &options.noXinitOpt, "don't memcpy initialized xram from code"},
     { 0,    OPTION_NO_CCODE_IN_ASM, &options.noCcodeInAsm, "don't include c-code as comments in the asm file"},
     { 0,    OPTION_NO_PEEP_COMMENTS, &options.noPeepComments, "don't include peephole optimizer comments"},
-    { 0,    OPTION_NO_GEN_COMMENTS, &options.noGenComments, "don't include code generator comments"},
+    { 0,    OPTION_VERBOSE_ASM,   &options.verboseAsm, "don't include code generator comments"},
 #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
@@ -1405,7 +1405,7 @@ parseCmdLine (int argc, char **argv)
         {
           struct dbuf_s path;
 
-                 if (*dstPath != '\0')
+          if (*dstPath != '\0')
             {
               dbuf_init(&path, 128);
               dbuf_makePath (&path, dstPath, moduleNameBase);
@@ -1422,6 +1422,14 @@ parseCmdLine (int argc, char **argv)
 
           dbuf_init(&file, 128);
 
+          /* get rid of the "."-extension */
+          dbuf_splitFile (s, &file, NULL);
+
+          dbuf_c_str (&file);
+          s = dbuf_detach (&file);
+
+          dbuf_init (&file, 128);
+
           dbuf_splitPath (s, NULL, &file);
 
           if (*dstPath != '\0')
@@ -1488,8 +1496,9 @@ linkEdit (char **envp)
   char linkerScriptFileName[PATH_MAX];
 
   linkerScriptFileName[0] = 0;
+  c = NULL;
 
-  if(port->linker.needLinkerScript)
+  if (port->linker.needLinkerScript)
     {
       char out_fmt;
 
@@ -1509,7 +1518,7 @@ linkEdit (char **envp)
         }
 
       /* first we need to create the <filename>.lnk file */
-      SNPRINTF (linkerScriptFileName, sizeof(scratchFileName),
+      SNPRINTF (linkerScriptFileName, sizeof(linkerScriptFileName),
         "%s.lnk", dstFileName);
       if (!(lnkfile = fopen (linkerScriptFileName, "w")))
         {
@@ -2026,7 +2035,7 @@ preProcess (char **envp)
 
       /* if using dollar signs in identifiers */
       if (options.dollars_in_ident)
-        addSet(&preArgvSet, Safe_strdup("--fdollars-in-identifiers"));
+        addSet(&preArgvSet, Safe_strdup("-fdollars-in-identifiers"));
 
       /* if using external stack define the macro */
       if (options.useXstack)
@@ -2084,8 +2093,8 @@ preProcess (char **envp)
 
       if (port && port->processor && TARGET_IS_PIC) {
         char proc[512];
-       SNPRINTF(&proc[0], 512, "-DSDCC_PROCESSOR=\"%s\"", port->processor);
-       addSet(&preArgvSet, Safe_strdup(proc));
+        SNPRINTF(&proc[0], 512, "-DSDCC_PROCESSOR=\"%s\"", port->processor);
+        addSet(&preArgvSet, Safe_strdup(proc));
       }
 
       /* standard include path */