+2017-08-18 Ulf Hermann <ulf.hermann@qt.io>
+
+ * configure.ac: Check if the compiler supports
+ __attribute__((gcc_struct)).
+
2017-09-19 Mark Wielaard <mark@klomp.org>
* README: Add basic build instructions.
+2017-08-18 Ulf Hermann <ulf.hermann@qt.io>
+
+ * linux-core-note.c: Use attribute_packed.
+
2017-04-27 Ulf Hermann <ulf.hermann@qt.io>
* Makefile.am: Use dso_LDFLAGS.
FIELD (INT, pr_fpvalid);
}
#ifdef ALIGN_PRSTATUS
- __attribute__ ((packed, aligned (ALIGN_PRSTATUS)))
+ attribute_packed __attribute__ ((aligned (ALIGN_PRSTATUS)))
#endif
;
[Defined if __attribute__((visibility())) is supported])
fi
+AC_CACHE_CHECK([whether gcc supports __attribute__((gcc_struct))],
+ ac_cv_gcc_struct, [dnl
+save_CFLAGS="$CFLAGS"
+CFLAGS="$save_CFLAGS -Werror"
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([dnl
+struct test { int x; } __attribute__((gcc_struct));
+])], ac_cv_gcc_struct=yes, ac_cv_gcc_struct=no)
+CFLAGS="$save_CFLAGS"])
+if test "$ac_cv_gcc_struct" = "yes"; then
+ AC_DEFINE([HAVE_GCC_STRUCT], [1],
+ [Defined if __attribute__((gcc_struct)) is supported])
+fi
+
AC_CACHE_CHECK([whether gcc supports -fPIC], ac_cv_fpic, [dnl
save_CFLAGS="$CFLAGS"
CFLAGS="$save_CFLAGS -fPIC -Werror"
+2017-08-18 Ulf Hermann <ulf.hermann@qt.io>
+
+ * eu-config.h: Define attribute_packed to either
+ __attribute__((packed)) or __attribute__((packed, gcc_struct)).
+
2017-04-27 Ulf Hermann <ulf.hermann@qt.io>
* eu-config.h: Define attribute_hidden to be empty if the compiler
#define attribute_hidden /* empty */
#endif
+#ifdef HAVE_GCC_STRUCT
+#define attribute_packed \
+ __attribute__ ((packed, gcc_struct))
+#else
+#define attribute_packed \
+ __attribute__ ((packed))
+#endif
+
/* Define ALLOW_UNALIGNED if the architecture allows operations on
unaligned memory locations. */
#define SANITIZE_UNDEFINED 1
+2017-08-18 Ulf Hermann <ulf.hermann@qt.io>
+
+ * memory-access.h: Use attribute_packed.
+
2017-02-27 Ulf Hermann <ulf.hermann@qt.io>
* Makefile.am: Use fpic_CFLAGS.
int16_t s2;
int32_t s4;
int64_t s8;
- } __attribute__ ((packed));
+ } attribute_packed;
static inline uint16_t
read_2ubyte_unaligned (const void *p)
+2017-08-18 Ulf Hermann <ulf.hermann@qt.io>
+
+ * memory-access.h: Use attribute_packed.
+
2017-02-27 Ulf Hermann <ulf.hermann@qt.io>
* libdwP.h: Use attribute_hidden.
int16_t s2;
int32_t s4;
int64_t s8;
- } __attribute__ ((packed));
+ } attribute_packed;
# define read_2ubyte_unaligned(Dbg, Addr) \
read_2ubyte_unaligned_1 ((Dbg)->other_byte_order, (Addr))
+2017-08-18 Ulf Hermann <ulf.hermann@qt.io>
+
+ * gelf_xlate.c: Use attribute_packed.
+
2017-04-27 Ulf Hermann <ulf.hermann@qt.io>
* libelfP.h: Use attribute_hidden.
uint16_t u16;
uint32_t u32;
uint64_t u64;
- } __attribute__ ((packed));
+ } attribute_packed;
#define FETCH(Bits, ptr) (((const union unaligned *) ptr)->u##Bits)
#define STORE(Bits, ptr, val) (((union unaligned *) ptr)->u##Bits = val)