summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorUlf Hermann <[email protected]>2017-02-24 16:02:31 +0100
committerUlf Hermann <[email protected]>2017-04-28 10:15:14 +0000
commit69cdfee21c15e68ab39fe86a86766bb474c2fc78 (patch)
treee37ce1d7e6d90abf8d15e102e05d15191b94e4d5 /lib
parent76acde30382254f7ca51af67ea91433719080edd (diff)
Check if gcc complains about __attribute__ (visibility(..))
If so, define attribute_hidden to be empty. Also, use attribute_hidden in all places where we hide symbols. Change-Id: I37353459710dbbd1c6c6c46110514fc18515c814 Reviewed-by: Christian Kandeler <[email protected]>
Diffstat (limited to 'lib')
-rw-r--r--lib/ChangeLog5
-rw-r--r--lib/eu-config.h4
2 files changed, 9 insertions, 0 deletions
diff --git a/lib/ChangeLog b/lib/ChangeLog
index 605b9b9d..ecc61795 100644
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,5 +1,10 @@
2017-04-27 Ulf Hermann <[email protected]>
+ * eu-config.h: Define attribute_hidden to be empty if the compiler
+ doesn't support it.
+
+2017-04-27 Ulf Hermann <[email protected]>
+
* Makefile.am: Use fpic_CFLAGS.
2017-04-27 Ulf Hermann <[email protected]>
diff --git a/lib/eu-config.h b/lib/eu-config.h
index 400cdc6e..07098282 100644
--- a/lib/eu-config.h
+++ b/lib/eu-config.h
@@ -68,8 +68,12 @@
#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. */