[#1551] Hashes as keys — "Nathaniel Talbott" <nathaniel@...>

I was just playing around with Hash#hash and discovered that you can't use a

13 messages 2003/09/23

Building 1.8.0 on Solaris with Sun CC

From: Albert Chin <ruby-core@...>
Date: 2003-09-19 22:16:56 UTC
List: ruby-core #1547
Anyone try building 1.8.0 on Solaris with the Sun C compiler? On
Solaris 8 with:
  $ cc -V
  cc: Sun WorkShop 6 update 2 C 5.3 Patch 111679-12 2003/05/18
I get:
  cc -mr -Qn -xstrconst -xO2 -xtarget=generic -xarch=v8 -KPIC  -I.
  -I.  -c array.c
  "./defines.h", line 147: syntax error before or at: volatile
  cc: acomp failed for array.c
  gmake: *** [array.o] Error 2

Problematic code is:
  #if defined(sparc) || defined(__sparc__)
  static inline void
  flush_register_windows(void)
  {
  # if defined(__sparc_v9__) || defined(__arch64__)
      asm volatile ("flushw" : :);
  # elif defined(linux) || defined(__linux__)
      asm volatile ("ta  0x83");
  # else /* Solaris, OpenBSD, NetBSD, etc. */
      asm volatile ("ta  0x03");
  # endif /* trap always to flush register windows if we are on a Sparc system */
  }
  #  define FLUSH_REGISTER_WINDOWS flush_register_windows()
  #else
  #  define FLUSH_REGISTER_WINDOWS ((void)0)
#endif 

I don't think the Sun C compiler allows inline asm.

-- 
albert chin (china@thewrittenword.com)

In This Thread

Prev Next