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

Bug 644502

Summary: www-client/firefox-57.0 patch: build fails if -flto matched in CFLAGS due to typo in moz build scripts
Product: Gentoo Linux Reporter: Luke McKee <hojuruku>
Component: Current packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: www-client/firefox-57 lto-build patch
firefox ebuild with the one patch (not much changed)

Description Luke McKee 2018-01-14 06:55:07 UTC
Created attachment 514738 [details, diff]
www-client/firefox-57 lto-build patch

The solution to this problem I found on the forums, so I made a patch for my very slightly modified ebuild.

https://forums.gentoo.org/viewtopic-p-7971722.html

The error:

```
Hi! Should/Can I file a Gentoo bug for this? I don't want this to be marked invalid because I am trying to use LTO, so I'm asking here first. 

When building Firefox with LTO, I get this: 

error: unrecognized command line option '--param lto-partitions=1' 

--param lto-partitions=1 is correct according to GCC docs: 
```

The solution brought up on the forum.

```
This has nothing to do with the compiler. It is a shell issue: 

Code:

markus@x4 /tmp % echo | g++ -c -x c++ "--param lto-partitions=1" - 
g++: error: unrecognized command line option ‘--param lto-partitions=1’; did you mean ‘--lto-partition=1to1’? 
markus@x4 /tmp % echo | g++ -c -x c++ "--param=lto-partitions=1" - 
markus@x4 /tmp % 


So just add an =. 
````

This one character patch should probably be backported to the www-client/firefox-52.0.* ebuilds.
Comment 1 Jory A. Pratt gentoo-dev 2018-01-14 13:01:08 UTC

*** This bug has been marked as a duplicate of bug 618392 ***
Comment 2 Luke McKee 2018-01-14 16:43:11 UTC
Not a duplicate. Read the other ticket, it wasn't fixed.
It's a one character patch guys. Come on...
Comment 3 Luke McKee 2018-01-14 16:45:10 UTC
Created attachment 514790 [details]
firefox ebuild with the one patch (not much changed)

Here's the ebuild that works for me, with everything except pgo (profile guided optimization)
Comment 4 Jory A. Pratt gentoo-dev 2018-01-15 15:10:05 UTC
(In reply to Luke McKee from comment #2)
> Not a duplicate. Read the other ticket, it wasn't fixed.
> It's a one character patch guys. Come on...

I am not interested in fixing 57.x branch it will be replaced with 58.0 in less then a week.

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