Skip to content

Commit

Permalink
crypto: sha3-generic - Use __optimize to support old compilers
Browse files Browse the repository at this point in the history
With gcc-4.1.2:

    crypto/sha3_generic.c:39: warning: ‘__optimize__’ attribute directive ignored

Use the newly introduced __optimize macro to fix this.

Fixes: 83dee2c ("crypto: sha3-generic - rewrite KECCAK transform to help the compiler optimize")
Signed-off-by: Geert Uytterhoeven <[email protected]>
Acked-by: Ard Biesheuvel <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
geertu authored and herbertx committed Feb 8, 2018
1 parent d9afaaa commit ba916b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crypto/sha3_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ static SHA3_INLINE void keccakf_round(u64 st[25])
st[24] ^= bc[ 4];
}

static void __attribute__((__optimize__("O3"))) keccakf(u64 st[25])
static void __optimize("O3") keccakf(u64 st[25])
{
int round;

Expand Down

0 comments on commit ba916b6

Please sign in to comment.