From 4c920f0f5e591b066544cfda5a2b223ef46334a0 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Fri, 14 Apr 2017 19:48:05 +0100 Subject: [PATCH] =?utf8?q?tests:=20Mark=20tests=20used=20so=20they=20don?= =?utf8?q?=E2=80=99t=20get=20removed=20at=20link=20time?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Without this attribute, these macros were making Weston’s tests fail to build with LTO enabled. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94602 Signed-off-by: Markus Trippelsdorf Signed-off-by: Emmanuel Gil Peyrot Tested-by: Emmanuel Gil Peyrot Reviewed-by: Daniel Stone --- tests/test-runner.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test-runner.h b/tests/test-runner.h index c7a84aa..81ed034 100644 --- a/tests/test-runner.h +++ b/tests/test-runner.h @@ -41,7 +41,7 @@ struct test { static void name(void); \ \ const struct test test##name \ - __attribute__ ((section ("test_section"))) = { \ + __attribute__ ((used, section ("test_section"))) = { \ #name, name, 0 \ }; \ \ @@ -51,7 +51,7 @@ struct test { static void name(void); \ \ const struct test test##name \ - __attribute__ ((section ("test_section"))) = { \ + __attribute__ ((used, section ("test_section"))) = { \ #name, name, 1 \ }; \ \ -- 2.7.4