Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 329615 - dev-libs/gmp requires CPPFLAGS="-fexceptions" in order to support sys-devel/gcc with USE=graphite (suggested patches included)
Summary: dev-libs/gmp requires CPPFLAGS="-fexceptions" in order to support sys-devel/g...
Status: RESOLVED DUPLICATE of bug 294978
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-23 18:14 UTC by Phil Stracchino (Unix Ronin)
Modified: 2010-07-24 21:37 UTC (History)
1 user (show)

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


Attachments
Patch for dev-libs/gmp ebuild (gmp-ebuild.diff,920 bytes, patch)
2010-07-23 18:15 UTC, Phil Stracchino (Unix Ronin)
Details | Diff
Patch for dev-libs/ppl ebuild (ppl-ebuild.diff,554 bytes, patch)
2010-07-23 18:16 UTC, Phil Stracchino (Unix Ronin)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Phil Stracchino (Unix Ronin) 2010-07-23 18:14:00 UTC
Recent versions of sys-devel/gcc have an option to use the new 'graphite' loop optimization feature of gcc.  This requires dev-libs/ppl and dev-libs/cloog-ppl, in addition to the dev-libs/gmp already required by sys-devel/gcc.  However, dev-libs/ppl REQUIRES that dev-libs/gmp be built using CPPFLAGS="-fexceptions".  There is currently no mechanism to enable CPPFLAGS="-fexceptions" *only* for dev-libs/gmp other than by doing it manually every time dev-libs/gmp is compiled.

I have found no package that uses dev-libs/gmp for which compilation of dev-libs/gmp with CPPFLAGS="-fexceptions" is harmful.  However, there do appear to be some packages (including, it appears, media-video/vlc) which themselves fail to build in the presence of CPPFLAGS="-fexceptions".  (It looks as though the problem is the Qt4 moc tool does not get along with -fexceptions.)

I see two obvious possible solutions to this issue:

(a) [simpler, PROBABLY safe]  Simply add CPPFLAGS="-fexceptions" to dev-libs/gmp by default.

(b) [better, safe]  Add an exceptions USE flag to dev-libs/gmp, and add dev-libs/gmp[exceptions] to the dependencies for dev-libs/ppl

I have tested the latter and it seems to work correctly.

Reproducible: Always
Comment 1 Phil Stracchino (Unix Ronin) 2010-07-23 18:15:23 UTC
Created attachment 239941 [details, diff]
Patch for dev-libs/gmp ebuild
Comment 2 Phil Stracchino (Unix Ronin) 2010-07-23 18:16:04 UTC
Created attachment 239943 [details, diff]
Patch for dev-libs/ppl ebuild
Comment 3 Rafał Mużyło 2010-07-24 01:58:22 UTC
On one hand, there's bug 294978, on the other, there's seems to be a misunderstanding there.

Though, '-fexceptions' seems to belong to CXXFLAGS, not preprocessor.

Do you have any sources more verbose than that configure message on *why*
is that needed and why the other upstream  doesn't even suggest it ?
Comment 4 Ryan Hill (RETIRED) gentoo-dev 2010-07-24 03:14:06 UTC
Your gmp isn't being built correctly.

*** This bug has been marked as a duplicate of bug 294978 ***
Comment 5 Phil Stracchino (Unix Ronin) 2010-07-24 21:37:42 UTC
Rafal, I put -fexceptions in CPPFLAGS because that's where the configure warning from dev-libs/ppl told me to.

Ryan, my dev-libs/gmp is being built correctly, but I had to set it up by hand to do so.  I was proposing these small changes so that other people wanting to use sys-devel/gcc[graphite] would have an existing mechanism to set it up correctly.