-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Subdir Makefiles' compiler flags #5599
Subdir Makefiles' compiler flags #5599
Conversation
Interesting side effect of -std=c99
I take it johnswap.h isn't sourced... but then how could it work without -std=c99? |
But it is, and there seems to be a bug in it not surfaced in all these years until now. The logic ifdef chain doesn't end with a blind #else and I suppose none of the alternatives gets a hit. #if defined __GNUC__ && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 3) || (__GNUC__ > 4))
(...)
#elif (_MSC_VER > 1300) && (_M_IX86 >= 400 || defined(CPU_IA32) || defined(CPU_X64)) /* MS VC */
(...)
#elif !defined(__STRICT_ANSI__)
(...)
#endif The failing bots run clang. |
Oh, clang sets these to indicate gcc 4.2.1 compatibility:
It's a near miss (or near hit?), which luckily uncovered the bug for us. |
If I change the |
Yes it had DOS LF so should never have been permitted into the repo. From what I can see, my editor added the line with CRLF (as the rest of the file was like that) but there may be some git crlf magic involved. I'll fixup with that whole file converted to proper line ending. EDIT: Apparently I inadvertently edited this comment instead of replying to it /magnum |
Confirmed, adding I'll just drop it in favor of a plain |
b40df81
to
5059999
Compare
The addition of -std=c99 has strange results on super:
Here's the offending code declaration: typedef struct dyna_salt_t {
size_t salt_cmp_size;
struct { /* bit field stealing one bit of the size_t */
size_t salt_alloc_needs_free : 1; /* 1 if if malloc/calloc used */
size_t salt_cmp_offset : (sizeof(size_t) * 8 - 1);
};
} dyna_salt; |
I am stumped. I changed the confusing struct/typedef names to this [because in other places typedef struct dyna_salt_s {
size_t salt_cmp_size;
struct { /* bit field stealing one bit of the size_t */
size_t salt_alloc_needs_free : 1; /* 1 if if malloc/calloc used */
size_t salt_cmp_offset : (sizeof(size_t) * 8 - 1);
};
} dyna_salt_t; Giving up for now, need sleep |
Oh, apparently you're not allowed to use |
cb36a14
to
ff85f01
Compare
I'm dropping that C99 thing for now, that'll be a later PR. There are more problems with it. It's about anonymous unions/structs. Maybe -std=gnu99 is an option, maybe not. |
Unrelated to this PR, but I notice this says |
Right, but this predates our
Sounds good, but ideally that would be a separate commit just before your commit that makes the actual change. |
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.
Let's get this in first and then revisit the C99 stuff separately.
|
This commit only applies to autoconf builds. Closes openwall#5598
This is for x86 AES-NI, intrinsics version. Closes openwall#5593
It would already be supported by the -native targets. See openwall#5593
ff85f01
to
d9530bd
Compare
In separate commits:
Add -std=c99 globally, if compiler supports itNeeds testing on non-intel, and more importantly on intel that doesn't support AES-NI
Legacy Makefiles not yet amended for AES-NI (will discuss in #5593)