mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-11 23:16:14 +01:00
glib-compile-resources: ensure alignment is at least sizeof(void *)
This triggered a warning from the CHERI compiler since the struct contains a `void *` but `__attribute__((aligned(8))` reduced alignment to less than the `void *` alignment (which is 16 for Arm Morello). Helps: https://gitlab.gnome.org/GNOME/glib/-/issues/2842
This commit is contained in:
parent
f7d2a58be6
commit
9abbf2eec2
@ -1196,7 +1196,7 @@ main (int argc, char **argv)
|
||||
"#include <gio/gio.h>\n"
|
||||
"\n"
|
||||
"#if defined (__ELF__) && ( __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 6))\n"
|
||||
"# define SECTION __attribute__ ((section (\".gresource.%s\"), aligned (8)))\n"
|
||||
"# define SECTION __attribute__ ((section (\".gresource.%s\"), aligned (sizeof(void *) > 8 ? sizeof(void *) : 8)))\n"
|
||||
"#else\n"
|
||||
"# define SECTION\n"
|
||||
"#endif\n"
|
||||
|
Loading…
Reference in New Issue
Block a user