In file included from gl/grlib.c:7: gl/inlstring.h:71:9: error: asm-specifier for input or output variable conflicts with asm clobber list : "cx", "di"); ^ gl/inlstring.h:281:17: error: asm-specifier for input or output variable conflicts with asm clobber list :"ax", "0", "1", "2"); ^ gl/inlstring.h:297:17: error: asm-specifier for input or output variable conflicts with asm clobber list :"ax", "0", "1", "2"); ^ gl/inlstring.h:314:17: error: asm-specifier for input or output variable conflicts with asm clobber list :"ax", "0", "1", "2"); ^ build log: http://sprunge.us/hKCH
Another way to reproduce: $ pkg install llvm-devel $ make clean all CC='clang-devel -m32' ARCH=i386 except devel/llvm-devel is too old to have the issue.
https://reviews.llvm.org/D15075 likely broke it but I have no clue about the fix other than switch to GCC or disable inline asm.
Created attachment 179132 [details] workaround
Created attachment 179183 [details] Remove unnecessary clobbers from inline asm statements Here is a patch that gets rid of the unnecessary clobbers from the inline assembly statements. (It seems a previous maintainer, marked with **rjr**, has already done so for a number of other clobbers, but has not completed the job.) Tested to build with both clang and gcc.
Comment on attachment 179183 [details] Remove unnecessary clobbers from inline asm statements Looks OK but I wonder if the code is actually used anywhere. Maintainer approval can probably be replaced with "portmgr blanket" here. +- :"ax", "0", "1", "2"); ++ :"ax"); [...] +- :"ax", "0", "1", "2"); ++ :"ax"); [...] +- :"ax", "0", "1", "2"); ++ :"ax"); "0" doesn't conflict according to Clang.
(In reply to Jan Beich (mail not working) from comment #5) > Comment on attachment 179183 [details] > Remove unnecessary clobbers from inline asm statements > > Looks OK but I wonder if the code is actually used anywhere. Indeed, and on modern CPUs using "rep stosb" actually performs less than a while loop, so these routines are not really needed anymore. That said, this is old code anyway, it is probably best to change as little as possible. > +- :"ax", "0", "1", "2"); > ++ :"ax"); > [...] > +- :"ax", "0", "1", "2"); > ++ :"ax"); > [...] > +- :"ax", "0", "1", "2"); > ++ :"ax"); > > "0" doesn't conflict according to Clang. That is actually strange, since the idea is that input or output registers do not have to appear in the clobber lists at all. Maybe this is just a case missed by clang, I will check with upstream.
(In reply to Dimitry Andric from comment #6) > ... I will check with upstream. Any news?
(In reply to Jan Beich (mail not working) from comment #7) > (In reply to Dimitry Andric from comment #6) > > ... I will check with upstream. > > Any news? Finally unslacked, and sent a mail to the original implementers of the error message, and CC'd the cfe-commits mailing list. For now, we can just apply the patch though, then at least svgalib is unborked.
A commit references this bug: Author: jbeich Date: Wed Feb 1 05:24:35 UTC 2017 New revision: 432966 URL: https://svnweb.freebsd.org/changeset/ports/432966 Log: graphics/svgalib: unbreak with clang 4.0 In file included from gl/grlib.c:7: gl/inlstring.h:71:9: error: asm-specifier for input or output variable conflicts with asm clobber list : "cx", "di"); ^ gl/inlstring.h:281:17: error: asm-specifier for input or output variable conflicts with asm clobber list :"ax", "0", "1", "2"); ^ gl/inlstring.h:297:17: error: asm-specifier for input or output variable conflicts with asm clobber list :"ax", "0", "1", "2"); ^ gl/inlstring.h:314:17: error: asm-specifier for input or output variable conflicts with asm clobber list :"ax", "0", "1", "2"); ^ PR: 216154 Reported by: antoine (via exp-run) Submitted by: dim Approved by: portmgr blanket Changes: head/graphics/svgalib/files/patch-gl-inlstring.h
A commit references this bug: Author: jbeich Date: Wed Feb 1 12:53:43 UTC 2017 New revision: 433026 URL: https://svnweb.freebsd.org/changeset/ports/433026 Log: MFH: r432966 graphics/svgalib: unbreak with clang 4.0 In file included from gl/grlib.c:7: gl/inlstring.h:71:9: error: asm-specifier for input or output variable conflicts with asm clobber list : "cx", "di"); ^ gl/inlstring.h:281:17: error: asm-specifier for input or output variable conflicts with asm clobber list :"ax", "0", "1", "2"); ^ gl/inlstring.h:297:17: error: asm-specifier for input or output variable conflicts with asm clobber list :"ax", "0", "1", "2"); ^ gl/inlstring.h:314:17: error: asm-specifier for input or output variable conflicts with asm clobber list :"ax", "0", "1", "2"); ^ PR: 216154 Reported by: antoine (via exp-run) Submitted by: dim Approved by: portmgr blanket Approved by: ports-secteam blanket Changes: _U branches/2017Q1/ branches/2017Q1/graphics/svgalib/files/patch-gl-inlstring.h