--- tpm2-pkcs11-1.8.0/configure.ac.orig 2022-03-21 14:07:16.000000000 +0100 +++ tpm2-pkcs11-1.8.0/configure.ac 2022-07-02 08:12:45.167023531 +0200 @@ -540,7 +540,7 @@ and submitting patches upstream!]) # Rather than nesting these and making them ugly just use a counter. AX_CHECK_COMPILE_FLAG([-fdata-sections], [strip=y]) AX_CHECK_COMPILE_FLAG([-ffunction-sections], [strip="y$strip"]) -AX_CHECK_LINK_FLAG([[-Wl,--gc-sections]], [strip+="y$strip"]) +AX_CHECK_LINK_FLAG([[-Wl,--gc-sections]], [strip="y$strip"]) AS_IF([test x"$strip" = xyyy], [ EXTRA_CFLAGS="$EXTRA_CFLAGS -fdata-sections -ffunction-sections"