Hi, Compiling texinfo 7.0.1 with CFLAGS="-O2 -flto -Werror=lto-type-mismatch" results in the following: ``` make[3]: Entering directory '/var/tmp/portage/sys-apps/texinfo-7.0.1/work/texinfo-7.0.1/install-info' x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../gnulib/lib -I../gnulib/lib -DLOCALEDIR=\"/usr/share/locale\" -O2 -flto -Werror=lto-type-mismatch -O2 -flto -Werror=lto-type-mismatch -ggdb3 -Werror=implicit-function-declaration -Werror=implicit-int -c -o install-info.o install-info.c x86_64-pc-linux-gnu-gcc -O2 -flto -Werror=lto-type-mismatch -O2 -flto -Werror=lto-type-mismatch -ggdb3 -Werror=implicit-function-declaration -Werror=implicit-int -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -Wl,-z,pack-relative-relocs -o ginstall-info install-info.o ../gnulib/lib/libgnu.a ../gnulib/lib/error.h:33:13: error: type of ‘error’ does not match original declaration [-Werror=lto-type-mismatch] 33 | extern void error (int __status, int __errnum, const char *__format, ...) | ^ install-info.c:218:1: note: type mismatch in parameter 1 218 | error (const char *fmt, ...) | ^ install-info.c:218:1: note: ‘error’ was previously declared here install-info.c:218:1: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used lto1: some warnings being treated as errors lto-wrapper: fatal error: //usr/bin/x86_64-pc-linux-gnu-gcc returned 1 exit status compilation terminated. /usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status make[3]: *** [Makefile:1514: ginstall-info] Error 1 ```
This is with GCC 12.2.1 20221203. We've also seen this in GNU make, so not sure if it's a gnulib problem or not, as it may be in lib/error.h (hence CCing bug-gnulib): - https://bugs.gentoo.org/863713 (texinfo) - https://bugs.gentoo.org/863824 (make) Best, sam
signature.asc
Description: Message signed with OpenPGP