Bug 1272394

Summary: llvm.spec configures build with -O3: needs explanation comment or removal
Product: [Fedora] Fedora Reporter: Jens Petersen <petersen>
Component: llvmAssignee: Adam Jackson <ajax>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 24CC: ajax, bos, dmalcolm, jv+fedora, nalimilan, petersen, scottt.tw
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-05 12:38:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jens Petersen 2015-10-16 10:24:22 UTC
Description of problem:
The llvm.spec file configures the Fedora llvm build with -O3.
This is probably not a problem as such but there should really
be some explanation of why this is done, or if it is not really
needed it might be better just to drop it?

It seems to have been introduced in this commit:

```
commit be655c46e5d3707531fb8bef5430a9c064653197
Author: Jan Vcelak <jvcelak>
Date:   Tue Nov 12 21:48:50 2013 +0100

    update to 3.3, add compiler-rt and lldb
```

This was noticed while reviewing the llvm35 package.

Comment 1 Jan Včelák 2015-10-18 20:27:13 UTC
Jens, my comment I sent you on 13 November 2014 in an e-mail:

> I vaguelly remember that the option was mentioned in somewhere in LLVM
> or Clang installation documentation, including some recommended
> values. I don't think this was my invention as Fedora uses -O2 by
> default and I think that's reasonable. However I didn't manage to find
> the documentation now. I think you can safely drop the option.

Comment 2 Jens Petersen 2015-10-19 03:19:06 UTC
Thank you, Jan, sorry I had forgotten I asked you this before:
appreciate the follow up. :)

Then if no options I propose we drop the -O2 for Fedora 24.

Comment 3 Jens Petersen 2015-10-19 03:19:44 UTC
(In reply to Jens Petersen from comment #2)
> Then if no options I propose we drop the -O2 for Fedora 24.

Ugh, oops I meant "drop -O3" of course.

Comment 4 Jens Petersen 2015-10-19 03:35:11 UTC
(I had also forgotten that I did actually drop -O3 from the llvm34 package
at that time - I will probably do the same for llvm35 and maybe nalimilan wants to also for llvm33.)

Comment 5 Jens Petersen 2015-10-19 03:37:08 UTC
(In reply to Jens Petersen from comment #2)
> Then if no options I propose we drop the -O2 for Fedora 24.

Oh dear (I really must check my comments more carefully before posting sorry)

-> "if no objections I propose ..."

Comment 6 Milan Bouchet-Valat 2015-10-19 07:49:07 UTC
I also agree that dropping the -03 option in rawhide is a good idea. For existing releases, better leave things as they are.

Comment 7 Milan Bouchet-Valat 2015-10-25 20:44:06 UTC
I've just discovered that LLVM is using -O2 by default, so maybe that's justified after all. Maybe only an explanatory comment is needed.
See:
https://llvm.org/svn/llvm-project/support/trunk/make/Makefile.common

Comment 8 Jens Petersen 2015-10-26 06:49:24 UTC
Milan, sorry, I didn't get your point?

Comment 9 Milan Bouchet-Valat 2015-10-26 12:05:25 UTC
Damn, I meant "LLVM is using -O3 by default".

Comment 10 Jan Kurik 2016-02-24 13:51:01 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase