#960968 tpm2-pkcs11: FTBFS on hppa - broken configure test for -fstack-protector-all

#960968#5
Date:
2020-05-18 20:47:53 UTC
From:
To:
Dear Maintainer,

The build of tpm2-pkcs11 fails on hppa with the following error:
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I./src/lib -Wdate-time -D_FORTIFY_SOURCE=2 -I./src -I./src/lib -Wall -Wextra -Werror -Wformat -Wformat-security -Wstack-protector -fstack-protector-all -Wstrict-overflow=5 -O2 -fPIC -pthread -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -Wformat -Werror=format-security -g -c src/lib/attrs.c  -fPIC -DPIC -o src/lib/.libs/attrs.o
cc1: error: ‘-fstack-protector’ not supported for this target [-Werror]
cc1: all warnings being treated as errors
make[1]: *** [Makefile:1577: src/lib/digest.lo] Error 1

See:
https://buildd.debian.org/status/fetch.php?pkg=tpm2-pkcs11&arch=hppa&ver=1.2.0-1&stamp=1589690866&raw=0

The problem is the configure check for -fstack-protector-all is broken:
configure:12151: checking whether C compiler accepts -fstack-protector-all
configure:12170: gcc -c -g -O2 -fdebug-prefix-map=/home/dave/debian/tpm2-pkcs11/tpm2-pkcs11-1.2.0=. -Wformat -Werror=format-security -g  -fstack-protector-all -Wdate-time -D_FORTIFY_SOURCE=2 conftest.c >&5
cc1: warning: '-fstack-protector' not supported for this target
configure:12170: $? = 0
configure:12178: result: yes

As you can see, there is a warning but -Werror is not passed in the configure
check, so the test passes.

There is a similar problem in tpm2-tools.

This problem also affects alpha and ia64.

Regards,
Dave Anglin

#960968#10
Date:
2022-05-20 16:09:18 UTC
From:
To:
It seems like this is fixed at least in in the testing version 1.7.0-1.
Can you confirm?