Bug 198190 - Fix security/p5-CryptX build with clang 3.6.0
Summary: Fix security/p5-CryptX 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: Vanilla I. Shu
URL:
Keywords:
Depends on:
Blocks: 197395
  Show dependency treegraph
 
Reported: 2015-03-02 19:29 UTC by Dimitry Andric
Modified: 2015-03-03 07:31 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (vanilla)


Attachments
Change inline const rotate functions to macros (3.08 KB, patch)
2015-03-02 19:29 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 19:29:17 UTC
Created attachment 153677 [details]
Change inline const rotate functions to macros

During the exp-run in bug 197395, it was found that security/p5-CryptX gives errors with clang 3.6.0:

http://package18.nyi.freebsd.org/data/headamd64PR197395-default/2015-02-27_12h37m16s/logs/errors/p5-CryptX-0.021_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 Vanilla I. Shu freebsd_committer 2015-03-03 07:02:54 UTC
Sure, just do it.
Comment 2 commit-hook freebsd_committer 2015-03-03 07:27:49 UTC
A commit references this bug:

Author: dim
Date: Tue Mar  3 07:27:45 UTC 2015
New revision: 380341
URL: https://svnweb.freebsd.org/changeset/ports/380341

Log:
  In the embedded copy of libtomcrypt, change the ROLc/RORc inline
  functions to macros, so the constraints requirements are satisfied at
  compile time.  It is almost exactly the same as the patch for
  libtomcrypt itself, in PR 198017.

  Approved by:	maintainer (vanilla)
  PR:		198190

Changes:
  head/security/p5-CryptX/files/
  head/security/p5-CryptX/files/patch-src__ltc__headerss__tomcrypt_macros.h
Comment 3 Dimitry Andric freebsd_committer 2015-03-03 07:31:35 UTC
Fixed by r380341.