Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 937769 - dev-util/android-tools-35.0.1 fails to compile (lto): ResourceTypes.cpp:5588:14: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
Summary: dev-util/android-tools-35.0.1 fails to compile (lto): ResourceTypes.cpp:5588:...
Status: RESOLVED DUPLICATE of bug 858311
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Zac Medico
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: lto
  Show dependency tree
 
Reported: 2024-08-11 16:04 UTC by SigHunter
Modified: 2024-08-25 07:23 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log (buildlog.txt,861.49 KB, text/plain)
2024-08-11 16:04 UTC, SigHunter
Details
emerge --info and installed packages (emerge-info.txt,200.81 KB, text/plain)
2024-08-11 16:05 UTC, SigHunter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description SigHunter 2024-08-11 16:04:29 UTC
dev-util/android-tools-35.0.1 fails to compile when Werror=strict-aliasing is set, like it is often done with link time optimizations

it used to work in the previous version 34.0.5


Reproducible: Always

Steps to Reproduce:
1. CFLAGS="-march=native -O2 -pipe -flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing"
2. emerge =dev-util/android-tools-35.0.1
Actual Results:  
Fails to compile. 

Compiles fine with safer CFLAGS like 
"-march=native -O2 -pipe -Wno-error=odr -Wno-error=lto-type-mismatch -Wno-error=strict-aliasing -fno-lto"
Comment 1 SigHunter 2024-08-11 16:04:54 UTC
Created attachment 899848 [details]
build log
Comment 2 SigHunter 2024-08-11 16:05:12 UTC
Created attachment 899849 [details]
emerge --info and installed packages
Comment 3 Eli Schwartz gentoo-dev 2024-08-25 07:08:21 UTC
This is "just" bug 858311 again, but the workaround was removed...
Comment 4 Larry the Git Cow gentoo-dev 2024-08-25 07:21:37 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a0878db1c9b17cf2500b2f8ad434562042cbb1d9

commit a0878db1c9b17cf2500b2f8ad434562042cbb1d9
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2024-08-25 07:16:22 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2024-08-25 07:21:33 +0000

    dev-util/android-tools: Re-apply LTO-unsafe fix
    
    Re-apply the LTO-unsafe fix from commit
    0c03b34a1057b2859947e5c1f8c592ff412babf3.
    
    Fixes: https://github.com/gentoo/gentoo/pull/38069
    Closes: https://bugs.gentoo.org/937769
    Reported-by: Eli Schwartz <eschwartz@gentoo.org>
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 dev-util/android-tools/android-tools-35.0.1.ebuild | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)
Comment 5 Zac Medico gentoo-dev 2024-08-25 07:23:10 UTC

*** This bug has been marked as a duplicate of bug 858311 ***