Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 887887 - [guru] net-mail/dovecot-fts-xapian-1.5.5 overwrites user's optimization (-O*)
Summary: [guru] net-mail/dovecot-fts-xapian-1.5.5 overwrites user's optimization (-O*)
Status: RESOLVED FIXED
Alias: None
Product: GURU
Classification: Unclassified
Component: Package issues (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Philippe Chaintreuil
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: qa-guru
  Show dependency tree
 
Reported: 2022-12-22 08:33 UTC by Agostino Sarubbo
Modified: 2022-12-27 08:05 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,59.95 KB, text/plain)
2022-12-22 08:33 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2022-12-22 08:33:32 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: net-mail/dovecot-fts-xapian-1.5.5 overwrites user's optimization (-O*).
Discovered on: amd64 (internal ref: guru_tinderbox)

NOTE:
(CLANG-STRICTER-SYSTEM) in the summary means that the bug was found on a machine that runs clang with stricter mode

This machine uses clang with CFLAGS/CXXFLAGS=-Werror=implicit-function-declaration -Werror=implicit-int -Werror=incompatible-function-pointer-types

See also:
https://archives.gentoo.org/gentoo-dev/message/dd9f2d3082b8b6f8dfbccb0639e6e240
https://wiki.gentoo.org/wiki/Modern_C_porting
man gcc says:
"If you use multiple -O options, with or without level numbers, the last such option is the one that is effective".

So, since the build system adds -O* after -O* provided by my CFLAGS/CXXFLAGS means that it is overwritten and unless there are known issues with -O* configured by the user, the build system should not overwrite -O*.
Comment 1 Agostino Sarubbo gentoo-dev 2022-12-22 08:33:34 UTC
Created attachment 844663 [details]
build.log

build log and emerge --info
Comment 2 Philippe Chaintreuil 2022-12-22 14:13:21 UTC
Posted on upstream's githib issue tracker to see if the change was intentional/has a reason behind it.  https://github.com/grosjo/fts-xapian/blame/master/configure.ac
Comment 3 Larry the Git Cow gentoo-dev 2022-12-27 08:05:39 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=405b57ede2f5aec3e91b7da8ea88398a9c756440

commit 405b57ede2f5aec3e91b7da8ea88398a9c756440
Author:     Philippe Chaintreuil <gentoo_bugs_peep@parallaxshift.com>
AuthorDate: 2022-12-25 18:37:10 +0000
Commit:     Philippe Chaintreuil <gentoo_bugs_peep@parallaxshift.com>
CommitDate: 2022-12-25 18:47:26 +0000

    net-mail/dovecot-fts-xapian: Allow -O2 to be overriden
    
    Closes: https://bugs.gentoo.org/887887
    Signed-off-by: Philippe Chaintreuil <gentoo_bugs_peep@parallaxshift.com>

 net-mail/dovecot-fts-xapian/dovecot-fts-xapian-1.5.5.ebuild   |  4 ++++
 net-mail/dovecot-fts-xapian/dovecot-fts-xapian-9999.ebuild    |  4 ++++
 .../files/bug-887887_allow-O2-override.patch                  | 11 +++++++++++
 3 files changed, 19 insertions(+)