details: http://hg.nginx.org/njs/rev/6a983847db14 branches: changeset: 180:6a983847db14 user: Igor Sysoev <i...@sysoev.ru> date: Sat Sep 24 22:13:31 2016 +0300 description: All C feature attributes have been disabled for Linux/PPC64.
diffstat: nxt/auto/clang | 155 ++++++++++++++++++++++++++++++------------------------- nxt/nxt_clang.h | 6 -- 2 files changed, 84 insertions(+), 77 deletions(-) diffs (190 lines): diff -r 6c65289c3696 -r 6a983847db14 nxt/auto/clang --- a/nxt/auto/clang Fri Sep 23 11:59:58 2016 +0300 +++ b/nxt/auto/clang Sat Sep 24 22:13:31 2016 +0300 @@ -166,85 +166,98 @@ END # C language features. -nxt_feature="GCC __builtin_expect()" -nxt_feature_name=NXT_HAVE_BUILTIN_EXPECT -nxt_feature_run=no -nxt_feature_incs= -nxt_feature_libs= -nxt_feature_test="int main(int argc, char *const *argv) { - if ((__typeof__(argc == 0)) - __builtin_expect((argc == 0), 0)) - return 0; - return 1; - }" -. ${NXT_AUTO}feature - +nxt_os="$NXT_SYSTEM/$NXT_SYSTEM_PLATFORM" -nxt_feature="GCC __builtin_unreachable()" -nxt_feature_name=NXT_HAVE_BUILTIN_UNREACHABLE -nxt_feature_run=no -nxt_feature_incs= -nxt_feature_libs= -nxt_feature_test="int main() { - __builtin_unreachable(); - }" -. ${NXT_AUTO}feature +if [ "$nxt_os" = "Linux/ppc64le" ]; then + # Old GNU ld linker may hang on Linux ppc64le platform + # if some of these features are enabled. -nxt_feature="GCC __builtin_prefetch()" -nxt_feature_name=NXT_HAVE_BUILTIN_PREFETCH -nxt_feature_run=no -nxt_feature_incs= -nxt_feature_libs= -nxt_feature_test="int main() { - __builtin_prefetch(0); - }" -. ${NXT_AUTO}feature + echo "checking for C language features is disabled for $nxt_os." + +else + + nxt_feature="GCC __builtin_expect()" + nxt_feature_name=NXT_HAVE_BUILTIN_EXPECT + nxt_feature_run=no + nxt_feature_incs= + nxt_feature_libs= + nxt_feature_test="int main(int argc, char *const *argv) { + if ((__typeof__(argc == 0)) + __builtin_expect((argc == 0), 0)) + return 0; + return 1; + }" + . ${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 __builtin_unreachable()" + nxt_feature_name=NXT_HAVE_BUILTIN_UNREACHABLE + nxt_feature_run=no + nxt_feature_incs= + nxt_feature_libs= + nxt_feature_test="int main() { + __builtin_unreachable(); + }" + . ${NXT_AUTO}feature -nxt_feature="GCC __attribute__ aligned" -nxt_feature_name=NXT_HAVE_GCC_ATTRIBUTE_ALIGNED -nxt_feature_run= -nxt_feature_path= -nxt_feature_libs= -nxt_feature_test="int n __attribute__ ((aligned(64))); - - int main() { - return 1; - }" -. ${NXT_AUTO}feature + nxt_feature="GCC __builtin_prefetch()" + nxt_feature_name=NXT_HAVE_BUILTIN_PREFETCH + nxt_feature_run=no + nxt_feature_incs= + nxt_feature_libs= + nxt_feature_test="int main() { + __builtin_prefetch(0); + }" + . ${NXT_AUTO}feature -nxt_feature="GCC __attribute__ malloc" -nxt_feature_name=NXT_HAVE_GCC_ATTRIBUTE_MALLOC -nxt_feature_run= -nxt_feature_path= -nxt_feature_libs= -nxt_feature_test="#include <stdlib.h> - - void *f(void) __attribute__ ((__malloc__)); + 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\"))); - void *f(void) { - return malloc(1); - } + int main() { + return 1; + }" + . ${NXT_AUTO}feature - int main() { - if (f() != NULL) { - return 1; - } - return 0; - }" -. ${NXT_AUTO}feature + + nxt_feature="GCC __attribute__ aligned" + nxt_feature_name=NXT_HAVE_GCC_ATTRIBUTE_ALIGNED + nxt_feature_run= + nxt_feature_path= + nxt_feature_libs= + nxt_feature_test="int n __attribute__ ((aligned(64))); + + int main() { + return 1; + }" + . ${NXT_AUTO}feature + + + nxt_feature="GCC __attribute__ malloc" + nxt_feature_name=NXT_HAVE_GCC_ATTRIBUTE_MALLOC + nxt_feature_run= + nxt_feature_path= + nxt_feature_libs= + nxt_feature_test="#include <stdlib.h> + + void *f(void) __attribute__ ((__malloc__)); + + void *f(void) { + return malloc(1); + } + + int main() { + if (f() != NULL) { + return 1; + } + return 0; + }" + . ${NXT_AUTO}feature + +fi diff -r 6c65289c3696 -r 6a983847db14 nxt/nxt_clang.h --- a/nxt/nxt_clang.h Fri Sep 23 11:59:58 2016 +0300 +++ b/nxt/nxt_clang.h Sat Sep 24 22:13:31 2016 +0300 @@ -61,13 +61,7 @@ #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) _______________________________________________ nginx-devel mailing list nginx-devel@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx-devel