Re: what is __cg92_used?

From: Michael Ryan <ryan_at_xsoft.xerox.com>
Date: Thu, 2 Feb 1995 01:14:00 GMT
Message-ID: <1995Feb2.011400.11274_at_xsoft.uucp>


In article B4G_at_netcom.com, jhalpin_at_netcom.com (Joe Halpin) writes:
>What is __cg92_used, and why do I need one to link?

dieter% man cc
Reformatting page. Wait... done

cc(1)                     User Commands                     cc(1)

NAME
     cc - C compiler

SYNOPSIS
     cc ... [ -xcg89 ] [ -xcg92 ] ...
...
     -xcg92
          Generate code for machines implementing SPARC V8  (such
          as the SPARCstation-10 series); in particular, the fol-
          lowing instructions may be  generated  in-line:   smul,
          smulcc,  sdiv,  sdivcc, umul, umulcc, udiv, udivcc, and
          fsmuld.  In addition, the built-in assembler pass  will
          perform  TI,TMS390Z5x-specific  instruction  scheduling
          automatically.  Code compiled with -xcg92 will run, but
          possibly much more slowly on pre- SPARC V8 machines; as
          such the practice is strongly discouraged.

          Normally, -xcg92 passes -lm  to  the  linker;  however,
          when you use -xnolib , -lm does not get passed.
...

in my .mk file (built for the XSoft dev env) we have something like this (+ a whole bunch of stuff):

LIBCG92 = /opt/SUNWspro/SC2.0.1/cg92
ORACLELDFLAGS=-xcg92 -L$(LIBHOME) -L$(LIBCG92) $(CEXEORACLE): $(OBJORACLE)
        $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(ORACLELDFLAGS) -o $_at_ $(OBJORACLE) $(LIBSORACLE) $(LDLIBS)

and i build a cg92 application just like ORACLE wants. i don't know of any other valid workarounds.

i cannot comment expertly on defining your own cg92_used symbol but it is not something i would do.
//michael

---
:: michael ryan , ryan_at_xsoft.xerox.com
:: ob disclaimer: opinions expressed are not those of xerox, corp.
 
Received on Thu Feb 02 1995 - 02:14:00 CET

Original text of this message