https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/ Issue: app-pda/libplist-2.2.0-r3 fails to compile (lto). Discovered on: amd64 (internal ref: lto_tinderbox) NOTE: This machine uses lto with CFLAGS=-flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing
Created attachment 788363 [details] build.log build log and emerge --info
They seem to build with -Wno-strict-aliasing but not -fno-strict-aliasing: https://github.com/libimobiledevice/libplist/blob/f3c65feb0e1f4e177a75ba936d0730f7c3f4b076/configure.ac#L167. ... is it because they're aware of false positives, or a mistake and they want to turn off the optimisation? :)
(In reply to Sam James from comment #2) > They seem to build with -Wno-strict-aliasing but not -fno-strict-aliasing: > https://github.com/libimobiledevice/libplist/blob/ > f3c65feb0e1f4e177a75ba936d0730f7c3f4b076/configure.ac#L167. > > ... is it because they're aware of false positives, or a mistake and they > want to turn off the optimisation? :) https://github.com/libimobiledevice/libplist/commit/cf9836196cbabd6d40e8c1c8018417ef31df5f46 suggests it's an FP.
> float floatval = (float)val; > *(uint32_t*)(buff+8) = float_bswap32(*(uint32_t*)&floatval); Unfortunately not a false positive.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=75e60fe3e8e5b618c6a37d95e6e1d64ea173f8c3 commit 75e60fe3e8e5b618c6a37d95e6e1d64ea173f8c3 Author: Matthew Smith <matthew@gentoo.org> AuthorDate: 2022-07-25 18:24:10 +0000 Commit: Matthew Smith <matthew@gentoo.org> CommitDate: 2022-07-25 18:50:04 +0000 app-pda/libplist: fix strict aliasing violations Apply a patch that was also sent upstream, and also: * Bump to EAPI-8. * Correct LICENSE variable. Closes: https://bugs.gentoo.org/854837 Signed-off-by: Matthew Smith <matthew@gentoo.org> .../files/libplist-2.2.0-strict-aliasing.patch | 32 ++++++ app-pda/libplist/libplist-2.2.0-r4.ebuild | 114 +++++++++++++++++++++ 2 files changed, 146 insertions(+)