Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Aug 2012 16:09:03 GMT
From:      Dan McGregor <dan.mcgregor@usask.ca>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/171119: multimedia/libxine fails to build with clang as cc
Message-ID:  <201208271609.q7RG93Ui088132@red.freebsd.org>
Resent-Message-ID: <201208271610.q7RGA4L1050200@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         171119
>Category:       ports
>Synopsis:       multimedia/libxine fails to build with clang as cc
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 27 16:10:04 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Dan McGregor
>Release:        10-CURRENT
>Organization:
>Environment:
FreeBSD nebuchadnezzar.local 10.0-CURRENT FreeBSD 10.0-CURRENT #0 r+5a7bf35: Wed Aug 22 13:23:02 CST 2012     dan@nebuchadnezzar.local:/home/dan/freebsd-obj/usr/home/dan/freebsd/sys/GENERIC  amd64

>Description:
libxine fails with the following error when build with clang:


ifs.c:534:2: error: clobbers must be last on the x87 stack
        emms();/*__asm__ __volatile__ ("emms");*/
        ^
./mmx.h:733:38: note: expanded from macro 'emms'
#define emms() __asm__ __volatile__ ("emms"::: \
                                     ^
cc: warning: argument unused during compilation: '-fexpensive-optimizations'
cc: warning: argument unused during compilation: '-fno-force-addr'
1 error generated.


The offending part of mmx.h is:

#define emms() __asm__ __volatile__ ("emms"::: \
                      "st(1)","st(2)","st(3)","st(4)","st(5)","st(6)","st(7)")

>How-To-Repeat:
Build libxine with CC=clang CXX=clang++ or build world with WITH_CLANG_IS_CC and WITHOUT_GCC then build libxine.
>Fix:
The easiest solution for me was to add USE_GCC=4.4+ to the Makefile, which brought in gcc as a dependency.

The other solution is to remove the clobber list from the emms asm directive.  I don't know what that does to building with gcc, though.

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208271609.q7RG93Ui088132>