buildsystem,ecc,ecp,ecs,ide; (#1055) allow cross-compile from 64 bit sdk to Android...
authorRejean Loyer <redj@ecere.com>
Sun, 9 Feb 2014 03:48:09 +0000 (22:48 -0500)
committerJerome St-Louis <jerome@ecere.com>
Mon, 10 Feb 2014 21:58:45 +0000 (04:58 +0700)
compiler/ecc/ecc.ec
compiler/ecp/ecp.ec
compiler/ecs/ecs.ec
ide/src/IDESettings.ec
ide/src/dialogs/GlobalSettingsDialog.ec
ide/src/project/Project.ec

index c855ed2..26b50a5 100644 (file)
@@ -303,6 +303,10 @@ class CompilerApp : Application
                cppOptionsLen = newLen;
                targetBits = !strcmp(arg + 1, "m32") ? 32 : 64;
             }
+            else if(!strcmp(arg + 1, "t32") || !strcmp(arg + 1, "t64"))
+            {
+               targetBits = !strcmp(arg + 1, "t32") ? 32 : 64;
+            }
             else if(arg[1] == 'D' || arg[1] == 'I')
             {
                char * buf;
index 0071bb8..1163916 100644 (file)
@@ -1344,6 +1344,10 @@ class PrecompApp : Application
                cppOptionsLen = newLen;
                targetBits = !strcmp(arg + 1, "m32") ? 32 : 64;
             }
+            else if(!strcmp(arg + 1, "t32") || !strcmp(arg + 1, "t64"))
+            {
+               targetBits = !strcmp(arg + 1, "t32") ? 32 : 64;
+            }
             else if(arg[1] == 'D' || arg[1] == 'I')
             {
                char * buf;
index 864f924..8d354c4 100644 (file)
@@ -1661,6 +1661,10 @@ class SymbolgenApp : Application
             {
                targetBits = !strcmp(arg + 1, "m32") ? 32 : 64;
             }
+            else if(!strcmp(arg + 1, "t32") || !strcmp(arg + 1, "t64"))
+            {
+               targetBits = !strcmp(arg + 1, "t32") ? 32 : 64;
+            }
             else if(!strcmp(arg+1, "o"))
             {
                if(!output && c + 1 < argc)
index 3a1ae2e..4a68ddb 100644 (file)
@@ -941,6 +941,20 @@ public:
       get { return excludeLibs; }
       isset { return excludeLibs.count != 0; }
    }
+   property Array<String> eCcompilerFlags
+   {
+      set
+      {
+         eCcompilerFlags.Free();
+         if(value)
+         {
+            delete eCcompilerFlags;
+            eCcompilerFlags = value;
+         }
+      }
+      get { return eCcompilerFlags; }
+      isset { return eCcompilerFlags.count != 0; }
+   }
    property Array<String> compilerFlags
    {
       set
@@ -978,6 +992,7 @@ private:
    Array<NamedString> environmentVars { };
    Array<String> prepDirectives { };
    Array<String> excludeLibs { };
+   Array<String> eCcompilerFlags { };
    Array<String> compilerFlags { };
    Array<String> linkerFlags { };
    char * name;
@@ -1021,6 +1036,7 @@ private:
       if(prepDirectives) { prepDirectives.Free(); }
       if(excludeLibs) { excludeLibs.Free(); }
       if(compilerFlags) { compilerFlags.Free(); }
+      if(eCcompilerFlags) { eCcompilerFlags.Free(); }
       if(linkerFlags) { linkerFlags.Free(); }
    }
    CompilerConfig Copy()
@@ -1055,6 +1071,7 @@ private:
       for(s : prepDirectives) copy.prepDirectives.Add(CopyString(s));
       for(s : excludeLibs) copy.excludeLibs.Add(CopyString(s));
       for(s : compilerFlags) copy.compilerFlags.Add(CopyString(s));
+      for(s : eCcompilerFlags) copy.eCcompilerFlags.Add(CopyString(s));
       for(s : linkerFlags) copy.linkerFlags.Add(CopyString(s));
 
       incref copy;
index a643adf..e39f2a8 100644 (file)
@@ -967,7 +967,7 @@ class CompilerOptionsTab : CompilersSubTab
    EditBox distccHosts
    {
       this, text = $"distcc hosts", hotKey = altH;
-      position = { 88, 92 }, size = { 300 };
+      position = { 88, 92 }, size = { 300, 22 };
 
       bool NotifyModified(EditBox editBox)
       {
@@ -982,11 +982,11 @@ class CompilerOptionsTab : CompilersSubTab
       }
    }
 
-   Label lblPrepDefs { this, position = { 8, 124 }, labeledWindow = prepDefs };
+   Label lblPrepDefs { this, position = { 8, 126 }, labeledWindow = prepDefs };
    StringListBox prepDefs
    {
-      this, text = $"Preprocessor directives:", hotKey = altP;
-      position = { 148, 124 }, size = { 300 };
+      this, text = $"Preprocessor directives", hotKey = altP;
+      position = { 148, 124 }, size = { 300, 22 }, anchor = { left = 148, top = 124, right = 8 };
 
       bool NotifyModified(EditBox editBox)
       {
@@ -1001,11 +1001,30 @@ class CompilerOptionsTab : CompilersSubTab
       }
    }
 
-   Label lblCompilerFlags { this, position = { 8, 152 }, labeledWindow = compilerFlags };
+   Label leCcompilerFlags { this, position = { 8, 156 }, labeledWindow = eCcompilerFlags };
+   StringListBox eCcompilerFlags
+   {
+      this, text = $"Additional eC compiler flags", hotKey = altG;
+      position = { 148, 154 }, size = { 300, 22 }, anchor = { left = 148, top = 154, right = 8 };
+
+      bool NotifyModified(EditBox editBox)
+      {
+         if(loadedCompiler)
+         {
+            CompilerConfig compiler = loadedCompiler;
+            compiler.eCcompilerFlags = ((StringListBox)editBox).strings;
+            modifiedDocument = true;
+            compilersTab.modifiedDocument = true;
+         }
+         return true;
+      }
+   }
+
+   Label lblCompilerFlags { this, position = { 8, 186 }, labeledWindow = compilerFlags };
    StringListBox compilerFlags
    {
-      this, text = $"Additional compiler flags:", hotKey = altL;
-      position = { 148, 152 }, size = { 300 };
+      this, text = $"Additional compiler flags", hotKey = altR;
+      position = { 148, 184 }, size = { 300, 22 }, anchor = { left = 148, top = 184, right = 8 };
 
       bool NotifyModified(EditBox editBox)
       {
@@ -1020,11 +1039,11 @@ class CompilerOptionsTab : CompilersSubTab
       }
    }
 
-   Label lblLinkerFlags { this, position = { 8, 180 }, labeledWindow = linkerFlags };
+   Label lblLinkerFlags { this, position = { 8, 216 }, labeledWindow = linkerFlags };
    StringListBox linkerFlags
    {
-      this, text = $"Additional linker flags:", hotKey = altL;
-      position = { 148, 180 }, size = { 300 };
+      this, text = $"Additional linker flags", hotKey = altL;
+      position = { 148, 214 }, size = { 300, 22 }, anchor = { left = 148, top = 214, right = 8 };
 
       bool NotifyModified(EditBox editBox)
       {
@@ -1039,11 +1058,11 @@ class CompilerOptionsTab : CompilersSubTab
       }
    }
 
-   Label lblExcludedLibraries { this, position = { 8, 208 }, labeledWindow = excludedLibraries };
+   Label lblExcludedLibraries { this, position = { 8, 246 }, labeledWindow = excludedLibraries };
    StringListBox excludedLibraries
    {
-      this, text = $"Libraries to exclude:", hotKey = altX;
-      position = { 148, 208 }, size = { 300 };
+      this, text = $"Libraries to exclude", hotKey = altX;
+      position = { 148, 244 }, size = { 300, 22 }, anchor = { left = 148, top = 244, right = 8 };
 
       bool NotifyModified(EditBox editBox)
       {
@@ -1085,6 +1104,7 @@ class CompilerOptionsTab : CompilersSubTab
          distccHosts.contents = compiler.distccHosts;
          prepDefs.strings = compiler.prepDirectives;
          excludedLibraries.strings = compiler.excludeLibs;
+         eCcompilerFlags.strings = compiler.eCcompilerFlags;
          compilerFlags.strings = compiler.compilerFlags;
          linkerFlags.strings = compiler.linkerFlags;
 
index 13cba8b..bdb05e6 100644 (file)
@@ -2553,6 +2553,12 @@ private:
                   f.Puts(l);
                }
             }
+            if(compiler.eCcompilerFlags && compiler.eCcompilerFlags.count)
+            {
+               f.Puts("\nECFLAGS +=");
+               OutputFlags(f, any, compiler.eCcompilerFlags, inPlace);
+               f.Puts("\n");
+            }
             if(compiler.compilerFlags && compiler.compilerFlags.count)
             {
                f.Puts("\nCFLAGS +=");