-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backport 2.28: Fix compiling AESNI in Mbed-TLS with clang on Windows #8373
Conversation
32bedcf
to
9812d2f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor code style issue.
Have you checked this work on 2.28
branch?
library/aesni.c
Outdated
@@ -191,7 +191,7 @@ void mbedtls_aesni_gcm_mult(unsigned char c[16], | |||
const unsigned char a[16], | |||
const unsigned char b[16]) | |||
{ | |||
__m128i aa, bb, cc, dd; | |||
__m128i aa = {0}, bb = {0}, cc, dd; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code style
__m128i aa = {0}, bb = {0}, cc, dd; | |
__m128i aa = { 0 }, bb = { 0 }, cc, dd; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. BTW clang thought the variables were not initialized and raised errors with -Werror
.
9812d2f
to
33d9e55
Compare
Yes, of course. I use the LTS version, hence I have fixed the compiling issue here and then in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
b583107
33d9e55
to
b583107
Compare
…indows It can successfully compile w/ or w/o the clang options -maes -mpclmul. Signed-off-by: Sergey Markelov <sergey@solidstatenetworks.com>
b583107
to
9902a6b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I don't know why my PR is kicked out the merge queue. How can I investigate it? |
Merge queue failure seems to be spurious, need to resubmit. |
Weird infrastructure failure on the merge queue:
This is a new error to me, but it seems to happen often since a day or two ago. Same error in #8374. |
Description
Fixes #8372. Does not conflict with #8339.
It can successfully compile w/ or w/o the clang options
-maes -mpclmul
.The macro
__GNUC__
is not defined by Clang on Windows, thus use the macro__clang__
for-maes -mpclmul
.PR checklist
Please tick as appropriate and edit the reasons (e.g.: "backport: not needed because this is a new feature")