Bug 198206

Summary: Fix games/stepmania-devel build with clang 3.6.0
Product: Ports & Packages Reporter: Dimitry Andric <dim>
Component: Individual Port(s)Assignee: Bartek Rutkowski <robak>
Status: Closed FIXED    
Severity: Affects Many People CC: robak
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 197395    
Attachments:
Description Flags
Change inline const rotate functions to macros none

Description Dimitry Andric freebsd_committer freebsd_triage 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:

http://package18.nyi.freebsd.org/data/headamd64PR197395-default/2015-02-27_12h37m16s/logs/errors/stepmania-devel-5.0.a3_4,1.log

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 freebsd_triage 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

Log:
  games/stepmania-devel: fix clang 3.6 build

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

Changes:
  head/games/stepmania-devel/files/patch-tomcrypt_macros.h
Comment 2 Bartek Rutkowski freebsd_committer freebsd_triage 2015-03-19 19:26:44 UTC
Committed, thanks for your work!