Without this attribute, the test macros were making Weston fail to
build with LTO enabled.
Signed-off-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Signed-off-by: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
Tested-by: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
static void func(void *); \
\
const struct weston_test test##name \
- __attribute__ ((section ("test_section"))) = \
+ __attribute__ ((used, section ("test_section"))) = \
{ \
#name, func, data, size, n_elem, ret \
};
static void zuctest_##tcase##_##test(void); \
\
const struct zuc_registration zzz_##tcase##_##test \
- __attribute__ ((section ("zuc_tsect"))) = \
+ __attribute__ ((used, section ("zuc_tsect"))) = \
{ \
#tcase, #test, 0, \
zuctest_##tcase##_##test, \
static void zuctest_##tcase##_##test(void *param); \
\
const struct zuc_registration zzz_##tcase##_##test \
- __attribute__ ((section ("zuc_tsect"))) = \
+ __attribute__ ((used, section ("zuc_tsect"))) = \
{ \
#tcase, #test, &tcase, \
0, \