clux / muslrust

Docker environment for building musl based static linux rust binaries
MIT License
965 stars 88 forks source link

How to disable `cc1: all warnings being treated as errors` #121

Closed honne23 closed 1 year ago

honne23 commented 1 year ago

I am compiling a crate with the following dependency:

[dependencies]
ring = { git = "https://github.com/briansmith/ring.git", rev = "450ada2", default-features = false }

Which causes a build failure due to a warning (as the dependency is still a work in progress due to WASM support). Is there a way to disable this behaviour in order to get the build working while the dependency is in progress?

#14 322.7 error: failed to run custom build command for `ring v0.17.0-not-released-yet (https://github.com/briansmith/ring.git?rev=450ada2#450ada28)`
#14 322.7
#14 322.7 Caused by:
#14 322.7   process didn't exit successfully: `/volume/target/release-wasm/build/ring-fd9af10838acefbc/build-script-build` (exit status: 101)
#14 322.7   --- stdout
#14 322.7   cargo:rerun-if-env-changed=RING_PREGENERATE_ASM
#14 322.7   cargo:rustc-env=RING_CORE_PREFIX=ring_core_0_17_0_not_released_yet_
#14 322.7   OPT_LEVEL = Some("z")
#14 322.7   TARGET = Some("wasm32-unknown-unknown")
#14 322.7   HOST = Some("x86_64-unknown-linux-gnu")
#14 322.7   cargo:rerun-if-env-changed=CC_wasm32-unknown-unknown
#14 322.7   CC_wasm32-unknown-unknown = None
#14 322.7   cargo:rerun-if-env-changed=CC_wasm32_unknown_unknown
#14 322.7   CC_wasm32_unknown_unknown = None
#14 322.7   cargo:rerun-if-env-changed=TARGET_CC
#14 322.7   TARGET_CC = None
#14 322.7   cargo:rerun-if-env-changed=CC
#14 322.7   CC = Some("musl-gcc")
#14 322.7   cargo:rerun-if-env-changed=CFLAGS_wasm32-unknown-unknown
#14 322.7   CFLAGS_wasm32-unknown-unknown = None
#14 322.7   cargo:rerun-if-env-changed=CFLAGS_wasm32_unknown_unknown
#14 322.7   CFLAGS_wasm32_unknown_unknown = None
#14 322.7   cargo:rerun-if-env-changed=TARGET_CFLAGS
#14 322.7   TARGET_CFLAGS = None
#14 322.7   cargo:rerun-if-env-changed=CFLAGS
#14 322.7   CFLAGS = Some("-Wno-pointer-sign -Wno-implicit-function-declaration -Wextra")
#14 322.7   cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
#14 322.7   CRATE_CC_NO_DEFAULTS = None
#14 322.7   DEBUG = Some("false")
#14 322.7   CARGO_CFG_TARGET_FEATURE = None
#14 322.7   OPT_LEVEL = Some("z")
#14 322.7   TARGET = Some("wasm32-unknown-unknown")
#14 322.7   HOST = Some("x86_64-unknown-linux-gnu")
#14 322.7   cargo:rerun-if-env-changed=CC_wasm32-unknown-unknown
#14 322.7   CC_wasm32-unknown-unknown = None
#14 322.7   cargo:rerun-if-env-changed=CC_wasm32_unknown_unknown
#14 322.7   CC_wasm32_unknown_unknown = None
#14 322.7   cargo:rerun-if-env-changed=TARGET_CC
#14 322.7   TARGET_CC = None
#14 322.7   cargo:rerun-if-env-changed=CC
#14 322.7   CC = Some("musl-gcc")
#14 322.7   cargo:rerun-if-env-changed=CFLAGS_wasm32-unknown-unknown
#14 322.7   CFLAGS_wasm32-unknown-unknown = None
#14 322.7   cargo:rerun-if-env-changed=CFLAGS_wasm32_unknown_unknown
#14 322.7   CFLAGS_wasm32_unknown_unknown = None
#14 322.7   cargo:rerun-if-env-changed=TARGET_CFLAGS
#14 322.7   TARGET_CFLAGS = None
#14 322.7   cargo:rerun-if-env-changed=CFLAGS
#14 322.7   CFLAGS = Some("-Wno-pointer-sign -Wno-implicit-function-declaration -Wextra")
#14 322.7   cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
#14 322.7   CRATE_CC_NO_DEFAULTS = None
#14 322.7   DEBUG = Some("false")
#14 322.7   CARGO_CFG_TARGET_FEATURE = None
#14 322.7
#14 322.7   --- stderr
#14 322.7   running "musl-gcc" "-Os" "-ffunction-sections" "-fdata-sections" "-fPIC" "-Wno-pointer-sign" "-Wno-implicit-function-declaration" "-Wextra" "-I" "include" "-I" "/volume/target/wasm32-unknown-unknown/release-wasm/build/ring-5ddde73abd6ffbb2/out" "-std=c1x" "-Wbad-function-cast" "-Wnested-externs" "-Wstrict-prototypes" "-pedantic" "-pedantic-errors" "-Wall" "-Wextra" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-fno-strict-aliasing" "-fvisibility=hidden" "-g3" "-DNDEBUG" "-Werror" "-c" "-o/volume/target/wasm32-unknown-unknown/release-wasm/build/ring-5ddde73abd6ffbb2/out/curve25519.o" "crypto/curve25519/curve25519.c"
#14 322.7   running "musl-gcc" "-Os" "-ffunction-sections" "-fdata-sections" "-fPIC" "-Wno-pointer-sign" "-Wno-implicit-function-declaration" "-Wextra" "-I" "include" "-I" "/volume/target/wasm32-unknown-unknown/release-wasm/build/ring-5ddde73abd6ffbb2/out" "-std=c1x" "-Wbad-function-cast" "-Wnested-externs" "-Wstrict-prototypes" "-pedantic" "-pedantic-errors" "-Wall" "-Wextra" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-fno-strict-aliasing" "-fvisibility=hidden" "-g3" "-DNDEBUG" "-Werror" "-c" "-o/volume/target/wasm32-unknown-unknown/release-wasm/build/ring-5ddde73abd6ffbb2/out/aes_nohw.o" "crypto/fipsmodule/aes/aes_nohw.c"
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c: In function 'aes_nohw_transpose':
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:420:20: error: inlining failed in call to 'aes_nohw_swap_bits': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     420 | static inline void aes_nohw_swap_bits(aes_word_t *a, aes_word_t *b,
#14 322.7         |                    ^~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:449:3: note: called from here
#14 322.7     449 |   aes_nohw_swap_bits(&batch->w[5], &batch->w[7], 0x33333333, 2);
#14 322.7         |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:420:20: error: inlining failed in call to 'aes_nohw_swap_bits': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     420 | static inline void aes_nohw_swap_bits(aes_word_t *a, aes_word_t *b,
#14 322.7         |                    ^~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:448:3: note: called from here
#14 322.7     448 |   aes_nohw_swap_bits(&batch->w[4], &batch->w[6], 0x33333333, 2);
#14 322.7         |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:420:20: error: inlining failed in call to 'aes_nohw_swap_bits': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     420 | static inline void aes_nohw_swap_bits(aes_word_t *a, aes_word_t *b,
#14 322.7         |                    ^~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:447:3: note: called from here
#14 322.7     447 |   aes_nohw_swap_bits(&batch->w[1], &batch->w[3], 0x33333333, 2);
#14 322.7         |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:420:20: error: inlining failed in call to 'aes_nohw_swap_bits': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     420 | static inline void aes_nohw_swap_bits(aes_word_t *a, aes_word_t *b,
#14 322.7         |                    ^~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:446:3: note: called from here
#14 322.7     446 |   aes_nohw_swap_bits(&batch->w[0], &batch->w[2], 0x33333333, 2);
#14 322.7         |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:420:20: error: inlining failed in call to 'aes_nohw_swap_bits': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     420 | static inline void aes_nohw_swap_bits(aes_word_t *a, aes_word_t *b,
#14 322.7         |                    ^~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:442:3: note: called from here
#14 322.7     442 |   aes_nohw_swap_bits(&batch->w[6], &batch->w[7], 0x55555555, 1);
#14 322.7         |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:420:20: error: inlining failed in call to 'aes_nohw_swap_bits': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     420 | static inline void aes_nohw_swap_bits(aes_word_t *a, aes_word_t *b,
#14 322.7         |                    ^~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:441:3: note: called from here
#14 322.7     441 |   aes_nohw_swap_bits(&batch->w[4], &batch->w[5], 0x55555555, 1);
#14 322.7         |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:420:20: error: inlining failed in call to 'aes_nohw_swap_bits': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     420 | static inline void aes_nohw_swap_bits(aes_word_t *a, aes_word_t *b,
#14 322.7         |                    ^~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:440:3: note: called from here
#14 322.7     440 |   aes_nohw_swap_bits(&batch->w[2], &batch->w[3], 0x55555555, 1);
#14 322.7         |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:420:20: error: inlining failed in call to 'aes_nohw_swap_bits': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     420 | static inline void aes_nohw_swap_bits(aes_word_t *a, aes_word_t *b,
#14 322.7         |                    ^~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:439:3: note: called from here
#14 322.7     439 |   aes_nohw_swap_bits(&batch->w[0], &batch->w[1], 0x55555555, 1);
#14 322.7         |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c: In function 'aes_nohw_encrypt_batch':
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:679:26: error: inlining failed in call to 'aes_nohw_rotate_rows_twice': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     679 | static inline aes_word_t aes_nohw_rotate_rows_twice(aes_word_t v) {
#14 322.7         |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:736:7: note: called from here
#14 322.7     736 |       aes_nohw_xor(aes_nohw_xor(a6_r6, r7), aes_nohw_rotate_rows_twice(a7_r7));
#14 322.7         |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:679:26: error: inlining failed in call to 'aes_nohw_rotate_rows_twice': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     679 | static inline aes_word_t aes_nohw_rotate_rows_twice(aes_word_t v) {
#14 322.7         |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:734:7: note: called from here
#14 322.7     734 |       aes_nohw_xor(aes_nohw_xor(a5_r5, r6), aes_nohw_rotate_rows_twice(a6_r6));
#14 322.7         |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:679:26: error: inlining failed in call to 'aes_nohw_rotate_rows_twice': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     679 | static inline aes_word_t aes_nohw_rotate_rows_twice(aes_word_t v) {
#14 322.7         |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:732:7: note: called from here
#14 322.7     732 |       aes_nohw_xor(aes_nohw_xor(a4_r4, r5), aes_nohw_rotate_rows_twice(a5_r5));
#14 322.7         |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:679:26: error: inlining failed in call to 'aes_nohw_rotate_rows_twice': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     679 | static inline aes_word_t aes_nohw_rotate_rows_twice(aes_word_t v) {
#14 322.7         |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:729:7: note: called from here
#14 322.7     729 |       aes_nohw_xor(aes_nohw_xor(a3_r3, a7_r7),
#14 322.7         |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7     730 |                    aes_nohw_xor(r4, aes_nohw_rotate_rows_twice(a4_r4)));
#14 322.7         |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:679:26: error: inlining failed in call to 'aes_nohw_rotate_rows_twice': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     679 | static inline aes_word_t aes_nohw_rotate_rows_twice(aes_word_t v) {
#14 322.7         |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:726:7: note: called from here
#14 322.7     726 |       aes_nohw_xor(aes_nohw_xor(a2_r2, a7_r7),
#14 322.7         |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7     727 |                    aes_nohw_xor(r3, aes_nohw_rotate_rows_twice(a3_r3)));
#14 322.7         |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:679:26: error: inlining failed in call to 'aes_nohw_rotate_rows_twice': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     679 | static inline aes_word_t aes_nohw_rotate_rows_twice(aes_word_t v) {
#14 322.7         |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:724:7: note: called from here
#14 322.7     724 |       aes_nohw_xor(aes_nohw_xor(a1_r1, r2), aes_nohw_rotate_rows_twice(a2_r2));
#14 322.7         |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:679:26: error: inlining failed in call to 'aes_nohw_rotate_rows_twice': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     679 | static inline aes_word_t aes_nohw_rotate_rows_twice(aes_word_t v) {
#14 322.7         |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:721:7: note: called from here
#14 322.7     721 |       aes_nohw_xor(aes_nohw_xor(a0_r0, a7_r7),
#14 322.7         |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7     722 |                    aes_nohw_xor(r1, aes_nohw_rotate_rows_twice(a1_r1)));
#14 322.7         |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:679:26: error: inlining failed in call to 'aes_nohw_rotate_rows_twice': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     679 | static inline aes_word_t aes_nohw_rotate_rows_twice(aes_word_t v) {
#14 322.7         |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:719:7: note: called from here
#14 322.7     719 |       aes_nohw_xor(aes_nohw_xor(a7_r7, r0), aes_nohw_rotate_rows_twice(a0_r0));
#14 322.7         |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:666:26: error: inlining failed in call to 'aes_nohw_rotate_rows_down': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     666 | static inline aes_word_t aes_nohw_rotate_rows_down(aes_word_t v) {
#14 322.7         |                          ^~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:715:19: note: called from here
#14 322.7     715 |   aes_word_t r7 = aes_nohw_rotate_rows_down(a7);
#14 322.7         |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:666:26: error: inlining failed in call to 'aes_nohw_rotate_rows_down': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     666 | static inline aes_word_t aes_nohw_rotate_rows_down(aes_word_t v) {
#14 322.7         |                          ^~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:713:19: note: called from here
#14 322.7     713 |   aes_word_t r6 = aes_nohw_rotate_rows_down(a6);
#14 322.7         |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:666:26: error: inlining failed in call to 'aes_nohw_rotate_rows_down': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     666 | static inline aes_word_t aes_nohw_rotate_rows_down(aes_word_t v) {
#14 322.7         |                          ^~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:711:19: note: called from here
#14 322.7     711 |   aes_word_t r5 = aes_nohw_rotate_rows_down(a5);
#14 322.7         |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:666:26: error: inlining failed in call to 'aes_nohw_rotate_rows_down': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     666 | static inline aes_word_t aes_nohw_rotate_rows_down(aes_word_t v) {
#14 322.7         |                          ^~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:709:19: note: called from here
#14 322.7     709 |   aes_word_t r4 = aes_nohw_rotate_rows_down(a4);
#14 322.7         |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:666:26: error: inlining failed in call to 'aes_nohw_rotate_rows_down': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     666 | static inline aes_word_t aes_nohw_rotate_rows_down(aes_word_t v) {
#14 322.7         |                          ^~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:707:19: note: called from here
#14 322.7     707 |   aes_word_t r3 = aes_nohw_rotate_rows_down(a3);
#14 322.7         |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:666:26: error: inlining failed in call to 'aes_nohw_rotate_rows_down': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     666 | static inline aes_word_t aes_nohw_rotate_rows_down(aes_word_t v) {
#14 322.7         |                          ^~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:705:19: note: called from here
#14 322.7     705 |   aes_word_t r2 = aes_nohw_rotate_rows_down(a2);
#14 322.7         |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:666:26: error: inlining failed in call to 'aes_nohw_rotate_rows_down': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     666 | static inline aes_word_t aes_nohw_rotate_rows_down(aes_word_t v) {
#14 322.7         |                          ^~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:703:19: note: called from here
#14 322.7     703 |   aes_word_t r1 = aes_nohw_rotate_rows_down(a1);
#14 322.7         |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:666:26: error: inlining failed in call to 'aes_nohw_rotate_rows_down': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     666 | static inline aes_word_t aes_nohw_rotate_rows_down(aes_word_t v) {
#14 322.7         |                          ^~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:701:19: note: called from here
#14 322.7     701 |   aes_word_t r0 = aes_nohw_rotate_rows_down(a0);
#14 322.7         |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   In file included from crypto/fipsmodule/aes/aes_nohw.c:17:
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c: In function 'aes_nohw_expand_round_keys':
#14 322.7   crypto/fipsmodule/aes/../../internal.h:281:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     281 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) {
#14 322.7         |                     ^~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:761:7: note: called from here
#14 322.7     761 |       OPENSSL_memcpy(tmp, key->rd_key + 4 * i, 16);
#14 322.7         |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   In file included from crypto/fipsmodule/aes/aes_nohw.c:17:
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c: In function 'aes_nohw_from_batch':
#14 322.7   crypto/fipsmodule/aes/../../internal.h:281:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     281 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) {
#14 322.7         |                     ^~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:374:3: note: called from here
#14 322.7     374 |   OPENSSL_memcpy(out + 8, &b1, 8);
#14 322.7         |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   In file included from crypto/fipsmodule/aes/aes_nohw.c:17:
#14 322.7   crypto/fipsmodule/aes/../../internal.h:281:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     281 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) {
#14 322.7         |                     ^~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:373:3: note: called from here
#14 322.7     373 |   OPENSSL_memcpy(out, &b0, 8);
#14 322.7         |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:292:24: error: inlining failed in call to 'aes_nohw_uncompact_word': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     292 | static inline uint64_t aes_nohw_uncompact_word(uint64_t a) {
#14 322.7         |                        ^~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:372:7: note: called from here
#14 322.7     372 |       aes_nohw_uncompact_word((a1 & UINT64_C(0xffffffff00000000)) | (a0 >> 32));
#14 322.7         |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:292:24: error: inlining failed in call to 'aes_nohw_uncompact_word': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     292 | static inline uint64_t aes_nohw_uncompact_word(uint64_t a) {
#14 322.7         |                        ^~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:370:7: note: called from here
#14 322.7     370 |       aes_nohw_uncompact_word((a0 & UINT64_C(0x00000000ffffffff)) | (a1 << 32));
#14 322.7         |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c: In function 'aes_nohw_compact_block':
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:275:24: error: inlining failed in call to 'aes_nohw_compact_word': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     275 | static inline uint64_t aes_nohw_compact_word(uint64_t a) {
#14 322.7         |                        ^~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:342:17: note: called from here
#14 322.7     342 |   uint64_t a1 = aes_nohw_compact_word(out[1]);
#14 322.7         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:275:24: error: inlining failed in call to 'aes_nohw_compact_word': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     275 | static inline uint64_t aes_nohw_compact_word(uint64_t a) {
#14 322.7         |                        ^~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:341:17: note: called from here
#14 322.7     341 |   uint64_t a0 = aes_nohw_compact_word(out[0]);
#14 322.7         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   In file included from crypto/fipsmodule/aes/aes_nohw.c:17:
#14 322.7   crypto/fipsmodule/aes/../../internal.h:281:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     281 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) {
#14 322.7         |                     ^~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:337:3: note: called from here
#14 322.7     337 |   OPENSSL_memcpy(out, in, 16);
#14 322.7         |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c: In function 'aes_nohw_to_batch':
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:335:20: error: inlining failed in call to 'aes_nohw_compact_block': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     335 | static inline void aes_nohw_compact_block(aes_word_t out[AES_NOHW_BLOCK_WORDS],
#14 322.7         |                    ^~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:470:5: note: called from here
#14 322.7     470 |     aes_nohw_compact_block(block, in + 16 * i);
#14 322.7         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   In file included from crypto/fipsmodule/aes/aes_nohw.c:17:
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c: In function 'ring_core_0_17_0_not_released_yet_aes_nohw_set_encrypt_key':
#14 322.7   crypto/fipsmodule/aes/../../internal.h:281:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     281 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) {
#14 322.7         |                     ^~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:798:3: note: called from here
#14 322.7     798 |   OPENSSL_memcpy(key->rd_key, block, 16);
#14 322.7         |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:335:20: error: inlining failed in call to 'aes_nohw_compact_block': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     335 | static inline void aes_nohw_compact_block(aes_word_t out[AES_NOHW_BLOCK_WORDS],
#14 322.7         |                    ^~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:797:3: note: called from here
#14 322.7     797 |   aes_nohw_compact_block(block, in);
#14 322.7         |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:666:26: error: inlining failed in call to 'aes_nohw_rotate_rows_down': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     666 | static inline aes_word_t aes_nohw_rotate_rows_down(aes_word_t v) {
#14 322.7         |                          ^~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:807:18: note: called from here
#14 322.7     807 |       block[j] = aes_nohw_xor(
#14 322.7         |                  ^~~~~~~~~~~~~
#14 322.7     808 |           block[j],
#14 322.7         |           ~~~~~~~~~
#14 322.7     809 |           aes_nohw_shift_right(aes_nohw_rotate_rows_down(sub[j]), 12));
#14 322.7         |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   In file included from crypto/fipsmodule/aes/aes_nohw.c:17:
#14 322.7   crypto/fipsmodule/aes/../../internal.h:281:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     281 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) {
#14 322.7         |                     ^~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:817:5: note: called from here
#14 322.7     817 |     OPENSSL_memcpy(key->rd_key + 4 * i, block, 16);
#14 322.7         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   In file included from crypto/fipsmodule/aes/aes_nohw.c:17:
#14 322.7   crypto/fipsmodule/aes/../../internal.h:281:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     281 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) {
#14 322.7         |                     ^~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:830:3: note: called from here
#14 322.7     830 |   OPENSSL_memcpy(key->rd_key + 4, block2, 16);
#14 322.7         |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:335:20: error: inlining failed in call to 'aes_nohw_compact_block': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     335 | static inline void aes_nohw_compact_block(aes_word_t out[AES_NOHW_BLOCK_WORDS],
#14 322.7         |                    ^~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:829:3: note: called from here
#14 322.7     829 |   aes_nohw_compact_block(block2, in + 16);
#14 322.7         |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   In file included from crypto/fipsmodule/aes/aes_nohw.c:17:
#14 322.7   crypto/fipsmodule/aes/../../internal.h:281:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     281 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) {
#14 322.7         |                     ^~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:827:3: note: called from here
#14 322.7     827 |   OPENSSL_memcpy(key->rd_key, block1, 16);
#14 322.7         |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:335:20: error: inlining failed in call to 'aes_nohw_compact_block': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     335 | static inline void aes_nohw_compact_block(aes_word_t out[AES_NOHW_BLOCK_WORDS],
#14 322.7         |                    ^~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:826:3: note: called from here
#14 322.7     826 |   aes_nohw_compact_block(block1, in);
#14 322.7         |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:666:26: error: inlining failed in call to 'aes_nohw_rotate_rows_down': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     666 | static inline aes_word_t aes_nohw_rotate_rows_down(aes_word_t v) {
#14 322.7         |                          ^~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:839:19: note: called from here
#14 322.7     839 |       block1[j] = aes_nohw_xor(
#14 322.7         |                   ^~~~~~~~~~~~~
#14 322.7     840 |           block1[j],
#14 322.7         |           ~~~~~~~~~~
#14 322.7     841 |           aes_nohw_shift_right(aes_nohw_rotate_rows_down(sub[j]), 12));
#14 322.7         |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   In file included from crypto/fipsmodule/aes/aes_nohw.c:17:
#14 322.7   crypto/fipsmodule/aes/../../internal.h:281:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     281 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) {
#14 322.7         |                     ^~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:848:5: note: called from here
#14 322.7     848 |     OPENSSL_memcpy(key->rd_key + 4 * i, block1, 16);
#14 322.7         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   In file included from crypto/fipsmodule/aes/aes_nohw.c:17:
#14 322.7   crypto/fipsmodule/aes/../../internal.h:281:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     281 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) {
#14 322.7         |                     ^~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:864:5: note: called from here
#14 322.7     864 |     OPENSSL_memcpy(key->rd_key + 4 * (i + 1), block2, 16);
#14 322.7         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   In file included from crypto/fipsmodule/aes/aes_nohw.c:17:
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c: In function 'ring_core_0_17_0_not_released_yet_aes_nohw_ctr32_encrypt_blocks':
#14 322.7   crypto/fipsmodule/aes/../../internal.h:281:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     281 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) {
#14 322.7         |                     ^~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:920:5: note: called from here
#14 322.7     920 |     OPENSSL_memcpy(ivs.u8 + 16 * i, ivec, 16);
#14 322.7         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   In file included from crypto/fipsmodule/aes/aes_nohw.c:17:
#14 322.7   crypto/fipsmodule/aes/../../internal.h:281:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     281 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) {
#14 322.7         |                     ^~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:900:5: note: called from here
#14 322.7     900 |     OPENSSL_memcpy(out + i, &x, sizeof(aes_word_t));
#14 322.7         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   In file included from crypto/fipsmodule/aes/aes_nohw.c:17:
#14 322.7   crypto/fipsmodule/aes/../../internal.h:281:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     281 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) {
#14 322.7         |                     ^~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:898:5: note: called from here
#14 322.7     898 |     OPENSSL_memcpy(&y, b + i, sizeof(aes_word_t));
#14 322.7         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   In file included from crypto/fipsmodule/aes/aes_nohw.c:17:
#14 322.7   crypto/fipsmodule/aes/../../internal.h:281:21: error: inlining failed in call to 'OPENSSL_memcpy': call is unlikely and code size would grow [-Werror=inline]
#14 322.7     281 | static inline void *OPENSSL_memcpy(void *dst, const void *src, size_t n) {
#14 322.7         |                     ^~~~~~~~~~~~~~
#14 322.7   crypto/fipsmodule/aes/aes_nohw.c:897:5: note: called from here
#14 322.7     897 |     OPENSSL_memcpy(&x, a + i, sizeof(aes_word_t));
#14 322.7         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14 322.7   cc1: all warnings being treated as errors
#14 322.7   thread 'main' panicked at 'execution failed', /root/.cargo/git/checkouts/ring-51509f604a4fd25b/450ada2/build.rs:710:9
#14 322.7   note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
#14 322.8 warning: build failed, waiting for other jobs to finish..
clux commented 1 year ago

I assume that has to be changed upstream in ring's build script (or whatever they are invoking that actually sets -Werror).

It's possible you can set CFLAGS=-Wno-error as an evar to override it though.