Bug 13410 - 0.3.12 doesn't build on Solaris 10 x86_64 with latest Sun C compiler
Summary: 0.3.12 doesn't build on Solaris 10 x86_64 with latest Sun C compiler
Status: RESOLVED FIXED
Alias: None
Product: liboil
Classification: Unclassified
Component: unknown (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Solaris
: medium normal
Assignee: David Schleef
QA Contact: David Schleef
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-27 10:59 UTC by Tim Mooney
Modified: 2008-02-18 18:13 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Tim Mooney 2007-11-27 10:59:52 UTC
I'm building 0.3.12 on x86_64-sun-solaris2.10, using the latest Sun C compiler, from the Workshop 12 bundle.  Workshop 12 adds support for inline assembly, a la gcc, but apparently it's still not as permissive as gcc.

Anyway, the configure check does report that gcc-style inline assembly is OK:

checking if compiler supports gcc-style inline assembly... yes

but when the compile reaches ayuv2argb_i386.c, the assembler complains about
syntax errors in the assembly:

 cc -DHAVE_CONFIG_H -I. -I../.. -I/local/include -I/local/gnu/include -D_BSD_SOURCE -D_GNU_SOURCE -I../.. -Xa -xO2 -xstrconst -KPIC -mt -xtarget=native -m64 -xarch=native -I/local/include -I/local/gnu/include -c ayuv2argb_i386.c  -KPIC -DPIC -o .libs/libi386_la-ayuv2argb_i386.o
Assembler: ayuv2argb_i386.c
        "Assembler: argb_paint_i386.c
        "/tmp/ube_sGAA.26745.xdaip0", line 55 : Syntax error
        Near line: "  movl $0, %rax"
        "/tmp/ube_sGAA.26745.xdaip0", line 61 : Syntax error
        Near line: "  cmpl $255, %rax"
        "/tmp/ube_sGAA.26745.xdaip0", line 66 : Syntax error
        Near line: "  movd %rax, %mm2"
        "/tmp/ube_sGAA.26745.xdaip0", line 82 : Syntax error
        Near line: "  add $4, %r12"
        "/tmp/ube_sGAA.26745.xdaip0", line 83 : Syntax error
        Near line: "  add $1, %r13"
/tmp/ube_sGAA.26746.zdaqp0", line 48 : Syntax error
        Near line: "  movq %mm0, 0(%esp)"
        "/tmp/ube_sGAA.26746.zdaqp0", line 50 : Syntax error
        Near line: "  movq %mm0, 8(%esp)"
        "/tmp/ube_sGAA.26746.zdaqp0", line 52 : Syntax error
        Near line: "  movq %mm0, 16(%esp)"
        "/tmp/ube_sGAA.26746.zdaqp0", line 54 : Syntax error
        Near line: "  movq %mm0, 16(%esp)"
        "/tmp/ube_sGAA.26746.zdaqp0", line 56 : Syntax error
        Near line: "  movq %mm0, 24(%esp)"
        "/tmp/ube_sGAA.26746.zdaqp0", line 58 : Syntax error
        Near line: "  movq %mm0, 32(%esp)"
        "/tmp/ube_sGAA.26746.zdaqp0", line 67 : Syntax error
        Near line: "  add $4, %r12"
        "/tmp/ube_sGAA.26746.zdaqp0", line 70 : Syntax error
        Near line: "  paddw 0(%esp), %mm1"
        "/tmp/ube_sGAA.26746.zdaqp0", line 75 : Syntax error
        Near line: "  pmulhw 8(%esp), %mm1"
        "/tmp/ube_sGAA.26746.zdaqp0", line 76 : Syntax error
        Near line: "cc: assembler failed for argb_paint_i386.c
  pmulhw 16(%esp), %mm2"
        "/tmp/ube_sGAA.26746.zdaqp0", line 77 : Syntax error
        Near line: "  pmulhw 24(%esp), %mm3"
        "/tmp/ube_sGAA.26746.zdaqp0", line 78 : Syntax error
        Near line: "  pmulhw 32(%esp), %mm4"
        "/tmp/ube_sGAA.26746.zdaqp0", line 86 : Syntax error
        Near line: "  add $4, %r13"


I found some comments about liboil and Solaris Workshop 12 here

http://mail.opensolaris.org/pipermail/desktop-discuss/2007-November/011242.html

It looks like some tweaks to the assembly will help some, but there are still
some incompatibilities (like for multiplication) in syntax that would need to be worked out.

I'm not really expecting any kind of a quick fix for this, but I thought I should report it so that the issue is at least noted.
Comment 1 David Schleef 2008-02-18 18:13:45 UTC
I added a check in the macro for __GNUC__, so inline assembly should be disabled for the Sun compiler again.  Please reopen if I'm wrong.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.