[waffle] [PATCH] cmake: Fix test for thread-local storage

Paul Berry stereotype441 at gmail.com
Wed Aug 21 07:07:30 PDT 2013


On 20 August 2013 13:08, Chad Versace <chad.versace at linux.intel.com> wrote:

> Commit 6fcbe52 "cmake: Refactor compiler flags into new module" exposed a
> bug
> in the test for thread-local storage, causing the test to always fail. If
> the
> regex "warning|error" appears in the compiler log, then the test fails.
> This
> causes false failures when the test invokes the compiler with
> '-Werror=missing-prototypes'.
>
> Fix the regex to more closely match gcc and clang error messages.
>
> Reported-by: Paul Berry <stereotype441 at gmail.com>
> Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
>

Confirmed that with this patch, my build uses TLS again.

Tested-by: Paul Berry <stereotype441 at gmail.com>


> ---
>  cmake/Modules/WaffleCheckThreadLocalStorage.cmake | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/cmake/Modules/WaffleCheckThreadLocalStorage.cmake
> b/cmake/Modules/WaffleCheckThreadLocalStorage.cmake
> index c8bc3fe..f988f6f 100644
> --- a/cmake/Modules/WaffleCheckThreadLocalStorage.cmake
> +++ b/cmake/Modules/WaffleCheckThreadLocalStorage.cmake
> @@ -61,7 +61,7 @@ macro(waffle_check_thread_local_storage)
>
>          waffle_has_tls
>
> -        FAIL_REGEX "warning|error"
> +        FAIL_REGEX "warning: |error: "
>          )
>
>      check_c_source_compiles(
> @@ -77,6 +77,6 @@ macro(waffle_check_thread_local_storage)
>
>          waffle_has_tls_model_initial_exec
>
> -        FAIL_REGEX "warning|error"
> +        FAIL_REGEX "warning: |error: "
>          )
>  endmacro()
> --
> 1.8.3.1
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/waffle/attachments/20130821/69406a6f/attachment.html>


More information about the waffle mailing list