( ESNUG 276 Item 7 ) ----------------------------------------------- [1/7/97]

Subject: (ESNUG 272 #2) Choice Of C Compiler & The Synopsys VSS C Interface

> Hi there, after working a lot with the SYNOPSYS C Language Interface CLI
> we are  currently encountering problems with the C compiler used.  The cc
> does not fit our needs, so we are interested in using the gcc.  Does anyone
> know where set the default C compiler for the CLI or the parameters for
> the call as this is not explained in the manual. Renaming the gcc to cc
> helps, but this still does not solve the problem with the fixed parameter
> set in the compiler call. 
>
> Any experience on that subject?  We would be really grateful for any help.
>
>   - Fabian Wolf
>     Institut fuer Datenverarbeitungsanlagen


From: [ A Synopsys Simulation Support Engineer ]

John,

Here are some instructions on how to specify a alternate c compiler for cli.

Using the GCC compiler with CLI of VSS is accomplished by changing some
variables in the CLI script.  The name of the compiler and the flags used
by the compiler are specified in  the CLI script.  Each of the supported
platforms of VSS has a section in a case statement of the CLI script which
identifies items such as the compiler, compiler options, linker, and
linker options.

How to modify the CLI script:
 
1. Copy the CLI script from a bin directory of the VSS installation
   to a temp working area.

               cp $SYNOPSYS/sparcOS5/sim/bin/cli .
 
2. Edit the copy of the cli script and locate the section of script that
   sets platform specific defaults and modify the compiler setting for the
   desired platform.
 
   a. Modify the compiler variable  tCC  and assign it the name of the
      alternate C compiler 
 
   b. Modify the variable for the C compiler options.  The variable is
      tCflags.  There may be multiple location for the compiler options
      variable one for dynamic and one for static linking.
 
 
   c. For Solaris version of gcc the flags settings for static linking is:
 
                -c -fPIC -O1
 
      EXAMPLE:

      for CLI script in 1997.08 
 
        "sparcOS5"
        tCC=gcc                          ## modified to use GCC
        tLINT=lint
        PR="pr -t -l1 -s -1"
        tLflags="-I${tIncludeFiles} -u ${tLintLibs}"
        if [ "$bStatic"  = "" ] ; then bStatic=0
        fi
        if [ $bStatic -eq 0 ] ;  then
          tLD=ld
          ## modified for flags required for cc to run on VSS
          tCflags="-c -fPIC -O1 -I${tIncludeFiles}"
          tLDflags="-dy -G -z text"
          tLibext=".so"
          tArchive=libCLI${tLibext}
          tArchives=
        else
          tLD=${tCC}
          tCflags="-I${tIncludeFiles}"  ## no changes for dynamic 
          tLDflags="${tCflags}"
          tArchive=./vhdlsim
          tArchives=" \
            ${SYNOPSYS}/${SIM_ARCH}/sim/lib/libvhdlsim.a \
            ${SYNOPSYS}/${SIM_ARCH}/sim/lib/libCLIsupport.a \
            ${SYNOPSYS}/${SIM_ARCH}/sim/lib/libsimbus.a \
            ${SYNOPSYS}/${SIM_ARCH}/sim/lib/libwifio.a -lm -ll -ly \
              -lsocket -Bdynamic -lm -lc -lnsl -ldl -Bstatic -lsunmath"

      for CLI scripts prior to 1997.08 release 
 
        case "sparcOS5":
          set tCC=gcc               ## modify name of the compiler
          set tLINT=lint
          set PR="pr -t -l1 -s -1"
          set tLflags="-I${tIncludeFiles} -u ${tLintLibs}"
          if ( ! $?bStatic ) set bStatic = 0
          if ( ! $bStatic ) then
            set tLD=ld
            ## modify the flags for static
            set tCflags="-c -fPIC -O1 -I${tIncludeFiles}"  
            set tLDflags="-dy -G -z text"
            set tLibext=".so"
            set tArchive = libCLI${tLibext}
            set tArchives = ( )
          else
            set tLD=${tCC}
            ## no mods required for dynamic linking
            set tCflags="-I${tIncludeFiles}" 
            set tLDflags="${tCflags}"
            set tArchive = ./vhdlsim
            set tArchives = ( ./libvhdlsim.a )

3. Place the modified cli script in the working directory and make sure
   the working directory  is in the search path for executables before the 
   path of the installed version of VSS.

4. Run you cli build procedures as before, making sure that the modified
   cli script is used.

5. If you have any question about this please send email to the Synopsys
   simulation group at sim_supt@synopsys.com

  - [ A Synopsys Simulation Support Engineer ]



 Sign up for the DeepChip newsletter.
Email
 Read what EDA tool users really think.


Feedback About Wiretaps ESNUGs SIGN UP! Downloads Trip Reports Advertise

"Relax. This is a discussion. Anything said here is just one engineer's opinion. Email in your dissenting letter and it'll be published, too."
This Web Site Is Modified Every 2-3 Days
Copyright 1991-2024 John Cooley.  All Rights Reserved.
| Contact John Cooley | Webmaster | Legal | Feedback Form |

   !!!     "It's not a BUG,
  /o o\  /  it's a FEATURE!"
 (  >  )
  \ - / 
  _] [_     (jcooley 1991)