From ae265e3498531246e7d8cfbaeccfeb573dffc8fa Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Fri, 23 Sep 2016 11:59:58 +0300 Subject: [PATCH] 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. --- nxt/auto/clang | 13 +++++++++++++ nxt/nxt_clang.h | 18 ++++++++++++------ 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/nxt/auto/clang b/nxt/auto/clang index 12298148..c041e191 100644 --- a/nxt/auto/clang +++ b/nxt/auto/clang @@ -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 --git a/nxt/nxt_clang.h b/nxt/nxt_clang.h index af381adb..c409491a 100644 --- a/nxt/nxt_clang.h +++ b/nxt/nxt_clang.h @@ -60,19 +60,25 @@ #endif -#if (NXT_HAVE_GCC_ATTRIBUTE_MALLOC) -#define NXT_MALLOC_LIKE __attribute__((__malloc__)) +#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_MALLOC_LIKE +#define nxt_aligned(x) __attribute__((aligned(x))) +#endif + +#else +#define nxt_aligned(x) #endif -#if (NXT_HAVE_GCC_ATTRIBUTE_ALIGNED) -#define nxt_aligned(x) __attribute__((aligned(x))) +#if (NXT_HAVE_GCC_ATTRIBUTE_MALLOC) +#define NXT_MALLOC_LIKE __attribute__((__malloc__)) #else -#define nxt_aligned(x) +#define NXT_MALLOC_LIKE #endif -- 2.47.3