[build2] guess C compiler type

Moldmann Max MoldmannMax at JohnDeere.com
Fri Oct 26 15:22:18 UTC 2018

> C:\Tools\c166VXv3.0r3/bin/cc166.exe -V prints out the same like --version

Unfortunately -v is not helpful either:
> C:\Tools\c166VXv3.0r3/bin/cc166.exe -v
Usage: cc166 [options] files
Summary of options:
  -?   --help[=<item>,...]           show option summary, or extended info
             options                   show extended option descriptions
  -C   --cpu=<type>                  select target CPU
  -D   --define=<macro>[=<value>]    define preprocessor macro
  -E   --preprocess[=<flag>,...]     preprocess only (default: CILMP)
                                     lowercase/+ enables, uppercase/- disables:
         c/C +/-comments               keep comments
         i/I +/-includes               show included source files
         l/L +/-list                   generate a list of macro definitions
         m/M +/-make                   generate dependencies for make
         p/P +/-noline                 strip #line source position info
  -F   --no-double                   single precision floating-point
  -H   --include-file=<file>,...     include a file at the start of the
  -I   --include-directory=<dir>     add include directory
  -L   --library-directory[=<dir>]   add library directory
  -M   --model=<model>               select memory model (default: n)
         f   far                       far
         h   huge                      huge
         n   near                      near (default)
         s   shuge                     segmented huge
  -U   --undefine=<macro>            remove preprocessor macro
  -V   --version                     display version header only
  -Wa  --pass-assembler=<option>     pass option directly to the assembler
  -Wc  --pass-c=<option>             pass option directly to the C compiler
  -Wcp --pass-c++=<option>           pass option directly to the C++ compiler
  -Wl  --pass-linker=<option>        pass option directly to the linker
  -c   --create[=<stage>]            select final output type (default: o)
         c   intermediate-c            create (intermediate) C file(s)
         l   relocatable               create relocatable output file
         m   mil                       create mil file(s)
         o   object                    create object file(s)
         s   assembly                  create assembly file(s)
  -d   --lsl-file=<file>,...         linker script file
  -f   --option-file=<file>,...      read command line information from file
  -g   --debug-info                  generate symbolic debug information
  -k   --keep-output-files           keep output files after errors
  -l   --library=<lib>               add library
  -n   --dry-run                     verbose output and suppress execution
  -o   --output=<file>               set output file name
  -p   --profile[=<flags>,...]       profiling (default: BCFST)
                                     lowercase/+ enables, uppercase/- disables:
         b/B +/-block                  block counters
         c/C +/-callgraph              call graph
         f/F +/-function               function counters
         g                             alias for -pBcFSt
         s/S +/-static                 static profile generation
         t/T +/-time                   function timers
  -p   --profile                     alias for -pBCfST
  -t   --keep-temporary-files        do not delete intermediate output files
  -u   --uchar                       char defaults to unsigned
  -v   --verbose                     verbose output
  -w   --no-warnings[=<nr>[-<nr>],...]
                                     suppress all or specific warnings
       --address-size=<num>          set address size for IHEX [1|2|4] or SREC
                                     [2|3|4] files
       --alternative-sfr-file        include file with alternative SFR
       --automatic-near              enable automatic near allocation
                                     put structures <= <threshold> in __bita
                                     memory (default: 0)
       --check                       check the source, but don't generate code
       --core=<core>                 selects the core
       --dep-file[=<file>]           also generate dependencies for make
       --diag=[<fmt>:]{all|<nr>,...} display a description of one or more
                                     diagnostic messages using the specified
                                     format: html, rtf or text (default)
       --error-file                  redirect all diagnostic messages
       --exceptions                  enable C++ exception handling
       --force-c                     treat C++ files as C files
       --force-c++                   force C++ compilation and linking
       --force-munch                 force invocation of C++ muncher
       --format=<type>               set linker output format [ihex|srec]
       --fp-trap                     use trapped floating-point library
       --global-type-checking        enable global type checking
       --ignore-default-library-path ignore the default search path for
       --instantiate=<type>          C++ instantiation mode
       --integer-enumeration         always use 16-bit integers for enumeration
       --io-streams                  enable C++ I/O streams
       --iso=<year>                  ISO C standard (90 or 99) (default: 99)
       --list-files[=<file>]         generate assembler list files
       --m166[=<option>]             use m166 and pass options to m166
       --make-target[=<name>]        specify target name for -Em/--dep-file
       --mil-link                    link the MIL representation of all modules
       --mil-split[=<file>,...]      as --mil-link, also split into .ms files
       --near-functions              near functions; default are function huge
       --near-threshold=<threshold>  put data <= <threshold> in __near memory
                                     (default: 0)
       --no-auto-instantiation       disable automatic C++ instantiation
       --no-default-libraries        do not include default list of libraries
       --no-map-file                 do not generate linker map file
       --no-preprocessing-only       force full compilation
       --no-tasking-sfr              do not include the TASKING sfr files
       --processors[=<file>]         read additional processors.xml file
       --show-c++-warnings           show C and assembly warnings for C++
       --signed-bitfields            treat "int" bitfield as signed
       --silicon-bug[=<bug>,...]     enable silicon bug workarounds
       --user-stack                  use user stack for return addresses
                                     treat all or specific warnings as errors

Long options, starting with --, may be abbreviated.  The argument separator
character '=' is only used for long options, and should be omitted when the
option argument is specified separately.

-----Original Message-----
From: Boris Kolpackov <boris at codesynthesis.com> 
Sent: Friday, October 26, 2018 3:15 AM
To: Moldmann Max <MoldmannMax at JohnDeere.com>
Cc: users at build2.org
Subject: Re: [build2] guess C compiler type

> Moldmann Max <MoldmannMax at JohnDeere.com> writes:
> C:\Tools\c166VXv3.0r3/bin/cc166.exe --version
> TASKING VX-toolset for C166: control program   v3.0r3 Build 128
> Copyright 2004-2011 Altium BV

What does your compiler print with -v? That is:

> C:\Tools\c166VXv3.0r3/bin/cc166.exe -v

More information about the users mailing list