ports/174286: the xorg-server port fails to compile with Clang

deeptech71 deeptech71 at gmail.com
Sun Dec 9 03:10:00 UTC 2012


>Number:         174286
>Category:       ports
>Synopsis:       the xorg-server port fails to compile with Clang
>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:   Sun Dec 09 03:10:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     deeptech71
>Release:        -CURRENT
>Organization:
>Environment:
FreeBSD  10.0-CURRENT FreeBSD 10.0-CURRENT #0 r243867M: Wed Dec  5 02:50:19 CET 2012     root@:/usr/obj/usr/src/sys/HQ  i386
>Description:
With Clang, I get a sequence of the following build error:

  CC    xf86Helper.o
In file included from xf86Helper.c:54:
In file included from ../../../hw/xfree86/os-support/xf86_OSlib.h:451:
./compiler.h:1104:24: error: invalid operand in inline asm: 'in${0:B} ($1)'
  __asm__ __volatile__("in%B0 (%1)" :
                       ^
./compiler.h:1104:24: error: unknown use of instruction mnemonic without a size
      suffix
<inline asm>:1:2: note: instantiated into assembly here
        in (%dx)
        ^

>How-To-Repeat:

>Fix:
I basically made a simple change to allow successful compilation: see the attached patch. NO WARRANTY.

Patch attached with submission follows:

--- xorg-server-1.7.7/hw/xfree86/common/compiler.h.bak	2012-12-06 07:53:11.000000000 +0100
+++ xorg-server-1.7.7/hw/xfree86/common/compiler.h	2012-12-06 07:52:31.000000000 +0100
@@ -1021,7 +1021,7 @@
 
 #    if !defined(__SUNPRO_C)
 #    if !defined(FAKEIT) && !defined(__mc68000__) && !defined(__arm__) && !defined(__sh__) && !defined(__hppa__) && !defined(__s390__) && !defined(__m32r__)
-#     ifdef GCCUSESGAS
+#     if defined(GCCUSESGAS) || defined(__clang__)
 
 /*
  * If gcc uses gas rather than the native assembler, the syntax of these


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


More information about the freebsd-ports-bugs mailing list