On Tru64 5.1B with the Compaq C compiler, configure fails when finding zlib because multiple incompatible flags are added to CFLAGS. It appears the tests for these flags are passing even though the compiler doesn't actually support them.

e.g.

configure: Checking if compiler 'cc' supports -Wno-pointer-sign
configure: Setting -Wno-pointer-sign
configure: Checking if compiler 'cc' supports -fno-strict-overflow
configure: Setting -fno-strict-overflow
configure: Checking for available hardened build flags:
configure: Setting -fPIE

However, the zlib check fails due to:

configure:3323: cc -o conftest -g -Wno-pointer-sign -fno-strict-overflow -fPIE -pie conftest.c >&5 ld: Invalid flag usage: Wno-pointer-sign, -Wx,-option must appear after -_SYSTYPE_SVR4

If the check for `-Wno-pointer-sign` is modified so that it doesn't actually get added to CFLAGS, then the zlib check fails as `-fno-strict-overflow` isn't supported.

configure:4845: checking for deflate in -lz
configure:4870: cc -o conftest -g -fno-strict-overflow -fPIE -fstack-protector-strong -D_FORTIFY_SOURCE=2 -mfunction-return=thunk -mindirect-branch=thunk -I/usr/util/include -L/usr/util/lib conftest.c -lz >&5
ld: -fno-strict-overflow: Unknown flag

Larkin

Reply via email to