Created attachment 863745 [details] build log [ebuild N ] app-crypt/tpm2-tss-4.0.1 USE="fapi openssl policy -doc -mbedtls -static-libs -test" ABI_X86="(64) -32 (-x32)" libtool: compile: x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I/var/tmp/portage/app-crypt /tpm2-tss-4.0.1/work/tpm2-tss-4.0.1 -I/var/tmp/portage/app-crypt/tpm2-tss-4.0.1/work/tpm2-t ss-4.0.1/src -I/var/tmp/portage/app-crypt/tpm2-tss-4.0.1/work/tpm2-tss-4.0.1/include/tss2 - I/var/tmp/portage/app-crypt/tpm2-tss-4.0.1/work/tpm2-tss-4.0.1/test/fuzz/tcti -I/var/tmp/portage/app-crypt/tpm2-tss-4.0.1/work/tpm2-tss-4.0.1/src/tss2-fapi -I/usr/include/json-c -O2 -pipe -pipe -march=znver1 -O3 -fuse-linker-plugin --param=lto-max-streaming-parallelism=4 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -w -c /var/tmp/portage/app-crypt/tpm2-tss-4.0.1/work/tpm2-tss-4.0.1/src/tss2-fapi/ifapi_ima_eventlog.c -fPIC -DPIC -o src/tss2-fapi/.libs/libtss2_fapi_la-ifapi_ima_eventlog.o In file included from /usr/include/features.h:490, from /usr/include/bits/libc-header-start.h:33, from /usr/include/stdio.h:27, from /var/tmp/portage/app-crypt/tpm2-tss-4.0.1/work/tpm2-tss-4.0.1/src/tss2-fapi/ifapi_helpers.c:11: /usr/include/bits/stdio2.h: In function 'ifapi_asprintf': /usr/include/bits/stdio2.h:166:1: error: inlining failed in call to 'always_inline' 'vasprintf.localalias': function not inlinable 166 | __NTH (vasprintf (char **__restrict __ptr, const char *__restrict __fmt, | ^~~~~ /var/tmp/portage/app-crypt/tpm2-tss-4.0.1/work/tpm2-tss-4.0.1/src/tss2-fapi/ifapi_helpers.c:565:12: note: called from here 565 | size = vasprintf(str, fmt, args); | ^~~~~~~~~~~~~~~~~~~~~~~~~
Created attachment 863746 [details] emerge info NOTE: /etc/portage/env/baseflags is in effect, overriding some flags, paraphrased here: CFLAGS="-O2 -pipe" CXXFLAGS="${CFLAGS}" FFLAGS="${CFLAGS}" FCFLAGS="${CFLAGS}" LDFLAGS="-Wl,-O1 -Wl,--as-needed"
Its the "-fno-semantic-interposition" that's doing this. Note it works with clang, so this is likely a gcc bug. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101270, which may be related.
Wow, I'm not sure how I didn't notice all those flags were still somehow set. I must've misspelled the entry in package.env. Fixing that got it to compile. Thanks!