Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 444544 - [haskell overlay] dev-haskell/accelerate-cuda passes CFLAGS into non-gcc compiler
Summary: [haskell overlay] dev-haskell/accelerate-cuda passes CFLAGS into non-gcc comp...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Haskell Language team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-24 11:46 UTC by Maciej Piechotka
Modified: 2013-09-07 10:55 UTC (History)
0 users

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 Maciej Piechotka 2012-11-24 11:46:42 UTC
If CFLAGS contains unsanitized CFLAGS which are not understood by nvcc then dev-haskell/accelerate-cuda fails to build as it tries to pass it directly. Strangely it works with -ggdb but not -Wa.
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2012-11-24 16:38:08 UTC
(In reply to comment #0)
> If CFLAGS contains unsanitized CFLAGS which are not understood by nvcc then
> dev-haskell/accelerate-cuda fails to build as it tries to pass it directly.
> Strangely it works with -ggdb but not -Wa.

I guess it's due to some sanitizing there is already in-place:

src_configure() {
        # It assumes that configure is run, but does not run it (Andres has
        # patched upstream to fix this).  So need to run configure.  But its
        # difficult to make the configure works as it wants to use
        # /opt/cuda/bin/nvcc which does not understand lots
        # of g++ flags.
        strip-flags
        filter-flags -march* -ggdb -pipe -Wl*
        haskell-cabal_src_configure
}

What are your options?
Comment 2 Maciej Piechotka 2012-11-24 17:29:02 UTC
(In reply to comment #1)
> (In reply to comment #0)
> > If CFLAGS contains unsanitized CFLAGS which are not understood by nvcc then
> > dev-haskell/accelerate-cuda fails to build as it tries to pass it directly.
> > Strangely it works with -ggdb but not -Wa.
> 
> I guess it's due to some sanitizing there is already in-place:
> 
> src_configure() {
>         # It assumes that configure is run, but does not run it (Andres has
>         # patched upstream to fix this).  So need to run configure.  But its
>         # difficult to make the configure works as it wants to use
>         # /opt/cuda/bin/nvcc which does not understand lots
>         # of g++ flags.
>         strip-flags
>         filter-flags -march* -ggdb -pipe -Wl*
>         haskell-cabal_src_configure
> }
> 
> What are your options?

-Wa,--compress-debug-sections (Yes - I understend that it is technically not safe flag but it prevents webkit-gtk build from crashing during compilation when ar tries to create archive bigger then 4G).
Comment 3 Mark Wright gentoo-dev 2013-09-07 10:55:06 UTC
pushed fix in the gentoo-haskell overlay in dev-haskell/accelerate-cuda-0.13.0.3-r1.