Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 887919

Summary: [guru] sci-electronics/verilator-5.028 overwrites user's optimization (-O*)
Product: GURU Reporter: Agostino Sarubbo <ago>
Component: Package issuesAssignee: vowstar <vowstar>
Status: RESOLVED FIXED    
Severity: normal CC: guru-bugs
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 785607    
Attachments: build.log

Description Agostino Sarubbo gentoo-dev 2022-12-22 08:37:07 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: sci-electronics/verilator-5.002 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:37:09 UTC
Created attachment 844693 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2023-01-07 08:06:25 UTC
guru_ci has reproduced this issue with version 5.004 - Updating summary.
Comment 3 Agostino Sarubbo gentoo-dev 2023-01-31 13:19:42 UTC
guru_ci has reproduced this issue with version 5.006 - Updating summary.
Comment 4 Agostino Sarubbo gentoo-dev 2023-04-02 08:36:32 UTC
guru_ci has reproduced this issue with version 5.008 - Updating summary.
Comment 5 Agostino Sarubbo gentoo-dev 2023-08-10 12:50:39 UTC
guru_ci has reproduced this issue with version 5.014 - Updating summary.
Comment 6 Agostino Sarubbo gentoo-dev 2023-11-07 08:01:53 UTC
guru_ci has reproduced this issue with version 5.018 - Updating summary.
Comment 7 Agostino Sarubbo gentoo-dev 2024-03-17 07:58:02 UTC
guru_ci has reproduced this issue with version 5.022 - Updating summary.
Comment 8 Agostino Sarubbo gentoo-dev 2024-05-01 05:13:09 UTC
guru_ci has reproduced this issue with version 5.024 - Updating summary.
Comment 9 Agostino Sarubbo gentoo-dev 2024-10-11 06:46:48 UTC
guru_ci has reproduced this issue with version 5.028 - Updating summary.
Comment 10 Larry the Git Cow gentoo-dev 2024-10-11 09:55:19 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=25bad19b5ae63eedd27120ed2919d3d16e0ff186

commit 25bad19b5ae63eedd27120ed2919d3d16e0ff186
Author:     Huang Rui <vowstar@gmail.com>
AuthorDate: 2024-10-11 08:29:16 +0000
Commit:     Huang Rui <vowstar@gmail.com>
CommitDate: 2024-10-11 08:29:16 +0000

    sci-electronics/verilator: fix user CFLAG and missing gdb BDEPEND
    
    - fix overwrites user's optimization (-O*)
    - fix calls commands that do not exist: gdb
    
    Closes: https://bugs.gentoo.org/927328
    Closes: https://bugs.gentoo.org/887919
    Signed-off-by: Huang Rui <vowstar@gmail.com>

 .../verilator/{verilator-5.026.ebuild => verilator-5.026-r1.ebuild} | 6 ++++++
 .../verilator/{verilator-5.028.ebuild => verilator-5.028-r1.ebuild} | 6 ++++++
 sci-electronics/verilator/verilator-9999.ebuild                     | 6 ++++++
 3 files changed, 18 insertions(+)