Strongswan: enable rdrand and aes-ni only on X86 #21548
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation for this change
Strongswan fails to compile on armv7l-linux with
--enable-aesni
and--enable-rdrand
enabled. Errors are thrown about impossible constraints in asm (--enable-rdrand
) or about gcc getting unknown command line parameters about aes (--enable-aesni
). The options only makes sense on X86_64 processors.The rdrand plugin is designed for Ivy Bridge processors:
The aes-ni plugin also only exists on X86 processors (which have the AES instruction set)
Tested with a local override. The change triggers a (successful) rebuild on my X86_64 system (purely because of the changed order of options). On armv7-linux this change fixes build errors.
See for a similar issue:
https://wiki.strongswan.org/issues/337