Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/kernel fix clang build.



details:   https://anonhg.NetBSD.org/src/rev/9e96e06b51b3
branches:  trunk
changeset: 349638:9e96e06b51b3
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Dec 17 03:43:38 2016 +0000

description:
fix clang build.

diffstat:

 tests/kernel/t_ptrace_wait.h |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (23 lines):

diff -r 66b7b8aea5fb -r 9e96e06b51b3 tests/kernel/t_ptrace_wait.h
--- a/tests/kernel/t_ptrace_wait.h      Sat Dec 17 01:32:22 2016 +0000
+++ b/tests/kernel/t_ptrace_wait.h      Sat Dec 17 03:43:38 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_ptrace_wait.h,v 1.3 2016/12/15 08:57:24 kamil Exp $  */
+/*     $NetBSD: t_ptrace_wait.h,v 1.4 2016/12/17 03:43:38 christos Exp $       */
 
 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -380,7 +380,12 @@
  *
  * Tested with GCC 5.4 on NetBSD 7.99.47 amd64
  */
-static int __used __attribute__((optimize("O0")))
+static int __used
+#ifdef __clang__
+__attribute__((__optnone__))
+#else
+__attribute__((__optimize__("O0")))
+#endif
 check_happy(unsigned n)
 {
        for (;;) {



Home | Main Index | Thread Index | Old Index