Re: [PATCH BlueZ] build: Add coverage support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Luiz,

On Wed, Dec 11, 2013 at 7:55 AM, Luiz Augusto von Dentz
<luiz.dentz@xxxxxxxxx> wrote:
> --- a/acinclude.m4
> +++ b/acinclude.m4
> @@ -51,6 +51,15 @@ AC_DEFUN([MISC_FLAGS], [
>                         misc_ldflags="$misc_ldflags -pie"
>                 fi
>         ])
> +       AC_ARG_ENABLE(coverage, AC_HELP_STRING([--enable-coverage],
> +                       [enable coverage flags]), [
> +               AC_PATH_PROG([LCOV], [lcov])
> +               if (test "$LCOV" && test "${enableval}" = "yes"); then
> +                       misc_cflags="$misc_cflags -ftest-coverage"
> +                       misc_cflags="$misc_cflags -fprofile-arcs"
> +                       misc_ldflags="$misc_ldflags -gcov"
> +               fi
> +       ])

I believe the current recommended (or at least simpler) way to enable
coverage is to use "--coverage" option (both as CFLAGS and LDFLAGS),
instead of separate -ftest-coverage/-fprofile-arcs/-gcov options.
Check "man gcc" for details.

>         AC_SUBST([MISC_CFLAGS], $misc_cflags)
>         AC_SUBST([MISC_LDFLAGS], $misc_ldflags)
>  ])

Best Regards,
-- 
Anderson Lizardo
Instituto Nokia de Tecnologia - INdT
Manaus - Brazil
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux