dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] CVS: pnet/cscc Makefile.am,1.16,1.17 cscc.c,1.25,


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnet/cscc Makefile.am,1.16,1.17 cscc.c,1.25,1.26
Date: Thu, 12 Dec 2002 19:33:32 -0500

Update of /cvsroot/dotgnu-pnet/pnet/cscc
In directory subversions:/tmp/cvs-serv24016/cscc

Modified Files:
        Makefile.am cscc.c 
Log Message:


Turn "ilasm" into a library that can be directly linked into
"cscc", and then link it into "cscc".


Index: Makefile.am
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/Makefile.am,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** Makefile.am 31 Jul 2002 05:52:41 -0000      1.16
--- Makefile.am 13 Dec 2002 00:33:30 -0000      1.17
***************
*** 7,11 ****
  
  cscc_SOURCES = cscc.c
! cscc_LDADD   = common/libILCCommon.a ../ilalink/libILLink.a \
                           ../dumpasm/libILDumpAsm.a ../image/libILImage.a \
                           ../support/libILSupport.a
--- 7,12 ----
  
  cscc_SOURCES = cscc.c
! cscc_LDADD   = common/libILCCommon.a ../ilasm/libILAsm.a \
!                          ../ilalink/libILLink.a \
                           ../dumpasm/libILDumpAsm.a ../image/libILImage.a \
                           ../support/libILSupport.a

Index: cscc.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/cscc.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -r1.25 -r1.26
*** cscc.c      12 Dec 2002 03:35:44 -0000      1.25
--- cscc.c      13 Dec 2002 00:33:30 -0000      1.26
***************
*** 44,47 ****
--- 44,53 ----
  
  /*
+  * Define this variable to use the builtin "ilasm" library
+  * rather than the external "ilasm" executable.
+  */
+ #define       USE_BUILTIN_ILASM       1
+ 
+ /*
   * The default system include path.  We look in "lib" first,
   * just in case there is a pre-compiled "dll" for a package.
***************
*** 881,884 ****
--- 887,892 ----
  }
  
+ #ifndef USE_BUILTIN_ILASM
+ 
  /*
   * Find the "ilasm" program.
***************
*** 934,937 ****
--- 942,947 ----
  }
  
+ #endif /* !USE_BUILTIN_ILASM */
+ 
  /*
   * Compare two file extensions for equality, while ignoring case.
***************
*** 1054,1057 ****
--- 1064,1072 ----
  
  /*
+  * Import the assembler code from "libILAsm".
+  */
+ int ILAsmMain(int argc, char *argv[]);
+ 
+ /*
   * Process an input file using the assembler.
   */
***************
*** 1066,1071 ****
--- 1081,1090 ----
        cmdline = 0;
        cmdline_size = 0;
+ #ifdef USE_BUILTIN_ILASM
+       AddArgument(&cmdline, &cmdline_size, "ilasm");
+ #else
        FindILAsmProgram();
        AddArgument(&cmdline, &cmdline_size, ilasm_program);
+ #endif
        if(executable_flag)
        {
***************
*** 1107,1111 ****
--- 1126,1134 ----
  
        /* Execute the assembler */
+ #ifdef USE_BUILTIN_ILASM
+       status = ILAsmMain(cmdline_size - 1, cmdline);
+ #else
        status = ExecChild(cmdline, 0);
+ #endif
        ILFree(cmdline);
        if(status != 0)
***************
*** 1136,1140 ****
--- 1159,1165 ----
        if(compile_flag || executable_flag)
        {
+       #ifndef USE_BUILTIN_ILASM
                FindILAsmProgram();
+       #endif
        }
  
***************
*** 1387,1391 ****
--- 1412,1420 ----
        cmdline = 0;
        cmdline_size = 0;
+ #ifdef USE_BUILTIN_ILASM
+       AddArgument(&cmdline, &cmdline_size, "ilasm");
+ #else
        AddArgument(&cmdline, &cmdline_size, ilasm_program);
+ #endif
        if(executable_flag)
        {
***************
*** 1424,1428 ****
--- 1453,1461 ----
        saveAsm = CCStringListContains(extension_flags, num_extension_flags,
                                                               "save-asm");
+ #ifdef USE_BUILTIN_ILASM
+       status = ILAsmMain(cmdline_size - 1, cmdline);
+ #else
        status = ExecChild(cmdline, 0);
+ #endif
        ILFree(cmdline);
        if(status != 0)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]