Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails with -flto #40

Open
eli-schwartz opened this issue Dec 31, 2023 · 0 comments
Open

Build fails with -flto #40

eli-schwartz opened this issue Dec 31, 2023 · 0 comments

Comments

@eli-schwartz
Copy link

Log excerpt:

x86_64-pc-linux-gnu-gcc -march=native -fstack-protector-all -O2 -pipe -fdiagnostics-color=always -frecord-gcc-switches -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-clash-protection -Wformat -Werror=format-security -flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -Werror=implicit-function-declaration -Werror=implicit-int -Werror=int-conversion -Werror=incompatible-pointer-types -Wall -I../../drbd-headers -I.. -I. -I../shared   -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0  -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -o drbdadm drbdadm_scanner.o drbdadm_parser.o drbdadm_postparse.o drbdadm_main.o drbdadm_adjust.o drbdadm_dump.o drbdtool_common.o drbdadm_usage_cnt.o drbd_buildtag.o registry.o config_flags.o libnla.o drbd_nla.o shared_tool.o shared_main.o shared_parser.o libgenl.o drbdadm_linux.o drbdtool_common_linux.o path_linux.o shared_linux.o
../shared/shared_main.c:60:22: error: type of ‘ifreq_list’ does not match original declaration [-Werror=lto-type-mismatch]
   60 | extern struct ifreq *ifreq_list;
      |                      ^
drbdadm_main.c:150:15: note: ‘ifreq_list’ was previously declared here
  150 | struct ifreq *ifreq_list = NULL;
      |               ^
drbdadm_main.c:150:15: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
lto1: some warnings being treated as errors
lto-wrapper: fatal error: x86_64-pc-linux-gnu-gcc returned 1 exit status
compilation terminated.
/usr/libexec/gcc/x86_64-pc-linux-gnu/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:111: drbdadm] Error 1

Full build log:
drbd-utils-9.25.0:20231231-225010.log

Downstream bug report: https://bugs.gentoo.org/863728

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant