Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 267275 - fftw-3.2.1 should check for gcc-apple when evaluating openmp use-flag
Summary: fftw-3.2.1 should check for gcc-apple when evaluating openmp use-flag
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All OS X
: High normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 267282
  Show dependency tree
 
Reported: 2009-04-23 22:15 UTC by Maximilian Nickel
Modified: 2009-04-28 19:24 UTC (History)
0 users

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


Attachments
Simple patch for the ebuild (fftw-3.2.1.diff,439 bytes, patch)
2009-04-23 22:17 UTC, Maximilian Nickel
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Maximilian Nickel 2009-04-23 22:15:06 UTC
The fftw ebuild currently checks if gcc was compiled with the openmp use-flag when itself is emerged with the openmp flag.
gcc-apple doesn't have such a flag and instead comes with openmp by default. So the ebuild should check if the current compiler is gcc-apple, or else one would have to install gcc just for (already existing) openmp support.
Comment 1 Maximilian Nickel 2009-04-23 22:17:29 UTC
Created attachment 189264 [details, diff]
Simple patch for the ebuild

I wasn't sure what the right way is to check if the current compiler is gcc-apple. The patch just checks if "apple" is included in tc-getCC
Comment 2 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-04-28 15:05:36 UTC
(In reply to comment #1)
> Created an attachment (id=189264) [edit]
> Simple patch for the ebuild
> 
> I wasn't sure what the right way is to check if the current compiler is
> gcc-apple. The patch just checks if "apple" is included in tc-getCC
> 

grobian: would this be better?

Index: fftw-3.2.1.ebuild
===================================================================
--- fftw-3.2.1.ebuild   (revision 44166)
+++ fftw-3.2.1.ebuild   (working copy)
@@ -22,7 +22,7 @@
                FFTW_THREADS="--enable-threads --disable-openmp"
        fi
        if use openmp &&
-               [[ $(tc-getCC)$ == *gcc* ]] &&
+               [[ $(tc-getCC)$ != *apple* ]] &&
                ( [[ $(gcc-major-version)$(gcc-minor-version) -lt 42 ]] ||
                        ! built_with_use sys-devel/gcc openmp )
        then
Comment 3 Fabian Groffen gentoo-dev 2009-04-28 15:52:14 UTC
I'd say not, since the built_with_use check uses sys-devel/gcc.  (think of other compilers used like icc, sunstudio, open64, etc.)

Hence, I'd do something like this:

Index: fftw-3.2.1.ebuild
===================================================================
--- fftw-3.2.1.ebuild   (revision 44166)
+++ fftw-3.2.1.ebuild   (working copy)
@@ -23,6 +23,6 @@
        fi
        if use openmp &&
                [[ $(tc-getCC)$ == *gcc* ]] &&
+               [[ $(tc-getCC)$ != *apple* ]] &&
                ( [[ $(gcc-major-version)$(gcc-minor-version) -lt 42 ]] ||
                        ! built_with_use sys-devel/gcc openmp )
        then
Comment 4 Fabian Groffen gentoo-dev 2009-04-28 19:24:13 UTC
Original patch applied, as it is what I suggested myself.  Thanks!