Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 542178 - dev-lang/php: add new gcov flag
Summary: dev-lang/php: add new gcov flag
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-04 21:26 UTC by Axel Etcheverry
Modified: 2016-12-09 16:17 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 Axel Etcheverry 2015-03-04 21:26:03 UTC
Add gcov flag (--enable-gcov)

Reproducible: Always
Comment 1 Michael Orlitzky gentoo-dev 2016-01-28 02:25:35 UTC
I tried to add this, but it depends on app-benchmarks/ltp. PHP supports a lot of arches, and some of them aren't currently supported by ltp:

  * alpha
  * arm
  * ia64
  * ppc64
  * sparc

To enable gcov painlessly, app-benchmarks/ltp will need to be keyworded for those arches. Do you know if that's possible (i.e. will ltp work at all on those arches)?

If it works -- or should work -- then you can file a bug asking those arches to add keywords to ltp. Once that's done, I can make it a conditional dependency of php.
Comment 2 Michael Orlitzky gentoo-dev 2016-12-09 16:17:07 UTC
So it turns out, the error message says you need LTP, but in fact all you need for PHP to build with --enable-gcov is dev-util/lcov. And that package has all of the necessary keywords.

So, I've added the USE=coverage flag to the three latest revisions in the tree. Hope that helps!

commit 1798839ee565695baa83ea68f08993fa12579ebf
Author: Michael Orlitzky <mjo@gentoo.org>
Date:   Fri Dec 9 09:18:52 2016 -0500

    dev-lang/php: add "coverage" USE flag to build with --enable-gcov.

    We add three new revisions, one for each supported branch of PHP. The
    new revisions have a "coverage" flag, which was chosen because a few
    other packages in ::gentoo have decided on the same flag name. When
    enabled, USE=coverage will pull in dev-util/lcov from the Linux Test
    Project, and PHP will be built with --enable-gcov.

    Since users won't be running code coverage reports on the PHP source
    tree itself (at least not the one used by their package manager), this
    is probably only useful for extension developers who would like to run
    code coverage reports on the test suites for their extensions. It also
    requires GCC to work, since lcov wraps GCC's gcov. Both of those
    caveats have been mentioned in the USE flag description.

    Gentoo-Bug: 542178

    Package-Manager: portage-2.3.0