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:
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.
Sure, just do it.
A commit references this bug:
Date: Tue Mar 3 07:27:45 UTC 2015
New revision: 380341
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)
Fixed by r380341.