Class GccProcessor


  • public class GccProcessor
    extends java.lang.Object
    A add-in class for Gcc processors
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.lang.String machine  
      private static java.lang.String[] specs  
      private static java.lang.String version  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private GccProcessor()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      private static int addLibraryPatterns​(java.lang.String[] libnames, java.lang.StringBuffer buf, java.lang.String prefix, java.lang.String extension, java.lang.String[] patterns, int offset)  
      static void convertCygwinFilenames​(java.lang.String[] names)
      Converts absolute Cygwin file or directory names to the corresponding Win32 name.
      static java.lang.String[] getLibraryPatterns​(java.lang.String[] libnames)  
      static java.lang.String getMachine()  
      static java.lang.String[] getOutputFileSwitch​(java.lang.String letter, java.lang.String outputFile)  
      static java.lang.String[] getSpecs()
      Returns the contents of the gcc specs file.
      static java.lang.String getVersion()  
      static boolean isCaseSensitive()  
      static boolean isCygwin()
      Determines if task is running with cygwin
      private static boolean isHPUX()  
      static java.lang.String[][] parseSpecs​(java.lang.String[] specsContent, java.lang.String specSectionStart, java.lang.String[] options)
      Parses the results of the specs file for a specific processor and options
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • machine

        private static java.lang.String machine
      • specs

        private static java.lang.String[] specs
      • version

        private static java.lang.String version
    • Constructor Detail

      • GccProcessor

        private GccProcessor()
    • Method Detail

      • addLibraryPatterns

        private static int addLibraryPatterns​(java.lang.String[] libnames,
                                              java.lang.StringBuffer buf,
                                              java.lang.String prefix,
                                              java.lang.String extension,
                                              java.lang.String[] patterns,
                                              int offset)
      • convertCygwinFilenames

        public static void convertCygwinFilenames​(java.lang.String[] names)
        Converts absolute Cygwin file or directory names to the corresponding Win32 name.
        Parameters:
        names - array of names, some elements may be null, will be changed in place.
      • getLibraryPatterns

        public static java.lang.String[] getLibraryPatterns​(java.lang.String[] libnames)
      • getMachine

        public static java.lang.String getMachine()
      • getOutputFileSwitch

        public static java.lang.String[] getOutputFileSwitch​(java.lang.String letter,
                                                             java.lang.String outputFile)
      • getSpecs

        public static java.lang.String[] getSpecs()
        Returns the contents of the gcc specs file. The implementation locates gcc.exe in the executable path and then builds a relative path name from the results of -dumpmachine and -dumpversion. Attempts to use gcc -dumpspecs to provide this information resulted in stalling on the Execute.run
        Returns:
        contents of the specs file
      • getVersion

        public static java.lang.String getVersion()
      • isCaseSensitive

        public static boolean isCaseSensitive()
      • isCygwin

        public static boolean isCygwin()
        Determines if task is running with cygwin
        Returns:
        true if cygwin was detected
      • isHPUX

        private static boolean isHPUX()
      • parseSpecs

        public static java.lang.String[][] parseSpecs​(java.lang.String[] specsContent,
                                                      java.lang.String specSectionStart,
                                                      java.lang.String[] options)
        Parses the results of the specs file for a specific processor and options
        Parameters:
        specsContent - Contents of specs file as returned from getSpecs
        specSectionStart - start of spec section, for example "*cpp:"
        options - command line switches such as "-istart"