Re: [osol-code] -fast option for kernel code with memset(9F)

2009-02-09 Thread Joachim Worringen
Sherry Moore wrote:
 The Sun Studio's equivalent of GCC's
 -ffreestanding -mcmodel=kernel -mno-red-zone
 is
 -xmodel=kernel

This is exactly what makes me wonder: I specify this option, and if I 
tell the compiler I am compiling for the kernel, it should know that 
something like _memset() does not exist!

  Joachim

-- 
Joachim Worringen, Software Architect, Dolphin Interconnect Solutions
phone ++49/(0)228/324 08 17 - http://www.dolphinics.com
___
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code


Re: [osol-code] -fast option for kernel code with memset(9F)

2009-02-07 Thread Andrew C. Henle
 Joachim Worringen wrote:
  Greeting,
  
  using Sun cc (cc: Sun C 5.9 SunOS_i386 Patch
 124868-01 2007/07/12), I 
  compile my kernel module with -fast. This results
 in memset(9F) calls 
  appearing as _memset calls in the object file,
 which can not be resolved 
  on a SXCE 106 kernel.
  
  Is this a problem with my include files and
 defines, the compiler 
  version, usage of -fast for kernel code?
 
 P.S: -O3 works.
 
   Joachim
 - 
 Joachim Worringen, Software Architect, Dolphin
 Interconnect Solutions
 phone ++49/(0)228/324 08 17 -
 http://www.dolphinics.com
 ___
 opensolaris-code mailing list
 opensolaris-code@opensolaris.org
 http://mail.opensolaris.org/mailman/listinfo/opensolar
 is-code

The -fast option expands to many other options involving optimization.  From 
the Sun Studio 12 man page for cc:

quote  These options are turned on for -fast:

  -fns (SPARC, x86)
  -fsimple=2 (SPARC, x86)
  -fsingle (SPARC, x86)
  -nofstore (x86)
  -xalias_level=basic (SPARC, x86)
  -xbuiltin=%all (SPARC, x86)
  -xdepend (SPARC, x86)
  -xlibmil (SPARC, x86)
  -xlibmopt (SPARC)
  -xmemalign=8s (SPARC)
  -xO5 (SPARC, x86)
  -xprefetch=auto,explicit (SPARC)
  -xregs=frameptr (x86)
  -xtarget=native (SPARC, x86)
/quote

One (or more) of those is causing your call to memset() to be replaced with a 
call to _memset().

You can probably add those options to your build one at a time until the 
problem appears.
-- 
This message posted from opensolaris.org
___
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code


Re: [osol-code] -fast option for kernel code with memset(9F)

2009-02-07 Thread Sherry Moore
The Sun Studio's equivalent of GCC's
-ffreestanding -mcmodel=kernel -mno-red-zone
is
-xmodel=kernel

Sherry

On Sat, Feb 07, 2009 at 06:11:30PM -0800, Garrett D'Amore wrote:
 Andrew C. Henle wrote:
  Joachim Worringen wrote:
  
  Greeting,
 
  using Sun cc (cc: Sun C 5.9 SunOS_i386 Patch

  124868-01 2007/07/12), I 
  
  compile my kernel module with -fast. This results

  in memset(9F) calls 
  
  appearing as _memset calls in the object file,

  which can not be resolved 
  
  on a SXCE 106 kernel.
 
  Is this a problem with my include files and

  defines, the compiler 
  
  version, usage of -fast for kernel code?

  P.S: -O3 works.
 
Joachim
  - 
  Joachim Worringen, Software Architect, Dolphin
  Interconnect Solutions
  phone ++49/(0)228/324 08 17 -
  http://www.dolphinics.com
  ___
  opensolaris-code mailing list
  opensolaris-code@opensolaris.org
  http://mail.opensolaris.org/mailman/listinfo/opensolar
  is-code
  
 
  The -fast option expands to many other options involving optimization.  
  From the Sun Studio 12 man page for cc:
 
  quote  These options are turned on for -fast:
 
-fns (SPARC, x86)
-fsimple=2 (SPARC, x86)
-fsingle (SPARC, x86)
-nofstore (x86)
-xalias_level=basic (SPARC, x86)
-xbuiltin=%all (SPARC, x86)
-xdepend (SPARC, x86)
-xlibmil (SPARC, x86)
-xlibmopt (SPARC)
-xmemalign=8s (SPARC)
-xO5 (SPARC, x86)
-xprefetch=auto,explicit (SPARC)
-xregs=frameptr (x86)
-xtarget=native (SPARC, x86)
  /quote

 
 Its probably -xbuiltin=%all.
 
 I seem to recall an option (don't recall the precise one) that was akin 
 to GCC's -ffreestanding (which indicates that the compiler should not 
 make any assumptions about standard libraries.)
 
 -- Garrett
  One (or more) of those is causing your call to memset() to be replaced 
  with a call to _memset().
 
  You can probably add those options to your build one at a time until the 
  problem appears.

 
 ___
 opensolaris-code mailing list
 opensolaris-code@opensolaris.org
 http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

-- 
Sherry Moore, Solaris Core Kernel   http://blogs.sun.com/sherrym
___
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code


Re: [osol-code] -fast option for kernel code with memset(9F)

2009-02-06 Thread Joachim Worringen
Joachim Worringen wrote:
 Greeting,
 
 using Sun cc (cc: Sun C 5.9 SunOS_i386 Patch 124868-01 2007/07/12), I 
 compile my kernel module with -fast. This results in memset(9F) calls 
 appearing as _memset calls in the object file, which can not be resolved 
 on a SXCE 106 kernel.
 
 Is this a problem with my include files and defines, the compiler 
 version, usage of -fast for kernel code?

P.S: -O3 works.

  Joachim

-- 
Joachim Worringen, Software Architect, Dolphin Interconnect Solutions
phone ++49/(0)228/324 08 17 - http://www.dolphinics.com
___
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code