briansmith / ring

Safe, fast, small crypto using Rust
Other
3.75k stars 704 forks source link

"mips-" support still missing? ("mipsel-" compiles fine) #1866

Closed brocaar closed 9 months ago

brocaar commented 10 months ago

Testing with ring v0.17.7, compiling for mipsel- works fine (e.g. mipsel-unknown-linux-musl), however compiling for mips- (e.g. mips-unknown-linux-musl) returns with an error:

warning: include/ring-core/target.h:63:2: error: #error "Unknown target CPU"
warning:    63 | #error "Unknown target CPU"
Full error ``` The following warnings were emitted during compilation: warning: In file included from include/ring-core/base.h:74, warning: from include/ring-core/mem.h:60, warning: from crypto/curve25519/curve25519.c:22: warning: include/ring-core/target.h:63:2: error: #error "Unknown target CPU" warning: 63 | #error "Unknown target CPU" warning: | ^~~~~ warning: In file included from crypto/curve25519/internal.h:20, warning: from crypto/curve25519/curve25519.c:24: warning: crypto/curve25519/../internal.h:211:2: error: #error "Must define either OPENSSL_32_BIT or OPENSSL_64_BIT" warning: 211 | #error "Must define either OPENSSL_32_BIT or OPENSSL_64_BIT" warning: | ^~~~~ warning: crypto/curve25519/../internal.h:224:15: error: unknown type name 'crypto_word_t' warning: 224 | static inline crypto_word_t value_barrier_w(crypto_word_t a) { warning: | ^~~~~~~~~~~~~ warning: crypto/curve25519/../internal.h:224:45: error: unknown type name 'crypto_word_t' warning: 224 | static inline crypto_word_t value_barrier_w(crypto_word_t a) { warning: | ^~~~~~~~~~~~~ warning: crypto/curve25519/../internal.h:236:15: error: unknown type name 'crypto_word_t' warning: 236 | static inline crypto_word_t constant_time_msb_w(crypto_word_t a) { warning: | ^~~~~~~~~~~~~ warning: crypto/curve25519/../internal.h:236:49: error: unknown type name 'crypto_word_t' warning: 236 | static inline crypto_word_t constant_time_msb_w(crypto_word_t a) { warning: | ^~~~~~~~~~~~~ warning: crypto/curve25519/../internal.h:241:15: error: unknown type name 'crypto_word_t' warning: 241 | static inline crypto_word_t constant_time_is_zero_w(crypto_word_t a) { warning: | ^~~~~~~~~~~~~ warning: crypto/curve25519/../internal.h:241:53: error: unknown type name 'crypto_word_t' warning: 241 | static inline crypto_word_t constant_time_is_zero_w(crypto_word_t a) { warning: | ^~~~~~~~~~~~~ warning: crypto/curve25519/../internal.h:256:15: error: unknown type name 'crypto_word_t' warning: 256 | static inline crypto_word_t constant_time_is_nonzero_w(crypto_word_t a) { warning: | ^~~~~~~~~~~~~ warning: crypto/curve25519/../internal.h:256:56: error: unknown type name 'crypto_word_t' warning: 256 | static inline crypto_word_t constant_time_is_nonzero_w(crypto_word_t a) { warning: | ^~~~~~~~~~~~~ warning: crypto/curve25519/../internal.h:261:15: error: unknown type name 'crypto_word_t' warning: 261 | static inline crypto_word_t constant_time_eq_w(crypto_word_t a, warning: | ^~~~~~~~~~~~~ warning: crypto/curve25519/../internal.h:261:48: error: unknown type name 'crypto_word_t' warning: 261 | static inline crypto_word_t constant_time_eq_w(crypto_word_t a, warning: | ^~~~~~~~~~~~~ warning: crypto/curve25519/../internal.h:262:48: error: unknown type name 'crypto_word_t' warning: 262 | crypto_word_t b) { warning: | ^~~~~~~~~~~~~ warning: crypto/curve25519/../internal.h:269:15: error: unknown type name 'crypto_word_t' warning: 269 | static inline crypto_word_t constant_time_select_w(crypto_word_t mask, warning: | ^~~~~~~~~~~~~ warning: crypto/curve25519/../internal.h:269:52: error: unknown type name 'crypto_word_t' warning: 269 | static inline crypto_word_t constant_time_select_w(crypto_word_t mask, warning: | ^~~~~~~~~~~~~ warning: crypto/curve25519/../internal.h:270:52: error: unknown type name 'crypto_word_t' warning: 270 | crypto_word_t a, warning: | ^~~~~~~~~~~~~ warning: crypto/curve25519/../internal.h:271:52: error: unknown type name 'crypto_word_t' warning: 271 | crypto_word_t b) { warning: | ^~~~~~~~~~~~~ warning: crypto/curve25519/../internal.h:283:46: error: unknown type name 'crypto_word_t' warning: 283 | static inline uint8_t constant_time_select_8(crypto_word_t mask, uint8_t a, warning: | ^~~~~~~~~~~~~ warning: crypto/curve25519/../internal.h:300:59: error: unknown type name 'crypto_word_t' warning: 300 | const crypto_word_t mask) { warning: | ^~~~~~~~~~~~~ warning: crypto/curve25519/../internal.h: In function 'constant_time_conditional_memcpy': warning: crypto/curve25519/../internal.h:305:14: warning: implicit declaration of function 'constant_time_select_8' [-Wimplicit-function-declaration] warning: 305 | out[i] = constant_time_select_8(mask, in[i], out[i]); warning: | ^~~~~~~~~~~~~~~~~~~~~~ warning: crypto/curve25519/../internal.h:305:14: warning: nested extern declaration of 'constant_time_select_8' [-Wnested-externs] warning: crypto/curve25519/../internal.h: At top level: warning: crypto/curve25519/../internal.h:314:59: error: unknown type name 'crypto_word_t' warning: 314 | const crypto_word_t mask) { warning: | ^~~~~~~~~~~~~ warning: crypto/curve25519/../internal.h: In function 'constant_time_conditional_memxor': warning: crypto/curve25519/../internal.h:319:15: warning: implicit declaration of function 'value_barrier_w' [-Wimplicit-function-declaration] warning: 319 | out[i] ^= value_barrier_w(mask) & in[i]; warning: | ^~~~~~~~~~~~~~~ warning: crypto/curve25519/../internal.h:319:15: warning: nested extern declaration of 'value_barrier_w' [-Wnested-externs] warning: crypto/curve25519/../internal.h: At top level: warning: crypto/curve25519/../internal.h:351:15: error: unknown type name 'crypto_word_t' warning: 351 | static inline crypto_word_t constant_time_declassify_w(crypto_word_t v) { warning: | ^~~~~~~~~~~~~ warning: crypto/curve25519/../internal.h:351:56: error: unknown type name 'crypto_word_t' warning: 351 | static inline crypto_word_t constant_time_declassify_w(crypto_word_t v) { warning: | ^~~~~~~~~~~~~ warning: crypto/curve25519/curve25519.c: In function 'x25519_ge_scalarmult_small_precomp': warning: crypto/curve25519/curve25519.c:725:35: warning: implicit declaration of function 'constant_time_eq_w' [-Wimplicit-function-declaration] warning: 725 | cmov(&e, &multiples[j-1], 1&constant_time_eq_w(index, j)); warning: | ^~~~~~~~~~~~~~~~~~ warning: crypto/curve25519/curve25519.c:725:35: warning: nested extern declaration of 'constant_time_eq_w' [-Wnested-externs] error: failed to run custom build command for `ring v0.17.7` Caused by: process didn't exit successfully: `/target/release/build/ring-d0f3c232ff4d944c/build-script-build` (exit status: 1) --- stdout cargo:rerun-if-env-changed=RING_PREGENERATE_ASM cargo:rustc-env=RING_CORE_PREFIX=ring_core_0_17_7_ OPT_LEVEL = Some("z") TARGET = Some("mips-unknown-linux-musl") HOST = Some("x86_64-unknown-linux-gnu") cargo:rerun-if-env-changed=CC_mips-unknown-linux-musl CC_mips-unknown-linux-musl = None cargo:rerun-if-env-changed=CC_mips_unknown_linux_musl CC_mips_unknown_linux_musl = Some("mips-linux-muslsf-gcc") cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS CRATE_CC_NO_DEFAULTS = None DEBUG = Some("false") CARGO_CFG_TARGET_FEATURE = None cargo:rerun-if-env-changed=CFLAGS_mips-unknown-linux-musl CFLAGS_mips-unknown-linux-musl = None cargo:rerun-if-env-changed=CFLAGS_mips_unknown_linux_musl CFLAGS_mips_unknown_linux_musl = None cargo:rerun-if-env-changed=TARGET_CFLAGS TARGET_CFLAGS = None cargo:rerun-if-env-changed=CFLAGS CFLAGS = None ```

@briansmith, looking at https://github.com/briansmith/ring/blob/main/include/ring-core/target.h#L40, I only see __MIPSEL__ definitions. Looking at https://github.com/briansmith/ring/issues/562#issuecomment-407131724, it looks like issue #562 was intended to also implement the mips- targets, but maybe this has changed or this was overlooked?

xen0n commented 10 months ago

1555

Seems the infra is already there, and one only needs to teach the build system to recognize big-endian MIPS.

briansmith commented 10 months ago

PR #1859 was submitted to add the big-endian variant. I asked for a couple of changes. If somebody updates that PR or submits a new one with the requested changes made, I will be happy to merge it.

brocaar commented 10 months ago

Thanks @xen0n and @briansmith for your quick responses. I'm happy to work on the requested changes for #1859. If I'm not mistaken, this is what you are asking for: https://github.com/brocaar/ring/commit/9467d8cd6ac9a6ac7acf4c1056b8cd2390755292.

However, it looks like #1859 might still have some issues. For my project I'm using --target mips-unknown-linux-musl. My build fails with many inlining related warnings:

cargo:warning=crypto/fipsmodule/aes/aes_nohw.c: In function 'aes_nohw_transpose':

  cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:432:20: error: inlining failed in call to 'aes_nohw_swap_bits.constprop': call is unlikely and code size would grow [-Werror=inline]

  cargo:warning=  432 | static inline void aes_nohw_swap_bits(aes_word_t *a, aes_word_t *b,

  cargo:warning=      |                    ^~~~~~~~~~~~~~~~~~

  cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:454:3: note: called from here

  cargo:warning=  454 |   aes_nohw_swap_bits(&batch->w[6], &batch->w[7], 0x55555555, 1);

  cargo:warning=      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:432:20: error: inlining failed in call to 'aes_nohw_swap_bits.constprop': call is unlikely and code size would grow [-Werror=inline]

  cargo:warning=  432 | static inline void aes_nohw_swap_bits(aes_word_t *a, aes_word_t *b,

  cargo:warning=      |                    ^~~~~~~~~~~~~~~~~~

Because of -Werror=inline these are treated as errors.

Full log ``` The following warnings were emitted during compilation: warning: crypto/fipsmodule/aes/aes_nohw.c: In function 'aes_nohw_transpose': warning: crypto/fipsmodule/aes/aes_nohw.c:432:20: error: inlining failed in call to 'aes_nohw_swap_bits.constprop': call is unlikely and code size would grow [-Werror=inline] warning: 432 | static inline void aes_nohw_swap_bits(aes_word_t *a, aes_word_t *b, warning: | ^~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:454:3: note: called from here warning: 454 | aes_nohw_swap_bits(&batch->w[6], &batch->w[7], 0x55555555, 1); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:432:20: error: inlining failed in call to 'aes_nohw_swap_bits.constprop': call is unlikely and code size would grow [-Werror=inline] warning: 432 | static inline void aes_nohw_swap_bits(aes_word_t *a, aes_word_t *b, warning: | ^~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:453:3: note: called from here warning: 453 | aes_nohw_swap_bits(&batch->w[4], &batch->w[5], 0x55555555, 1); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:432:20: error: inlining failed in call to 'aes_nohw_swap_bits.constprop': call is unlikely and code size would grow [-Werror=inline] warning: 432 | static inline void aes_nohw_swap_bits(aes_word_t *a, aes_word_t *b, warning: | ^~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:452:3: note: called from here warning: 452 | aes_nohw_swap_bits(&batch->w[2], &batch->w[3], 0x55555555, 1); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:432:20: error: inlining failed in call to 'aes_nohw_swap_bits.constprop': call is unlikely and code size would grow [-Werror=inline] warning: 432 | static inline void aes_nohw_swap_bits(aes_word_t *a, aes_word_t *b, warning: | ^~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:451:3: note: called from here warning: 451 | aes_nohw_swap_bits(&batch->w[0], &batch->w[1], 0x55555555, 1); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: In file included from crypto/fipsmodule/aes/aes_nohw.c:17: warning: crypto/fipsmodule/aes/aes_nohw.c: In function 'aes_nohw_expand_round_keys': warning: crypto/fipsmodule/aes/../../internal.h:394:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline] warning: 394 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) { warning: | ^~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:773:7: note: called from here warning: 773 | OPENSSL_memcpy(tmp, key->rd_key + 4 * i, 16); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c: In function 'aes_nohw_compact_block': warning: crypto/fipsmodule/aes/aes_nohw.c:306:24: error: inlining failed in call to 'aes_nohw_compact_word': call is unlikely and code size would grow [-Werror=inline] warning: 306 | static inline uint32_t aes_nohw_compact_word(uint32_t a) { warning: | ^~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:361:17: note: called from here warning: 361 | uint32_t a3 = aes_nohw_compact_word(out[3]); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:306:24: error: inlining failed in call to 'aes_nohw_compact_word': call is unlikely and code size would grow [-Werror=inline] warning: 306 | static inline uint32_t aes_nohw_compact_word(uint32_t a) { warning: | ^~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:360:17: note: called from here warning: 360 | uint32_t a2 = aes_nohw_compact_word(out[2]); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:306:24: error: inlining failed in call to 'aes_nohw_compact_word': call is unlikely and code size would grow [-Werror=inline] warning: 306 | static inline uint32_t aes_nohw_compact_word(uint32_t a) { warning: | ^~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:359:17: note: called from here warning: 359 | uint32_t a1 = aes_nohw_compact_word(out[1]); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:306:24: error: inlining failed in call to 'aes_nohw_compact_word': call is unlikely and code size would grow [-Werror=inline] warning: 306 | static inline uint32_t aes_nohw_compact_word(uint32_t a) { warning: | ^~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:358:17: note: called from here warning: 358 | uint32_t a0 = aes_nohw_compact_word(out[0]); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: In file included from crypto/fipsmodule/aes/aes_nohw.c:17: warning: crypto/fipsmodule/aes/../../internal.h:394:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline] warning: 394 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) { warning: | ^~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:349:3: note: called from here warning: 349 | OPENSSL_memcpy(out, in, 16); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: In file included from crypto/fipsmodule/aes/aes_nohw.c:17: warning: crypto/fipsmodule/aes/aes_nohw.c: In function 'aes_nohw_from_batch': warning: crypto/fipsmodule/aes/../../internal.h:394:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline] warning: 394 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) { warning: | ^~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:410:3: note: called from here warning: 410 | OPENSSL_memcpy(out + 12, &b3, 4); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: In file included from crypto/fipsmodule/aes/aes_nohw.c:17: warning: crypto/fipsmodule/aes/../../internal.h:394:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline] warning: 394 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) { warning: | ^~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:409:3: note: called from here warning: 409 | OPENSSL_memcpy(out + 8, &b2, 4); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: In file included from crypto/fipsmodule/aes/aes_nohw.c:17: warning: crypto/fipsmodule/aes/../../internal.h:394:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline] warning: 394 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) { warning: | ^~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:408:3: note: called from here warning: 408 | OPENSSL_memcpy(out + 4, &b1, 4); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: In file included from crypto/fipsmodule/aes/aes_nohw.c:17: warning: crypto/fipsmodule/aes/../../internal.h:394:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline] warning: 394 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) { warning: | ^~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:407:3: note: called from here warning: 407 | OPENSSL_memcpy(out, &b0, 4); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:324:24: error: inlining failed in call to 'aes_nohw_uncompact_word': call is unlikely and code size would grow [-Werror=inline] warning: 324 | static inline uint32_t aes_nohw_uncompact_word(uint32_t a) { warning: | ^~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:406:8: note: called from here warning: 406 | b3 = aes_nohw_uncompact_word(b3); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:324:24: error: inlining failed in call to 'aes_nohw_uncompact_word': call is unlikely and code size would grow [-Werror=inline] warning: 324 | static inline uint32_t aes_nohw_uncompact_word(uint32_t a) { warning: | ^~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:405:8: note: called from here warning: 405 | b2 = aes_nohw_uncompact_word(b2); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:324:24: error: inlining failed in call to 'aes_nohw_uncompact_word': call is unlikely and code size would grow [-Werror=inline] warning: 324 | static inline uint32_t aes_nohw_uncompact_word(uint32_t a) { warning: | ^~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:404:8: note: called from here warning: 404 | b1 = aes_nohw_uncompact_word(b1); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:324:24: error: inlining failed in call to 'aes_nohw_uncompact_word': call is unlikely and code size would grow [-Werror=inline] warning: 324 | static inline uint32_t aes_nohw_uncompact_word(uint32_t a) { warning: | ^~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:403:8: note: called from here warning: 403 | b0 = aes_nohw_uncompact_word(b0); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c: In function 'aes_nohw_to_batch': warning: crypto/fipsmodule/aes/aes_nohw.c:347:20: error: inlining failed in call to 'aes_nohw_compact_block': call is unlikely and code size would grow [-Werror=inline] warning: 347 | static inline void aes_nohw_compact_block(aes_word_t out[AES_NOHW_BLOCK_WORDS], warning: | ^~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:482:5: note: called from here warning: 482 | aes_nohw_compact_block(block, in + 16 * i); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c: In function 'aes_nohw_encrypt_batch': warning: crypto/fipsmodule/aes/aes_nohw.c:691:26: error: inlining failed in call to 'aes_nohw_rotate_rows_twice': call is unlikely and code size would grow [-Werror=inline] warning: 691 | static inline aes_word_t aes_nohw_rotate_rows_twice(aes_word_t v) { warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:748:7: note: called from here warning: 748 | aes_nohw_xor(aes_nohw_xor(a6_r6, r7), aes_nohw_rotate_rows_twice(a7_r7)); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:691:26: error: inlining failed in call to 'aes_nohw_rotate_rows_twice': call is unlikely and code size would grow [-Werror=inline] warning: 691 | static inline aes_word_t aes_nohw_rotate_rows_twice(aes_word_t v) { warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:746:7: note: called from here warning: 746 | aes_nohw_xor(aes_nohw_xor(a5_r5, r6), aes_nohw_rotate_rows_twice(a6_r6)); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:691:26: error: inlining failed in call to 'aes_nohw_rotate_rows_twice': call is unlikely and code size would grow [-Werror=inline] warning: 691 | static inline aes_word_t aes_nohw_rotate_rows_twice(aes_word_t v) { warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:744:7: note: called from here warning: 744 | aes_nohw_xor(aes_nohw_xor(a4_r4, r5), aes_nohw_rotate_rows_twice(a5_r5)); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:691:26: error: inlining failed in call to 'aes_nohw_rotate_rows_twice': call is unlikely and code size would grow [-Werror=inline] warning: 691 | static inline aes_word_t aes_nohw_rotate_rows_twice(aes_word_t v) { warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:741:7: note: called from here warning: 741 | aes_nohw_xor(aes_nohw_xor(a3_r3, a7_r7), warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: 742 | aes_nohw_xor(r4, aes_nohw_rotate_rows_twice(a4_r4))); warning: | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:691:26: error: inlining failed in call to 'aes_nohw_rotate_rows_twice': call is unlikely and code size would grow [-Werror=inline] warning: 691 | static inline aes_word_t aes_nohw_rotate_rows_twice(aes_word_t v) { warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:738:7: note: called from here warning: 738 | aes_nohw_xor(aes_nohw_xor(a2_r2, a7_r7), warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: 739 | aes_nohw_xor(r3, aes_nohw_rotate_rows_twice(a3_r3))); warning: | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:691:26: error: inlining failed in call to 'aes_nohw_rotate_rows_twice': call is unlikely and code size would grow [-Werror=inline] warning: 691 | static inline aes_word_t aes_nohw_rotate_rows_twice(aes_word_t v) { warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:736:7: note: called from here warning: 736 | aes_nohw_xor(aes_nohw_xor(a1_r1, r2), aes_nohw_rotate_rows_twice(a2_r2)); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:691:26: error: inlining failed in call to 'aes_nohw_rotate_rows_twice': call is unlikely and code size would grow [-Werror=inline] warning: 691 | static inline aes_word_t aes_nohw_rotate_rows_twice(aes_word_t v) { warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:733:7: note: called from here warning: 733 | aes_nohw_xor(aes_nohw_xor(a0_r0, a7_r7), warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: 734 | aes_nohw_xor(r1, aes_nohw_rotate_rows_twice(a1_r1))); warning: | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:691:26: error: inlining failed in call to 'aes_nohw_rotate_rows_twice': call is unlikely and code size would grow [-Werror=inline] warning: 691 | static inline aes_word_t aes_nohw_rotate_rows_twice(aes_word_t v) { warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:731:7: note: called from here warning: 731 | aes_nohw_xor(aes_nohw_xor(a7_r7, r0), aes_nohw_rotate_rows_twice(a0_r0)); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:678:26: error: inlining failed in call to 'aes_nohw_rotate_rows_down': call is unlikely and code size would grow [-Werror=inline] warning: 678 | static inline aes_word_t aes_nohw_rotate_rows_down(aes_word_t v) { warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:727:19: note: called from here warning: 727 | aes_word_t r7 = aes_nohw_rotate_rows_down(a7); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:678:26: error: inlining failed in call to 'aes_nohw_rotate_rows_down': call is unlikely and code size would grow [-Werror=inline] warning: 678 | static inline aes_word_t aes_nohw_rotate_rows_down(aes_word_t v) { warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:725:19: note: called from here warning: 725 | aes_word_t r6 = aes_nohw_rotate_rows_down(a6); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:678:26: error: inlining failed in call to 'aes_nohw_rotate_rows_down': call is unlikely and code size would grow [-Werror=inline] warning: 678 | static inline aes_word_t aes_nohw_rotate_rows_down(aes_word_t v) { warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:723:19: note: called from here warning: 723 | aes_word_t r5 = aes_nohw_rotate_rows_down(a5); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:678:26: error: inlining failed in call to 'aes_nohw_rotate_rows_down': call is unlikely and code size would grow [-Werror=inline] warning: 678 | static inline aes_word_t aes_nohw_rotate_rows_down(aes_word_t v) { warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:721:19: note: called from here warning: 721 | aes_word_t r4 = aes_nohw_rotate_rows_down(a4); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:678:26: error: inlining failed in call to 'aes_nohw_rotate_rows_down': call is unlikely and code size would grow [-Werror=inline] warning: 678 | static inline aes_word_t aes_nohw_rotate_rows_down(aes_word_t v) { warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:719:19: note: called from here warning: 719 | aes_word_t r3 = aes_nohw_rotate_rows_down(a3); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:678:26: error: inlining failed in call to 'aes_nohw_rotate_rows_down': call is unlikely and code size would grow [-Werror=inline] warning: 678 | static inline aes_word_t aes_nohw_rotate_rows_down(aes_word_t v) { warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:717:19: note: called from here warning: 717 | aes_word_t r2 = aes_nohw_rotate_rows_down(a2); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:678:26: error: inlining failed in call to 'aes_nohw_rotate_rows_down': call is unlikely and code size would grow [-Werror=inline] warning: 678 | static inline aes_word_t aes_nohw_rotate_rows_down(aes_word_t v) { warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:715:19: note: called from here warning: 715 | aes_word_t r1 = aes_nohw_rotate_rows_down(a1); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:678:26: error: inlining failed in call to 'aes_nohw_rotate_rows_down': call is unlikely and code size would grow [-Werror=inline] warning: 678 | static inline aes_word_t aes_nohw_rotate_rows_down(aes_word_t v) { warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:713:19: note: called from here warning: 713 | aes_word_t r0 = aes_nohw_rotate_rows_down(a0); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: In file included from crypto/fipsmodule/aes/aes_nohw.c:17: warning: crypto/fipsmodule/aes/aes_nohw.c: In function 'ring_core_0_17_5_aes_nohw_set_encrypt_key': warning: crypto/fipsmodule/aes/../../internal.h:394:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline] warning: 394 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) { warning: | ^~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:810:3: note: called from here warning: 810 | OPENSSL_memcpy(key->rd_key, block, 16); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:347:20: error: inlining failed in call to 'aes_nohw_compact_block': call is unlikely and code size would grow [-Werror=inline] warning: 347 | static inline void aes_nohw_compact_block(aes_word_t out[AES_NOHW_BLOCK_WORDS], warning: | ^~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:809:3: note: called from here warning: 809 | aes_nohw_compact_block(block, in); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:678:26: error: inlining failed in call to 'aes_nohw_rotate_rows_down': call is unlikely and code size would grow [-Werror=inline] warning: 678 | static inline aes_word_t aes_nohw_rotate_rows_down(aes_word_t v) { warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:819:18: note: called from here warning: 819 | block[j] = aes_nohw_xor( warning: | ^~~~~~~~~~~~~ warning: 820 | block[j], warning: | ~~~~~~~~~ warning: 821 | aes_nohw_shift_right(aes_nohw_rotate_rows_down(sub[j]), 12)); warning: | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: In file included from crypto/fipsmodule/aes/aes_nohw.c:17: warning: crypto/fipsmodule/aes/../../internal.h:394:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline] warning: 394 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) { warning: | ^~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:829:5: note: called from here warning: 829 | OPENSSL_memcpy(key->rd_key + 4 * i, block, 16); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: In file included from crypto/fipsmodule/aes/aes_nohw.c:17: warning: crypto/fipsmodule/aes/../../internal.h:394:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline] warning: 394 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) { warning: | ^~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:842:3: note: called from here warning: 842 | OPENSSL_memcpy(key->rd_key + 4, block2, 16); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:347:20: error: inlining failed in call to 'aes_nohw_compact_block': call is unlikely and code size would grow [-Werror=inline] warning: 347 | static inline void aes_nohw_compact_block(aes_word_t out[AES_NOHW_BLOCK_WORDS], warning: | ^~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:841:3: note: called from here warning: 841 | aes_nohw_compact_block(block2, in + 16); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: In file included from crypto/fipsmodule/aes/aes_nohw.c:17: warning: crypto/fipsmodule/aes/../../internal.h:394:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline] warning: 394 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) { warning: | ^~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:839:3: note: called from here warning: 839 | OPENSSL_memcpy(key->rd_key, block1, 16); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:347:20: error: inlining failed in call to 'aes_nohw_compact_block': call is unlikely and code size would grow [-Werror=inline] warning: 347 | static inline void aes_nohw_compact_block(aes_word_t out[AES_NOHW_BLOCK_WORDS], warning: | ^~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:838:3: note: called from here warning: 838 | aes_nohw_compact_block(block1, in); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:678:26: error: inlining failed in call to 'aes_nohw_rotate_rows_down': call is unlikely and code size would grow [-Werror=inline] warning: 678 | static inline aes_word_t aes_nohw_rotate_rows_down(aes_word_t v) { warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:851:19: note: called from here warning: 851 | block1[j] = aes_nohw_xor( warning: | ^~~~~~~~~~~~~ warning: 852 | block1[j], warning: | ~~~~~~~~~~ warning: 853 | aes_nohw_shift_right(aes_nohw_rotate_rows_down(sub[j]), 12)); warning: | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: In file included from crypto/fipsmodule/aes/aes_nohw.c:17: warning: crypto/fipsmodule/aes/../../internal.h:394:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline] warning: 394 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) { warning: | ^~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:860:5: note: called from here warning: 860 | OPENSSL_memcpy(key->rd_key + 4 * i, block1, 16); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: In file included from crypto/fipsmodule/aes/aes_nohw.c:17: warning: crypto/fipsmodule/aes/../../internal.h:394:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline] warning: 394 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) { warning: | ^~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:876:5: note: called from here warning: 876 | OPENSSL_memcpy(key->rd_key + 4 * (i + 1), block2, 16); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: In file included from crypto/fipsmodule/aes/aes_nohw.c:17: warning: crypto/fipsmodule/aes/aes_nohw.c: In function 'ring_core_0_17_5_aes_nohw_ctr32_encrypt_blocks': warning: crypto/fipsmodule/aes/../../internal.h:394:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline] warning: 394 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) { warning: | ^~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:930:5: note: called from here warning: 930 | OPENSSL_memcpy(ivs + 16 * i, ivec, 16); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: In file included from crypto/fipsmodule/aes/aes_nohw.c:17: warning: crypto/fipsmodule/aes/../../internal.h:394:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline] warning: 394 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) { warning: | ^~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/../../internal.h:457:3: note: called from here warning: 457 | OPENSSL_memcpy(&v, in, sizeof(v)); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/../../internal.h:394:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline] warning: 394 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) { warning: | ^~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/../../internal.h:469:3: note: called from here warning: 469 | OPENSSL_memcpy(out, &v, sizeof(v)); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/../../internal.h:394:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline] warning: 394 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) { warning: | ^~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:912:5: note: called from here warning: 912 | OPENSSL_memcpy(out + i, &x, sizeof(aes_word_t)); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: In file included from crypto/fipsmodule/aes/aes_nohw.c:17: warning: crypto/fipsmodule/aes/../../internal.h:394:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline] warning: 394 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) { warning: | ^~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:910:5: note: called from here warning: 910 | OPENSSL_memcpy(&y, b + i, sizeof(aes_word_t)); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: In file included from crypto/fipsmodule/aes/aes_nohw.c:17: warning: crypto/fipsmodule/aes/../../internal.h:394:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline] warning: 394 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) { warning: | ^~~~~~~~~~~~~~ warning: crypto/fipsmodule/aes/aes_nohw.c:909:5: note: called from here warning: 909 | OPENSSL_memcpy(&x, a + i, sizeof(aes_word_t)); warning: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: cc1: all warnings being treated as errors error: failed to run custom build command for `ring v0.17.5 (https://github.com/CyberHive/ring.git?branch=mips_be_32_support_only#9081c70b)` Caused by: process didn't exit successfully: `/target/release/build/ring-06b53e4cb84aafa5/build-script-build` (exit status: 1) --- stdout cargo:rerun-if-env-changed=RING_PREGENERATE_ASM cargo:rustc-env=RING_CORE_PREFIX=ring_core_0_17_5_ OPT_LEVEL = Some("z") TARGET = Some("mips-unknown-linux-musl") HOST = Some("x86_64-unknown-linux-gnu") cargo:rerun-if-env-changed=CC_mips-unknown-linux-musl CC_mips-unknown-linux-musl = None cargo:rerun-if-env-changed=CC_mips_unknown_linux_musl CC_mips_unknown_linux_musl = Some("mips-linux-muslsf-gcc") cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS CRATE_CC_NO_DEFAULTS = None DEBUG = Some("false") CARGO_CFG_TARGET_FEATURE = None cargo:rerun-if-env-changed=CFLAGS_mips-unknown-linux-musl CFLAGS_mips-unknown-linux-musl = None cargo:rerun-if-env-changed=CFLAGS_mips_unknown_linux_musl CFLAGS_mips_unknown_linux_musl = None cargo:rerun-if-env-changed=TARGET_CFLAGS TARGET_CFLAGS = None cargo:rerun-if-env-changed=CFLAGS CFLAGS = None running: "mips-linux-muslsf-gcc" "-Os" "-ffunction-sections" "-fdata-sections" "-fPIC" "-I" "include" "-I" "/target/mips-unknown-linux-musl/release/build/ring-f77d28f8c2a58fbf/out" "-Wall" "-Wextra" "-fvisibility=hidden" "-std=c1x" "-pedantic" "-Wall" "-Wextra" "-Wbad-function-cast" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wnested-externs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wstrict-prototypes" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-g3" "-DNDEBUG" "-Werror" "-o" "/target/mips-unknown-linux-musl/release/build/ring-f77d28f8c2a58fbf/out/crypto/curve25519/curve25519.o" "-c" "crypto/curve25519/curve25519.c" exit status: 0 running: "mips-linux-muslsf-gcc" "-Os" "-ffunction-sections" "-fdata-sections" "-fPIC" "-I" "include" "-I" "/target/mips-unknown-linux-musl/release/build/ring-f77d28f8c2a58fbf/out" "-Wall" "-Wextra" "-fvisibility=hidden" "-std=c1x" "-pedantic" "-Wall" "-Wextra" "-Wbad-function-cast" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wnested-externs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wstrict-prototypes" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-g3" "-DNDEBUG" "-Werror" "-o" "/target/mips-unknown-linux-musl/release/build/ring-f77d28f8c2a58fbf/out/crypto/fipsmodule/aes/aes_nohw.o" "-c" "crypto/fipsmodule/aes/aes_nohw.c" cargo:warning=crypto/fipsmodule/aes/aes_nohw.c: In function 'aes_nohw_transpose': cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:432:20: error: inlining failed in call to 'aes_nohw_swap_bits.constprop': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 432 | static inline void aes_nohw_swap_bits(aes_word_t *a, aes_word_t *b, cargo:warning= | ^~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:454:3: note: called from here cargo:warning= 454 | aes_nohw_swap_bits(&batch->w[6], &batch->w[7], 0x55555555, 1); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:432:20: error: inlining failed in call to 'aes_nohw_swap_bits.constprop': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 432 | static inline void aes_nohw_swap_bits(aes_word_t *a, aes_word_t *b, cargo:warning= | ^~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:453:3: note: called from here cargo:warning= 453 | aes_nohw_swap_bits(&batch->w[4], &batch->w[5], 0x55555555, 1); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:432:20: error: inlining failed in call to 'aes_nohw_swap_bits.constprop': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 432 | static inline void aes_nohw_swap_bits(aes_word_t *a, aes_word_t *b, cargo:warning= | ^~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:452:3: note: called from here cargo:warning= 452 | aes_nohw_swap_bits(&batch->w[2], &batch->w[3], 0x55555555, 1); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:432:20: error: inlining failed in call to 'aes_nohw_swap_bits.constprop': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 432 | static inline void aes_nohw_swap_bits(aes_word_t *a, aes_word_t *b, cargo:warning= | ^~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:451:3: note: called from here cargo:warning= 451 | aes_nohw_swap_bits(&batch->w[0], &batch->w[1], 0x55555555, 1); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=In file included from crypto/fipsmodule/aes/aes_nohw.c:17: cargo:warning=crypto/fipsmodule/aes/aes_nohw.c: In function 'aes_nohw_expand_round_keys': cargo:warning=crypto/fipsmodule/aes/../../internal.h:394:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 394 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) { cargo:warning= | ^~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:773:7: note: called from here cargo:warning= 773 | OPENSSL_memcpy(tmp, key->rd_key + 4 * i, 16); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c: In function 'aes_nohw_compact_block': cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:306:24: error: inlining failed in call to 'aes_nohw_compact_word': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 306 | static inline uint32_t aes_nohw_compact_word(uint32_t a) { cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:361:17: note: called from here cargo:warning= 361 | uint32_t a3 = aes_nohw_compact_word(out[3]); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:306:24: error: inlining failed in call to 'aes_nohw_compact_word': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 306 | static inline uint32_t aes_nohw_compact_word(uint32_t a) { cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:360:17: note: called from here cargo:warning= 360 | uint32_t a2 = aes_nohw_compact_word(out[2]); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:306:24: error: inlining failed in call to 'aes_nohw_compact_word': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 306 | static inline uint32_t aes_nohw_compact_word(uint32_t a) { cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:359:17: note: called from here cargo:warning= 359 | uint32_t a1 = aes_nohw_compact_word(out[1]); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:306:24: error: inlining failed in call to 'aes_nohw_compact_word': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 306 | static inline uint32_t aes_nohw_compact_word(uint32_t a) { cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:358:17: note: called from here cargo:warning= 358 | uint32_t a0 = aes_nohw_compact_word(out[0]); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=In file included from crypto/fipsmodule/aes/aes_nohw.c:17: cargo:warning=crypto/fipsmodule/aes/../../internal.h:394:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 394 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) { cargo:warning= | ^~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:349:3: note: called from here cargo:warning= 349 | OPENSSL_memcpy(out, in, 16); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=In file included from crypto/fipsmodule/aes/aes_nohw.c:17: cargo:warning=crypto/fipsmodule/aes/aes_nohw.c: In function 'aes_nohw_from_batch': cargo:warning=crypto/fipsmodule/aes/../../internal.h:394:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 394 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) { cargo:warning= | ^~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:410:3: note: called from here cargo:warning= 410 | OPENSSL_memcpy(out + 12, &b3, 4); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=In file included from crypto/fipsmodule/aes/aes_nohw.c:17: cargo:warning=crypto/fipsmodule/aes/../../internal.h:394:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 394 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) { cargo:warning= | ^~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:409:3: note: called from here cargo:warning= 409 | OPENSSL_memcpy(out + 8, &b2, 4); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=In file included from crypto/fipsmodule/aes/aes_nohw.c:17: cargo:warning=crypto/fipsmodule/aes/../../internal.h:394:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 394 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) { cargo:warning= | ^~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:408:3: note: called from here cargo:warning= 408 | OPENSSL_memcpy(out + 4, &b1, 4); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=In file included from crypto/fipsmodule/aes/aes_nohw.c:17: cargo:warning=crypto/fipsmodule/aes/../../internal.h:394:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 394 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) { cargo:warning= | ^~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:407:3: note: called from here cargo:warning= 407 | OPENSSL_memcpy(out, &b0, 4); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:324:24: error: inlining failed in call to 'aes_nohw_uncompact_word': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 324 | static inline uint32_t aes_nohw_uncompact_word(uint32_t a) { cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:406:8: note: called from here cargo:warning= 406 | b3 = aes_nohw_uncompact_word(b3); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:324:24: error: inlining failed in call to 'aes_nohw_uncompact_word': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 324 | static inline uint32_t aes_nohw_uncompact_word(uint32_t a) { cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:405:8: note: called from here cargo:warning= 405 | b2 = aes_nohw_uncompact_word(b2); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:324:24: error: inlining failed in call to 'aes_nohw_uncompact_word': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 324 | static inline uint32_t aes_nohw_uncompact_word(uint32_t a) { cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:404:8: note: called from here cargo:warning= 404 | b1 = aes_nohw_uncompact_word(b1); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:324:24: error: inlining failed in call to 'aes_nohw_uncompact_word': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 324 | static inline uint32_t aes_nohw_uncompact_word(uint32_t a) { cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:403:8: note: called from here cargo:warning= 403 | b0 = aes_nohw_uncompact_word(b0); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c: In function 'aes_nohw_to_batch': cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:347:20: error: inlining failed in call to 'aes_nohw_compact_block': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 347 | static inline void aes_nohw_compact_block(aes_word_t out[AES_NOHW_BLOCK_WORDS], cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:482:5: note: called from here cargo:warning= 482 | aes_nohw_compact_block(block, in + 16 * i); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c: In function 'aes_nohw_encrypt_batch': cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:691:26: error: inlining failed in call to 'aes_nohw_rotate_rows_twice': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 691 | static inline aes_word_t aes_nohw_rotate_rows_twice(aes_word_t v) { cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:748:7: note: called from here cargo:warning= 748 | aes_nohw_xor(aes_nohw_xor(a6_r6, r7), aes_nohw_rotate_rows_twice(a7_r7)); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:691:26: error: inlining failed in call to 'aes_nohw_rotate_rows_twice': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 691 | static inline aes_word_t aes_nohw_rotate_rows_twice(aes_word_t v) { cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:746:7: note: called from here cargo:warning= 746 | aes_nohw_xor(aes_nohw_xor(a5_r5, r6), aes_nohw_rotate_rows_twice(a6_r6)); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:691:26: error: inlining failed in call to 'aes_nohw_rotate_rows_twice': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 691 | static inline aes_word_t aes_nohw_rotate_rows_twice(aes_word_t v) { cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:744:7: note: called from here cargo:warning= 744 | aes_nohw_xor(aes_nohw_xor(a4_r4, r5), aes_nohw_rotate_rows_twice(a5_r5)); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:691:26: error: inlining failed in call to 'aes_nohw_rotate_rows_twice': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 691 | static inline aes_word_t aes_nohw_rotate_rows_twice(aes_word_t v) { cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:741:7: note: called from here cargo:warning= 741 | aes_nohw_xor(aes_nohw_xor(a3_r3, a7_r7), cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning= 742 | aes_nohw_xor(r4, aes_nohw_rotate_rows_twice(a4_r4))); cargo:warning= | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:691:26: error: inlining failed in call to 'aes_nohw_rotate_rows_twice': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 691 | static inline aes_word_t aes_nohw_rotate_rows_twice(aes_word_t v) { cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:738:7: note: called from here cargo:warning= 738 | aes_nohw_xor(aes_nohw_xor(a2_r2, a7_r7), cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning= 739 | aes_nohw_xor(r3, aes_nohw_rotate_rows_twice(a3_r3))); cargo:warning= | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:691:26: error: inlining failed in call to 'aes_nohw_rotate_rows_twice': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 691 | static inline aes_word_t aes_nohw_rotate_rows_twice(aes_word_t v) { cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:736:7: note: called from here cargo:warning= 736 | aes_nohw_xor(aes_nohw_xor(a1_r1, r2), aes_nohw_rotate_rows_twice(a2_r2)); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:691:26: error: inlining failed in call to 'aes_nohw_rotate_rows_twice': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 691 | static inline aes_word_t aes_nohw_rotate_rows_twice(aes_word_t v) { cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:733:7: note: called from here cargo:warning= 733 | aes_nohw_xor(aes_nohw_xor(a0_r0, a7_r7), cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning= 734 | aes_nohw_xor(r1, aes_nohw_rotate_rows_twice(a1_r1))); cargo:warning= | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:691:26: error: inlining failed in call to 'aes_nohw_rotate_rows_twice': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 691 | static inline aes_word_t aes_nohw_rotate_rows_twice(aes_word_t v) { cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:731:7: note: called from here cargo:warning= 731 | aes_nohw_xor(aes_nohw_xor(a7_r7, r0), aes_nohw_rotate_rows_twice(a0_r0)); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:678:26: error: inlining failed in call to 'aes_nohw_rotate_rows_down': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 678 | static inline aes_word_t aes_nohw_rotate_rows_down(aes_word_t v) { cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:727:19: note: called from here cargo:warning= 727 | aes_word_t r7 = aes_nohw_rotate_rows_down(a7); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:678:26: error: inlining failed in call to 'aes_nohw_rotate_rows_down': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 678 | static inline aes_word_t aes_nohw_rotate_rows_down(aes_word_t v) { cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:725:19: note: called from here cargo:warning= 725 | aes_word_t r6 = aes_nohw_rotate_rows_down(a6); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:678:26: error: inlining failed in call to 'aes_nohw_rotate_rows_down': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 678 | static inline aes_word_t aes_nohw_rotate_rows_down(aes_word_t v) { cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:723:19: note: called from here cargo:warning= 723 | aes_word_t r5 = aes_nohw_rotate_rows_down(a5); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:678:26: error: inlining failed in call to 'aes_nohw_rotate_rows_down': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 678 | static inline aes_word_t aes_nohw_rotate_rows_down(aes_word_t v) { cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:721:19: note: called from here cargo:warning= 721 | aes_word_t r4 = aes_nohw_rotate_rows_down(a4); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:678:26: error: inlining failed in call to 'aes_nohw_rotate_rows_down': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 678 | static inline aes_word_t aes_nohw_rotate_rows_down(aes_word_t v) { cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:719:19: note: called from here cargo:warning= 719 | aes_word_t r3 = aes_nohw_rotate_rows_down(a3); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:678:26: error: inlining failed in call to 'aes_nohw_rotate_rows_down': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 678 | static inline aes_word_t aes_nohw_rotate_rows_down(aes_word_t v) { cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:717:19: note: called from here cargo:warning= 717 | aes_word_t r2 = aes_nohw_rotate_rows_down(a2); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:678:26: error: inlining failed in call to 'aes_nohw_rotate_rows_down': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 678 | static inline aes_word_t aes_nohw_rotate_rows_down(aes_word_t v) { cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:715:19: note: called from here cargo:warning= 715 | aes_word_t r1 = aes_nohw_rotate_rows_down(a1); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:678:26: error: inlining failed in call to 'aes_nohw_rotate_rows_down': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 678 | static inline aes_word_t aes_nohw_rotate_rows_down(aes_word_t v) { cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:713:19: note: called from here cargo:warning= 713 | aes_word_t r0 = aes_nohw_rotate_rows_down(a0); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=In file included from crypto/fipsmodule/aes/aes_nohw.c:17: cargo:warning=crypto/fipsmodule/aes/aes_nohw.c: In function 'ring_core_0_17_5_aes_nohw_set_encrypt_key': cargo:warning=crypto/fipsmodule/aes/../../internal.h:394:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 394 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) { cargo:warning= | ^~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:810:3: note: called from here cargo:warning= 810 | OPENSSL_memcpy(key->rd_key, block, 16); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:347:20: error: inlining failed in call to 'aes_nohw_compact_block': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 347 | static inline void aes_nohw_compact_block(aes_word_t out[AES_NOHW_BLOCK_WORDS], cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:809:3: note: called from here cargo:warning= 809 | aes_nohw_compact_block(block, in); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:678:26: error: inlining failed in call to 'aes_nohw_rotate_rows_down': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 678 | static inline aes_word_t aes_nohw_rotate_rows_down(aes_word_t v) { cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:819:18: note: called from here cargo:warning= 819 | block[j] = aes_nohw_xor( cargo:warning= | ^~~~~~~~~~~~~ cargo:warning= 820 | block[j], cargo:warning= | ~~~~~~~~~ cargo:warning= 821 | aes_nohw_shift_right(aes_nohw_rotate_rows_down(sub[j]), 12)); cargo:warning= | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=In file included from crypto/fipsmodule/aes/aes_nohw.c:17: cargo:warning=crypto/fipsmodule/aes/../../internal.h:394:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 394 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) { cargo:warning= | ^~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:829:5: note: called from here cargo:warning= 829 | OPENSSL_memcpy(key->rd_key + 4 * i, block, 16); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=In file included from crypto/fipsmodule/aes/aes_nohw.c:17: cargo:warning=crypto/fipsmodule/aes/../../internal.h:394:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 394 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) { cargo:warning= | ^~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:842:3: note: called from here cargo:warning= 842 | OPENSSL_memcpy(key->rd_key + 4, block2, 16); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:347:20: error: inlining failed in call to 'aes_nohw_compact_block': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 347 | static inline void aes_nohw_compact_block(aes_word_t out[AES_NOHW_BLOCK_WORDS], cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:841:3: note: called from here cargo:warning= 841 | aes_nohw_compact_block(block2, in + 16); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=In file included from crypto/fipsmodule/aes/aes_nohw.c:17: cargo:warning=crypto/fipsmodule/aes/../../internal.h:394:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 394 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) { cargo:warning= | ^~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:839:3: note: called from here cargo:warning= 839 | OPENSSL_memcpy(key->rd_key, block1, 16); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:347:20: error: inlining failed in call to 'aes_nohw_compact_block': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 347 | static inline void aes_nohw_compact_block(aes_word_t out[AES_NOHW_BLOCK_WORDS], cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:838:3: note: called from here cargo:warning= 838 | aes_nohw_compact_block(block1, in); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:678:26: error: inlining failed in call to 'aes_nohw_rotate_rows_down': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 678 | static inline aes_word_t aes_nohw_rotate_rows_down(aes_word_t v) { cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:851:19: note: called from here cargo:warning= 851 | block1[j] = aes_nohw_xor( cargo:warning= | ^~~~~~~~~~~~~ cargo:warning= 852 | block1[j], cargo:warning= | ~~~~~~~~~~ cargo:warning= 853 | aes_nohw_shift_right(aes_nohw_rotate_rows_down(sub[j]), 12)); cargo:warning= | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=In file included from crypto/fipsmodule/aes/aes_nohw.c:17: cargo:warning=crypto/fipsmodule/aes/../../internal.h:394:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 394 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) { cargo:warning= | ^~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:860:5: note: called from here cargo:warning= 860 | OPENSSL_memcpy(key->rd_key + 4 * i, block1, 16); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=In file included from crypto/fipsmodule/aes/aes_nohw.c:17: cargo:warning=crypto/fipsmodule/aes/../../internal.h:394:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 394 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) { cargo:warning= | ^~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:876:5: note: called from here cargo:warning= 876 | OPENSSL_memcpy(key->rd_key + 4 * (i + 1), block2, 16); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=In file included from crypto/fipsmodule/aes/aes_nohw.c:17: cargo:warning=crypto/fipsmodule/aes/aes_nohw.c: In function 'ring_core_0_17_5_aes_nohw_ctr32_encrypt_blocks': cargo:warning=crypto/fipsmodule/aes/../../internal.h:394:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 394 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) { cargo:warning= | ^~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:930:5: note: called from here cargo:warning= 930 | OPENSSL_memcpy(ivs + 16 * i, ivec, 16); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=In file included from crypto/fipsmodule/aes/aes_nohw.c:17: cargo:warning=crypto/fipsmodule/aes/../../internal.h:394:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 394 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) { cargo:warning= | ^~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/../../internal.h:457:3: note: called from here cargo:warning= 457 | OPENSSL_memcpy(&v, in, sizeof(v)); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/../../internal.h:394:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 394 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) { cargo:warning= | ^~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/../../internal.h:469:3: note: called from here cargo:warning= 469 | OPENSSL_memcpy(out, &v, sizeof(v)); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/../../internal.h:394:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 394 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) { cargo:warning= | ^~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:912:5: note: called from here cargo:warning= 912 | OPENSSL_memcpy(out + i, &x, sizeof(aes_word_t)); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=In file included from crypto/fipsmodule/aes/aes_nohw.c:17: cargo:warning=crypto/fipsmodule/aes/../../internal.h:394:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 394 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) { cargo:warning= | ^~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:910:5: note: called from here cargo:warning= 910 | OPENSSL_memcpy(&y, b + i, sizeof(aes_word_t)); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=In file included from crypto/fipsmodule/aes/aes_nohw.c:17: cargo:warning=crypto/fipsmodule/aes/../../internal.h:394:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline] cargo:warning= 394 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) { cargo:warning= | ^~~~~~~~~~~~~~ cargo:warning=crypto/fipsmodule/aes/aes_nohw.c:909:5: note: called from here cargo:warning= 909 | OPENSSL_memcpy(&x, a + i, sizeof(aes_word_t)); cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=cc1: all warnings being treated as errors exit status: 1 --- stderr ```

Any idea if there is something else that needs to be changed?

DavidHorton5339 commented 10 months ago

I'm updating PR 1859 with requested changes. Sorry about the delay - other priorities took precedence.

briansmith commented 10 months ago

Because of -Werror=inline these are treated as errors.

@brocaar Are you building optimized for size? And/or using PGO? One thing I can say is that if you are using AES at all then these functions are definitely not "unlikely" and AFAICT really do benefit a lot from inlining, so perhaps it is worth it for us to try to convince the compiler to do the inlining against its own judgement.

brocaar commented 10 months ago

@briansmith, you are right, this was triggered by opt-level set to "z" or "s" (in both cases it would fail). With 3 I can compile my code fine.

vavrecan commented 10 months ago

I had this command "mips-openwrt-linux-musl-gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-Os" "-pipe" "-mno-branch-likely" "-mips32r2" "-mtune=24kc" "-fno-caller-saves" "-fno-plt" "-fhonour-copts" "-msoft-float" "-mips16" "-minterlink-mips16" "-Wformat" "-Werror=format-security" "-fstack-protector" "-D_FORTIFY_SOURCE=1" "-Wl,-z,now" "-Wl,-z,relro" "-fvisibility=hidden" "-std=c1x" "-pedantic" "-Wall" "-Wextra" "-Wbad-function-cast" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wnested-externs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wstrict-prototypes" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-g3" "-DNDEBUG" "-Werror" ... and what helped was to add -Wno-error=inline

briansmith commented 9 months ago

Does anybody here have a suggestion for how we can annotate the code in aes_nohw.c to tell the compiler that, even if the compiler optimization setting is to optimize for size by default, that it should do this inlining and not worry if it would grow the code?

brocaar commented 9 months ago

@briansmith I'm not sure if this is related to my development environment or applies to all, but I noticed that when using [patch.crates-io] this issue occured and without not, even when the line under [patch.crates-io] would point to the latest ring version on crates.io. So maybe this is not an issue at all?

DavidHorton5339 commented 9 months ago

@brocaar the difference you might have noticed is that referencing crates.io uses prebuilt version of ring. If you patch it (to point to a git reference or local drive) you will cause code to be built - and any compiler warnings generated.

DavidHorton5339 commented 9 months ago

@briansmith __attribute__((always_inline)) might help (and remove inline keyword). This works differently from inline keyword, in terms of its coupling to optimisation levels. So, I think it's worth a try. BTW regarding portability the build already seems wedded to GNU-specific extensions elsewhere, so I'd be less worried about this than in otherwise portable code.

briansmith commented 9 months ago

@briansmith I'm not sure if this is related to my development environment or applies to all, but I noticed that when using [patch.crates-io] this issue occured and without not, even when the line under [patch.crates-io] would point to the latest ring version on crates.io. So maybe this is not an issue at all?

We only enable -Werror when building from Git (.git is present) to avoid the build failing unnecessarily when people are building from crates.io. Search build.rs for .git to see what I mean. The idea is to be stricter during development without risking build breakage "in production." Admittedly, it doesn't work well for certain ways of vendoring though.

DavidHorton5339 commented 9 months ago

New PR https://github.com/briansmith/ring/pull/1894 raised for MIPS BE support. @briansmith Unfortunately when I tested the latest code I found a couple of issues that affect not only MIPS but other targets too: https://github.com/briansmith/ring/issues/1895 https://github.com/briansmith/ring/issues/1896 As they don't just affect MIPS BE I've reported them separately from my PR.

briansmith commented 9 months ago

I merged a slightly tweaked versoin of @DavidHorton5339's PR as part of #1910. I also added all the supported MIPS targets to ring's CI, tested only on the Rust 1.71.0 toolchain. I expect this will be released as part of ring 0.17.8 next week.

Ragnt commented 8 months ago

@briansmith any word on that 0.17.8 release with these changes on crates.io?

deadash commented 6 months ago

To enable compilation for MIPS64, you only need to add the following code under the existing code in include/ring-core/target.h:

#elif defined(__MIPSEB__) && !defined(__LP64__)
#define OPENSSL_32_BIT

Add this:

#elif defined(__MIPSEB__) && defined(__LP64__)
#define OPENSSL_64_BIT

This will configure the system to use MIPS64.