2017-04-27 Ulf Hermann <ulf.hermann@qt.io>
+ * configure.ac: Check if the compiler supports
+ __attribute__((visibility(...))).
+
+2017-04-27 Ulf Hermann <ulf.hermann@qt.io>
+
* configure.ac: Check if -fPIC, -fPIE, -Wl,-z,defs,
and -Wl,-z,relro are supported by the compiler.
AS_IF([test "x$ac_cv_c99" != xyes],
AC_MSG_ERROR([gcc with GNU99 support required]))
+AC_CACHE_CHECK([whether gcc supports __attribute__((visibility()))],
+ ac_cv_visibility, [dnl
+save_CFLAGS="$CFLAGS"
+CFLAGS="$save_CFLAGS -Werror"
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([dnl
+int __attribute__((visibility("hidden")))
+foo (int a)
+{
+ return a;
+}])], ac_cv_visibility=yes, ac_cv_visibility=no)
+CFLAGS="$save_CFLAGS"])
+if test "$ac_cv_visibility" = "yes"; then
+ AC_DEFINE([HAVE_VISIBILITY], [1],
+ [Defined if __attribute__((visibility())) is supported])
+fi
+
AC_CACHE_CHECK([whether gcc supports -fPIC], ac_cv_fpic, [dnl
save_CFLAGS="$CFLAGS"
CFLAGS="$save_CFLAGS -fPIC -Werror"
2017-04-27 Ulf Hermann <ulf.hermann@qt.io>
+ * eu-config.h: Define attribute_hidden to be empty if the compiler
+ doesn't support it.
+
+2017-04-27 Ulf Hermann <ulf.hermann@qt.io>
+
* Makefile.am: Use fpic_CFLAGS.
2017-07-18 Mark Wielaard <mark@klomp.org>
#define internal_strong_alias(name, aliasname) \
extern __typeof (name) aliasname __attribute__ ((alias (#name))) internal_function;
+#ifdef HAVE_VISIBILITY
#define attribute_hidden \
__attribute__ ((visibility ("hidden")))
+#else
+#define attribute_hidden /* empty */
+#endif
/* Define ALLOW_UNALIGNED if the architecture allows operations on
unaligned memory locations. */
2017-02-27 Ulf Hermann <ulf.hermann@qt.io>
+ * libdwP.h: Use attribute_hidden.
+ * libdw_alloc.c: Likewise.
+
+2017-02-27 Ulf Hermann <ulf.hermann@qt.io>
+
* Makefile.am: Use fpic_CFLAGS and dso_LDFLAGS.
2017-07-26 Mark Wielaard <mark@klomp.org>
__attribute__ ((__malloc__)) __nonnull_attribute__ (1);
/* Default OOM handler. */
-extern void __libdw_oom (void) __attribute ((noreturn, visibility ("hidden")));
+extern void __libdw_oom (void) __attribute ((noreturn)) attribute_hidden;
/* Allocate the internal data for a unit not seen before. */
extern struct Dwarf_CU *__libdw_intern_next_unit (Dwarf *dbg, bool debug_types)
void
-__attribute ((noreturn, visibility ("hidden")))
+__attribute ((noreturn)) attribute_hidden
__libdw_oom (void)
{
while (1)
2017-04-27 Ulf Hermann <ulf.hermann@qt.io>
+ * libelfP.h: Use attribute_hidden.
+
+2017-04-27 Ulf Hermann <ulf.hermann@qt.io>
+
* Makefile.am: Use fpic_CFLAGS and dso_LDFLAGS.
2017-08-15 Mark Wielaard <mark@klomp.org>
extern unsigned int __elf_version_internal (unsigned int __version)
attribute_hidden;
extern unsigned long int __elf_hash_internal (const char *__string)
- __attribute__ ((__pure__, visibility ("hidden")));
+ __attribute__ ((__pure__)) attribute_hidden;
extern long int __elf32_checksum_internal (Elf *__elf) attribute_hidden;
extern long int __elf64_checksum_internal (Elf *__elf) attribute_hidden;