Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 372663 - sys-devel/gcc should USE defaults instead of defining them in make.defaults
Summary: sys-devel/gcc should USE defaults instead of defining them in make.defaults
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on: 474358
Blocks:
  Show dependency tree
 
Reported: 2011-06-23 08:07 UTC by Justin Lecher (RETIRED)
Modified: 2019-02-13 21:51 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Lecher (RETIRED) gentoo-dev 2011-06-23 08:07:59 UTC
from the linux make.defaults

# make sure toolchain has sane defaults <tooclhain@gentoo.org>
USE="${USE} mudflap fortran openmp"

This should be moved to USE defaults as many other packages use openmp and fortran USE.

It has to be discussed if these days openmp should be global anyways.
Comment 1 SpanKY gentoo-dev 2011-06-23 16:28:40 UTC
your logic doesnt make much sense.  the location of use defaults has nothing to do with how other packages `use` or DEPEND on things.  package dependencies on these USE flags being enabled always has to be there.

moving the defaults from the linux profile to the package needs coordination with all the other profile maintainers so they can then set their profile to default with these things off.
Comment 2 Justin Lecher (RETIRED) gentoo-dev 2011-06-23 16:46:05 UTC
Probably I wrote it missleading. Adding the USE to the make.defaults will enable it for all packages, but you want to have it enabled only for gcc. So adding it to the ebuild as enabled by default (IUSE="+openmp +fortran" is what I mean) makes more sense as it doesn't influence other packages. Not every package having a fortran USE needs to have in enabled to be in a sane state.
Comment 3 SpanKY gentoo-dev 2011-06-23 16:55:03 UTC
have you done some basic builds with this change to make sure most things continue to work ?  that way anything that breaks, we can just treat as one-off bugs rather than many people hitting failures ...
Comment 4 Gordon Malm (RETIRED) gentoo-dev 2011-06-23 19:59:09 UTC
I think these have to be treated on an individual basis.  I'm not necessarily opposing moving 'mudflap' or even 'fortran' out of USE in make.defaults and into sys-devel/gcc's IUSE or a package.use entry.  otoh, 'openmp' is utilized (sometimes with quite dramatic performance increase) by other packages like imagemagick.  So if removing it from here would otherwise result in the "global turn-off" of 'openmp' - I would not welcome that change.  That's not to say 'openmp' couldn't be moved to the arch/os (or elsewhere) areas of the profiles where other (global-ish) USE flags are defined.
Comment 5 Ryan Hill (RETIRED) gentoo-dev 2011-06-23 23:31:06 UTC
(In reply to comment #2)
> Probably I wrote it missleading. Adding the USE to the make.defaults will
> enable it for all packages, but you want to have it enabled only for gcc. So
> adding it to the ebuild as enabled by default (IUSE="+openmp +fortran" is what
> I mean) makes more sense as it doesn't influence other packages. Not every
> package having a fortran USE needs to have in enabled to be in a sane state.

We'd have to move every gcc ebuild and toolchain.eclass to EAPI 1.  That's probably minor but there's talk now and then about removing that EAPI, and porting to 2 isn't a walk in the park.  I'd like to stay at 0 if we can.
Comment 6 Justin Lecher (RETIRED) gentoo-dev 2011-06-24 00:09:35 UTC
(In reply to comment #3)
> have you done some basic builds with this change to make sure most things
> continue to work ?  that way anything that breaks, we can just treat as one-off
> bugs rather than many people hitting failures ...

spoken for fortran, this isn't needed globally. Actually most people disable it directly from what I heard. But I would think that beside the performance penalty, also openmp can be remove although this would be not clever. The mudflap I don't know.



(In reply to comment #5)
> We'd have to move every gcc ebuild and toolchain.eclass to EAPI 1.  That's
> probably minor but there's talk now and then about removing that EAPI, and
> porting to 2 isn't a walk in the park.  I'd like to stay at 0 if we can.

That's an argument, although it should be checked how much really has to be done. Once at EAPI=2 it is an easy move to 4.

The comment to the entrance says "make sure toolchain has sane defaults" which is with current EAPI not the correct way to do in make.defaults.
Comment 7 Ryan Hill (RETIRED) gentoo-dev 2011-06-24 02:41:50 UTC
(In reply to comment #6)
> > We'd have to move every gcc ebuild and toolchain.eclass to EAPI 1.  That's
> > probably minor but there's talk now and then about removing that EAPI, and
> > porting to 2 isn't a walk in the park.  I'd like to stay at 0 if we can.
> 
> That's an argument, although it should be checked how much really has to be
> done. Once at EAPI=2 it is an easy move to 4.

That's not a goal we want to aim for.  I'm of the mind that base system packages should be kept at the absolute minimum EAPI possible.

I don't know how hard it would be to move to EAPI 2, just that I'd rather not be forced to find out. :)
Comment 8 SpanKY gentoo-dev 2011-06-24 04:37:06 UTC
true, i hadnt thought of EAPI issues
Comment 9 Francisco Blas Izquierdo Riera gentoo-dev 2012-10-10 21:12:26 UTC
Seems upstream fixed this alreadyi 1.0.1:
http://pcmanfm.git.sourceforge.net/git/gitweb.cgi?p=pcmanfm/libfm;a=commit;h=8972eaaef0bb43491b7578dd3e8c9f14455d1d6a

Hwoarang is the package bumpable? An off by 4 stack overflow may be enough to be exploitable if properly done.
Comment 10 Francisco Blas Izquierdo Riera gentoo-dev 2012-10-10 21:55:14 UTC
Seems I really mistook the browser tab when answering the bug, sorry for that and the added noise. I'm reverting it back.
Comment 11 Alexis Ballier gentoo-dev 2013-08-28 16:56:22 UTC
for bsd, I don't really mind and would really prefer gcc to have use defaults so that we can easily follow toolchain maintainers / upstream defaults.
Comment 12 Ryan Hill (RETIRED) gentoo-dev 2014-01-12 08:15:50 UTC
Actually I'm not sure there's much really calling for USE defaults on gcc...

cxx, nls, openmp, multilib, and nptl are used by used by other ebuilds and should continue to be set in the profiles.

mudflap shouldn't be enabled by default IMO.

fortran is debatable but I don't think it should be enabled either (see my mail to -dev).

nossp and nopie could be changed to ssp and pie, but people are saying they'd rather just see them disappear altogether.  I'd like to hear hardened's opinion on that first though.

Everything else should default to disabled.
Comment 13 Magnus Granberg 2014-01-12 15:41:10 UTC
(In reply to Ryan Hill from comment #12)
> Actually I'm not sure there's much really calling for USE defaults on gcc...
> 
> cxx, nls, openmp, multilib, and nptl are used by used by other ebuilds and
> should continue to be set in the profiles.
Is't cxx needed by default to even build gcc on newer versions?
> 
> mudflap shouldn't be enabled by default IMO.
> 
> fortran is debatable but I don't think it should be enabled either (see my
> mail to -dev).
> 
> nossp and nopie could be changed to ssp and pie, but people are saying
> they'd rather just see them disappear altogether.  I'd like to hear
> hardened's opinion on that first though.
Remove them do we say, but the nopie flag is for disable the pie patching to.

> 
> Everything else should default to disabled.
Comment 14 Ryan Hill (RETIRED) gentoo-dev 2014-01-13 02:44:49 UTC
(In reply to Magnus Granberg from comment #13)

> Is't cxx needed by default to even build gcc on newer versions?

Yes the cxx flag doesn't do anything for >=4.8, but external stuff depends on it and we can't remove it without breaking things right now.
Comment 15 Ryan Hill (RETIRED) gentoo-dev 2014-01-13 06:08:13 UTC
http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain.eclass?r1=1.619&r2=1.620

I'll leave this open until the ebuilds are migrated and the defaults are removed from the profiles.
Comment 16 Rick Farina (Zero_Chaos) gentoo-dev 2014-01-23 01:46:59 UTC
(In reply to Ryan Hill from comment #14)
> (In reply to Magnus Granberg from comment #13)
> 
> > Is't cxx needed by default to even build gcc on newer versions?
> 
> Yes the cxx flag doesn't do anything for >=4.8, but external stuff depends
> on it and we can't remove it without breaking things right now.

I'm pretty sure gcc[cxx(+)] is not a terribly major change.
Comment 17 Ryan Hill (RETIRED) gentoo-dev 2014-01-24 06:34:28 UTC
I'm talking cross-compiling/stage building, not ebuilds.
Comment 18 Fabian Groffen gentoo-dev 2017-11-14 13:26:42 UTC
prefix has no real voice in this
Comment 19 Sergei Trofimovich (RETIRED) gentoo-dev 2019-02-13 21:51:22 UTC
I believe this is done.