How does sun cc support GNU C?

I fail to build theora on solaris_x86, it seems some it does not support GNU C style.

$cc -V

cc: Sun C 5.8 Patch 121016-02 2006/03/31

usage: cc [ options] files. Use 'cc -flags' for details

How can I deal with this situation,

- Waiting for new complier

- Write patch for theora(Do not know how to, any idea?)

Sample code are:

static const __attribute__ ((aligned(8),used)) ogg_int64_t V128 = 0x0080008000800080LL;

__asm__ __volatile__ (

" .balign 16\n\t"

" pxor%%mm7, %%mm7\n\t"

".rept 8\n\t"

" movq(%0), %%mm0\n\t" /* mm0 = FiltPtr */

" movq(%1), %%mm1\n\t" /* mm1 = ReconPtr */

" movq%%mm0, %%mm2\n\t" /* dup to prepare for up conversion */

" movq%%mm1, %%mm3\n\t" /* dup to prepare for up conversion */

/* convert from UINT8 to INT16 */

" punpcklbw%%mm7, %%mm0\n\t" /* mm0 = INT16(FiltPtr) */

" punpcklbw%%mm7, %%mm1\n\t" /* mm1 = INT16(ReconPtr) */

" punpckhbw%%mm7, %%mm2\n\t" /* mm2 = INT16(FiltPtr) */

" punpckhbw%%mm7, %%mm3\n\t" /* mm3 = INT16(ReconPtr) */

/* start calculation */

" psubw%%mm1, %%mm0\n\t" /* mm0 = FiltPtr - ReconPtr */

" psubw%%mm3, %%mm2\n\t" /* mm2 = FiltPtr - ReconPtr */

" movq%%mm0, (%2)\n\t" /* write answer out */

" movq%%mm2, 8(%2)\n\t" /* write answer out */

/* Increment pointers */

" add $16, %2\n\t"

" add %3, %0\n\t"

" add %4, %1\n\t"

".endr \n\t"

: "+r" (FiltPtr),

"+r" (ReconPtr),

"+r" (DctInputPtr)

: "m" (PixelsPerLine),

"m" (ReconPixelsPerLine)

: "memory"

);

[1644 byte] By [halton] at [2007-11-26 9:01:05]
# 1

For

static const __attribute__ ((aligned(8),used)) ogg_int64_t V128 = 0x0080008000800080LL;

Put

#if !defined(__GNUC__)

#define __attribute__(X) /* nothing */

#endif /* __GNUC__)

For the assembler, you'll either have to extract it to a separate assmbly file and assemble it with as (or gas), or else port it to C.

Paul

Paul_Floyd at 2007-7-6 23:06:51 > top of Java-index,Development Tools,Solaris and Linux Development Tools...