Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 486992 - app-emulation/simh-3.9.0-r1 does not respect CFLAGS / LDFLAGS - automagically sets -flto -fwhole-program
Summary: app-emulation/simh-3.9.0-r1 does not respect CFLAGS / LDFLAGS - automagically...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sergei Trofimovich (RETIRED)
URL:
Whiteboard:
Keywords: EBUILD, PATCH
: 493200 (view as bug list)
Depends on:
Blocks: lto
  Show dependency tree
 
Reported: 2013-10-05 08:09 UTC by Nico Baggus
Modified: 2020-01-30 11:28 UTC (History)
2 users (show)

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


Attachments
ebuild with lto fix. (simh-3.9.0-r10.ebuild,1.59 KB, text/plain)
2018-01-07 20:08 UTC, Nico Baggus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nico Baggus 2013-10-05 08:09:23 UTC
Appearantly lto now need to be explicitely set.

so there is a dependcy on sys-devel/gcc[lto]

Reproducible: Always

Steps to Reproduce:
1.starting stage3 + /etc/portage & world from existing system with simh
2.emerge --noreplace -DN $( cat /home/original-world )
3.
Actual Results:  
simh built failed, claiming that for -flto use gcc should be built with LTO support

Expected Results:  
simh building

occurred during a rebuild of a system on a computer.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2013-10-05 14:35:24 UTC
1) Please post your `emerge --info' output in a comment.
2) Please attach the entire app-emulation/simh build log to this bug report.
Comment 2 Nico Baggus 2013-10-05 15:15:26 UTC
Buildlog is unavailable.

after rebuilding gcc WITH lto use flags, the build of this did work.
So the evidence was destroyed during analysis on my side.

The build of simh failed with a  message the gcc cant do -flto  unless support was compiled in.

The gcc package was built -lto  before. (defaults from stage 3).

After
USE=lto emerge gcc
emerge simh 

the build was successful.

After which i made the lto change permanent in /etc/portage/package.use
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2013-10-05 16:42:23 UTC
(In reply to Jeroen Roovers from comment #1)
> 1) Please post your `emerge --info' output in a comment.
Comment 4 Nico Baggus 2013-10-05 16:58:38 UTC
Next time i build a laptup up from the group i'll keep the info...,
(i had the impression logs were kept in /var/log/portage/elog...
appearantly not.

Say nxt comes info comes in a year or two..
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2013-10-05 17:08:13 UTC
The only way this would fail is where you set CFLAGS=-flto without having built sys-devel/gcc with USE=lto.
Comment 6 Nico Baggus 2013-10-05 17:54:59 UTC
CFLAGS="-O2 --pipe --mno-tls-direct-seg-refs"
I mistook the version number it's 3.9.0-r1 (set in header )

i need to transfer files by hand using a disk, and it is still rebuilding stuff from the disk...
 So CFLAGS has no -flto

simh gcc command lines are all terminated with:  -lvdeplug -Wl,--as-needed -flto --fwhole-program
Comment 7 Nico Baggus 2013-10-05 18:07:59 UTC
in the make file for simh they have a line:

ifneq (,$(findstring $(GCC_VERSION),$(LTO_EXCLUDE_VERSIONS)))
 NO_LTO = 1
endif

and later:
based on this flag the option -flto -fwhole-program
is added to the commandline.

So if the "right" version of gcc is installed, they add -flto themselves.

So it's not invalid. (I made it a wontfix for this).

Additional info
i did have gcc 4.6.3 ( active compiler) without lto
and gcc 4.7.3 with lto. (was installed during update, and not activated by me yet).

I have no problem with not wanting to fix it, just wanted to help gentoo a bit in the right way... I already DID disect the problem, and fix it for myself.
Just spilling the info for someone else to follow up...

Please ignore if you don't like this kind of help.
Then please indicate you don;t like this kind of info posted.
Comment 8 Nico Baggus 2013-10-05 18:08:57 UTC
Oh by the there are in total about 10 packages that don't build out of the box when do such a transplant like i tried now.
Comment 9 Sergey Popov gentoo-dev 2013-12-29 10:35:11 UTC
*** Bug 493200 has been marked as a duplicate of this bug. ***
Comment 10 Nico Baggus 2015-02-11 21:59:25 UTC
package compiles & installs cleanly,
this can be stabalized as far as i am concerned.

t/y/
Comment 11 Nico Baggus 2018-01-07 20:08:17 UTC
Created attachment 513696 [details]
ebuild with lto fix.

Ebuild with Fix as well as an option to install beta's for simg (-beta)
Comment 12 Sergei Trofimovich (RETIRED) gentoo-dev 2020-01-30 11:28:12 UTC
gcc now unconditionally enables lto plugin. Please report a new bug if it still fails for you and we can consider making lto optional.