Bug 198206 - Fix games/stepmania-devel build with clang 3.6.0
Summary: Fix games/stepmania-devel build with clang 3.6.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Bartek Rutkowski
Depends on:
Blocks: 197395
  Show dependency treegraph
Reported: 2015-03-02 20:44 UTC by Dimitry Andric
Modified: 2015-03-19 19:26 UTC (History)
1 user (show)

See Also:

Change inline const rotate functions to macros (3.25 KB, patch)
2015-03-02 20:44 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer 2015-03-02 20:44:13 UTC
Created attachment 153695 [details]
Change inline const rotate functions to macros

During the exp-run in bug 197395, it was found that games/stepmania-devel gives errors with clang 3.6.0:


These errors all because the embedded copy of libtomcrypt uses the 'I' and 'J' asm constraints incorrectly.  These can only be used with compile-time integer constants (e.g. numeric literals).

I propose the attached patch, which changes the ROLc/RORc inline function to macros, so the constraints requirements are satisfied at compile time.  It is almost exactly the same as the patch for libtomcrypt itself, in bug 198017.

The produced code is exactly the same, as far as I can determine.  I tested this on i386 and amd64.
Comment 1 commit-hook freebsd_committer 2015-03-19 19:23:17 UTC
A commit references this bug:

Author: robak
Date: Thu Mar 19 19:23:10 UTC 2015
New revision: 381678
URL: https://svnweb.freebsd.org/changeset/ports/381678

  games/stepmania-devel: fix clang 3.6 build

  PR:		198206
  Submitted by:	Dimitry Andric <dim@FreeBSD.org>

Comment 2 Bartek Rutkowski freebsd_committer 2015-03-19 19:26:44 UTC
Committed, thanks for your work!