[njs] The visibility attribute disabling in the commit af6c17324584

Igor Sysoev igor at sysoev.ru
Fri Sep 23 11:00:22 UTC 2016


details:   http://hg.nginx.org/njs/rev/6c65289c3696
branches:  
changeset: 179:6c65289c3696
user:      Igor Sysoev <igor at sysoev.ru>
date:      Fri Sep 23 11:59:58 2016 +0300
description:
The visibility attribute disabling in the commit af6c17324584
had not resovled the issue.  So now it is enabled and the aligment
attribute has been disabled instead for Linux/PPC64.

diffstat:

 nxt/auto/clang  |  13 +++++++++++++
 nxt/nxt_clang.h |  22 ++++++++++++++--------
 2 files changed, 27 insertions(+), 8 deletions(-)

diffs (62 lines):

diff -r 9d09f9a522d6 -r 6c65289c3696 nxt/auto/clang
--- a/nxt/auto/clang	Fri Sep 23 11:59:56 2016 +0300
+++ b/nxt/auto/clang	Fri Sep 23 11:59:58 2016 +0300
@@ -202,6 +202,19 @@ nxt_feature_test="int main() {
 . ${NXT_AUTO}feature
 
 
+nxt_feature="GCC __attribute__ visibility"
+nxt_feature_name=NXT_HAVE_GCC_ATTRIBUTE_VISIBILITY
+nxt_feature_run=
+nxt_feature_path=
+nxt_feature_libs=
+nxt_feature_test="int n __attribute__ ((visibility(\"default\")));
+
+                  int main() {
+                      return 1;
+                  }"
+. ${NXT_AUTO}feature
+
+
 nxt_feature="GCC __attribute__ aligned"
 nxt_feature_name=NXT_HAVE_GCC_ATTRIBUTE_ALIGNED
 nxt_feature_run=
diff -r 9d09f9a522d6 -r 6c65289c3696 nxt/nxt_clang.h
--- a/nxt/nxt_clang.h	Fri Sep 23 11:59:56 2016 +0300
+++ b/nxt/nxt_clang.h	Fri Sep 23 11:59:58 2016 +0300
@@ -60,6 +60,20 @@
 #endif
 
 
+#if (NXT_HAVE_GCC_ATTRIBUTE_ALIGNED)
+
+#if (NXT_LINUX && __PPC64__)
+/* Old GNU ld linker may hang on Linux ppc64le platform. */
+#define nxt_aligned(x)
+#else
+#define nxt_aligned(x)     __attribute__((aligned(x)))
+#endif
+
+#else
+#define nxt_aligned(x)
+#endif
+
+
 #if (NXT_HAVE_GCC_ATTRIBUTE_MALLOC)
 #define NXT_MALLOC_LIKE    __attribute__((__malloc__))
 
@@ -68,14 +82,6 @@
 #endif
 
 
-#if (NXT_HAVE_GCC_ATTRIBUTE_ALIGNED)
-#define nxt_aligned(x)     __attribute__((aligned(x)))
-
-#else
-#define nxt_aligned(x)
-#endif
-
-
 #if (NXT_CLANG)
 /* Any __asm__ directive disables loop vectorization in GCC and Clang. */
 #define nxt_pragma_loop_disable_vectorization  __asm__("")



More information about the nginx-devel mailing list