Parcourir la source

tigcc *nix: when creating the decompressor, add "-n" option to the ld-tigcc invocation.
Without this fix, the launcher of the "Custom DLL Test" example is named "custom", whereas the Project Name line of the TPR requires (with good reason) that it be named "dlltest".

git-svn-id: file:///var/svn/tigccpp/trunk@1336 9552661e-59e3-4036-b4f2-dbe53926924f

debrouxl il y a 15 ans
Parent
commit
282828e422
2 fichiers modifiés avec 15 ajouts et 3 suppressions
  1. 12 1
      tigcc-linux/sources/tigcc/src/tigcc.c
  2. 3 2
      tigcc-linux/sources/tigcc/src/tigcc.h

+ 12 - 1
tigcc-linux/sources/tigcc/src/tigcc.c

@@ -251,6 +251,7 @@ short int process_arg(short int arg, char *argv[], int argc)
     if (++arg > argc) {
       fprintf(stderr, "Error: you didn't specify a variable name\n");
     } else {
+      oncalcname = argv[arg];
       ld_argv[ld_argc++] = cur_arg;
       ld_argv[ld_argc++] = argv[arg];
     }
@@ -925,7 +926,17 @@ void pack(void)
   // create decompressor (.??z)
   {
     char ld_tigcc_name[strlen(tigcc_base) + 14];
-    char *argv[] = {ld_tigcc_name, "pstarter.o", "-o", tmpfile, NULL};
+    char *argv[7];
+    int i = 1;
+    *argv = ld_tigcc_name;
+    argv[i++] = "pstarter.o";
+    argv[i++] = "-o";
+    argv[i++] = tmpfile;
+    if (oncalcname) {
+      argv[i++] = "-n";
+      argv[i++] = oncalcname;
+    }
+    argv[i] = NULL;
 
     sprintf (ld_tigcc_name, "%s/bin/ld-tigcc", tigcc_base);
     change_extension(tmpfile, "");

+ 3 - 2
tigcc-linux/sources/tigcc/src/tigcc.h

@@ -23,8 +23,8 @@
 #ifndef _TIGCC_H
 #define _TIGCC_H
 
-#define VERSION "1.3.2"
-#define TIGCC_VERSION "0.96 Beta 9 r1"
+#define VERSION "1.3.3"
+#define TIGCC_VERSION "0.96 Beta 10 r1"
 
 /* global enumerations */
 enum Boolean 	{FALSE,TRUE};
@@ -75,6 +75,7 @@ const char *tigcc_args[] =
 
 /* global vars */
 char *outfile = NULL;
+char *oncalcname = NULL;
 char packfile[9];
 char *tigcc_base = NULL;