Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Rework the changes to DTRACE/ZFS files that were fixing Clan...
details: https://anonhg.NetBSD.org/src/rev/18c861412c52
branches: trunk
changeset: 320264:18c861412c52
user: kamil <kamil%NetBSD.org@localhost>
date: Fri Jun 29 11:33:46 2018 +0000
description:
Rework the changes to DTRACE/ZFS files that were fixing Clang/LLVM build
Rever changes to upstream files and replace them with additional -Wno-
compiler argument flags.
Tested with base LLVM.
Requested by <chuq>
diffstat:
external/cddl/osnet/dev/dtrace/dtrace_hacks.c | 6 ++----
external/cddl/osnet/dev/dtrace/x86/dis_tables.c | 2 +-
external/cddl/osnet/dev/profile/profile.c | 6 +++---
external/cddl/osnet/dev/systrace/systrace.c | 4 ++--
external/cddl/osnet/dist/cmd/dtrace/dtrace.c | 8 ++++----
external/cddl/osnet/dist/uts/common/dtrace/dtrace.c | 4 ++--
external/cddl/osnet/usr.sbin/dtrace/Makefile | 3 ++-
sys/modules/dtrace/dtrace/Makefile | 5 ++++-
sys/modules/dtrace/linux32_syscall/Makefile | 1 +
sys/modules/dtrace/linux_syscall/Makefile | 1 +
sys/modules/dtrace/netbsd32_syscall/Makefile | 1 +
sys/modules/dtrace/profile/Makefile | 3 ++-
sys/modules/dtrace/syscall/Makefile | 1 +
13 files changed, 26 insertions(+), 19 deletions(-)
diffs (219 lines):
diff -r f4d3b34bc496 -r 18c861412c52 external/cddl/osnet/dev/dtrace/dtrace_hacks.c
--- a/external/cddl/osnet/dev/dtrace/dtrace_hacks.c Fri Jun 29 04:02:10 2018 +0000
+++ b/external/cddl/osnet/dev/dtrace/dtrace_hacks.c Fri Jun 29 11:33:46 2018 +0000
@@ -1,15 +1,13 @@
-/* $NetBSD: dtrace_hacks.c,v 1.7 2018/06/06 15:54:03 kamil Exp $ */
+/* $NetBSD: dtrace_hacks.c,v 1.8 2018/06/29 11:33:46 kamil Exp $ */
/* $FreeBSD: head/sys/cddl/dev/dtrace/dtrace_hacks.c 281916 2015-04-24 03:19:30Z markj $ */
/* XXX Hacks.... */
-#include <sys/cdefs.h>
-
dtrace_cacheid_t dtrace_predcache_id;
boolean_t
priv_policy_only(const cred_t *cr, int b, boolean_t c)
{
- return kauth_authorize_generic(__UNCONST(cr), KAUTH_GENERIC_ISSUSER, NULL) == 0;
+ return kauth_authorize_generic(cr, KAUTH_GENERIC_ISSUSER, NULL) == 0;
}
diff -r f4d3b34bc496 -r 18c861412c52 external/cddl/osnet/dev/dtrace/x86/dis_tables.c
--- a/external/cddl/osnet/dev/dtrace/x86/dis_tables.c Fri Jun 29 04:02:10 2018 +0000
+++ b/external/cddl/osnet/dev/dtrace/x86/dis_tables.c Fri Jun 29 11:33:46 2018 +0000
@@ -2345,7 +2345,7 @@
uint_t dgr_arg0; /* src reg */
uint_t dgr_arg1; /* vsib reg */
uint_t dgr_arg2; /* dst reg */
- const char *dgr_suffix; /* suffix to append */
+ char *dgr_suffix; /* suffix to append */
} dis_gather_regs_t;
static dis_gather_regs_t dis_vgather[4][2][2] = {
diff -r f4d3b34bc496 -r 18c861412c52 external/cddl/osnet/dev/profile/profile.c
--- a/external/cddl/osnet/dev/profile/profile.c Fri Jun 29 04:02:10 2018 +0000
+++ b/external/cddl/osnet/dev/profile/profile.c Fri Jun 29 11:33:46 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: profile.c,v 1.9 2018/06/06 17:19:49 kamil Exp $ */
+/* $NetBSD: profile.c,v 1.10 2018/06/29 11:33:46 kamil Exp $ */
/*
* CDDL HEADER START
@@ -434,7 +434,7 @@
char *name, *suffix = NULL;
const struct {
- const char *prefix;
+ char *prefix;
int kind;
} types[] = {
{ PROF_PREFIX_PROFILE, PROF_PROFILE },
@@ -443,7 +443,7 @@
};
const struct {
- const char *name;
+ char *name;
hrtime_t mult;
} suffixes[] = {
{ "ns", NANOSEC / NANOSEC },
diff -r f4d3b34bc496 -r 18c861412c52 external/cddl/osnet/dev/systrace/systrace.c
--- a/external/cddl/osnet/dev/systrace/systrace.c Fri Jun 29 04:02:10 2018 +0000
+++ b/external/cddl/osnet/dev/systrace/systrace.c Fri Jun 29 11:33:46 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: systrace.c,v 1.11 2018/06/06 17:47:10 kamil Exp $ */
+/* $NetBSD: systrace.c,v 1.12 2018/06/29 11:33:46 kamil Exp $ */
/*
* CDDL HEADER START
@@ -356,7 +356,7 @@
#else
const char *name = ALTSYSCALLNAMES[i] ? ALTSYSCALLNAMES[i] :
SYSCALLNAMES[i];
- if (dtrace_probe_lookup(systrace_id, NULL, __UNCONST(name), __UNCONST("entry")) != 0)
+ if (dtrace_probe_lookup(systrace_id, NULL, name, "entry") != 0)
continue;
(void) dtrace_probe_create(systrace_id, NULL,
diff -r f4d3b34bc496 -r 18c861412c52 external/cddl/osnet/dist/cmd/dtrace/dtrace.c
--- a/external/cddl/osnet/dist/cmd/dtrace/dtrace.c Fri Jun 29 04:02:10 2018 +0000
+++ b/external/cddl/osnet/dist/cmd/dtrace/dtrace.c Fri Jun 29 11:33:46 2018 +0000
@@ -555,7 +555,7 @@
print_probe_info(const dtrace_probeinfo_t *p)
{
char buf[BUFSIZ];
- const char *user;
+ char *user;
int i;
oprintf("\n\tProbe Description Attributes\n");
@@ -1164,8 +1164,8 @@
int i;
struct {
- const char *name;
- const char *optname;
+ char *name;
+ char *optname;
dtrace_optval_t val;
} bufs[] = {
{ "buffer size", "bufsize" },
@@ -1221,7 +1221,7 @@
for (i = 0; rates[i].name != NULL; i++) {
dtrace_optval_t nval;
- const char *dir;
+ char *dir;
if (rates[i].val == DTRACEOPT_UNSET)
continue;
diff -r f4d3b34bc496 -r 18c861412c52 external/cddl/osnet/dist/uts/common/dtrace/dtrace.c
--- a/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c Fri Jun 29 04:02:10 2018 +0000
+++ b/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c Fri Jun 29 11:33:46 2018 +0000
@@ -1263,7 +1263,7 @@
* Compare two strings using safe loads.
*/
static int
-dtrace_strncmp(const char *s1, const char *s2, size_t limit)
+dtrace_strncmp(char *s1, char *s2, size_t limit)
{
uint8_t c1, c2;
volatile uint16_t *flags;
@@ -6592,7 +6592,7 @@
size_t sz = state->dts_options[DTRACEOPT_STRSIZE];
uintptr_t s1 = regs[r1];
uintptr_t s2 = regs[r2];
- size_t lim1 = 0, lim2 = 0;
+ size_t lim1, lim2;
if (s1 != 0 &&
!dtrace_strcanload(s1, sz, &lim1, mstate, vstate))
diff -r f4d3b34bc496 -r 18c861412c52 external/cddl/osnet/usr.sbin/dtrace/Makefile
--- a/external/cddl/osnet/usr.sbin/dtrace/Makefile Fri Jun 29 04:02:10 2018 +0000
+++ b/external/cddl/osnet/usr.sbin/dtrace/Makefile Fri Jun 29 11:33:46 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.12 2018/06/07 13:21:44 kamil Exp $
+# $NetBSD: Makefile,v 1.13 2018/06/29 11:33:47 kamil Exp $
# $FreeBSD: head/cddl/usr.sbin/dtrace/Makefile 314654 2017-03-04 11:30:04Z ngie $
@@ -34,6 +34,7 @@
COPTS.dtrace.c += -Wno-shadow
COPTS.dtrace.c += ${${ACTIVE_CC} == "gcc" :? -Wno-discarded-qualifiers :}
COPTS.dtrace.c += ${${ACTIVE_CC} == "gcc" :? -Wno-unused-but-set-variable :}
+COPTS.dtrace.c += ${${ACTIVE_CC} == "clang" :? -Wno-incompatible-pointer-types-discards-qualifiers :}
COPTS.dtrace.c += -Wno-missing-field-initializers
COPTS.dtrace.c += -Wno-format
diff -r f4d3b34bc496 -r 18c861412c52 sys/modules/dtrace/dtrace/Makefile
--- a/sys/modules/dtrace/dtrace/Makefile Fri Jun 29 04:02:10 2018 +0000
+++ b/sys/modules/dtrace/dtrace/Makefile Fri Jun 29 11:33:46 2018 +0000
@@ -44,7 +44,10 @@
-Wno-unused-variable \
-Wno-unused-function
-CPPFLAGS+= ${${ACTIVE_CC} == "gcc" :? -Wno-discarded-qualifiers :}
+CPPFLAGS+= ${${ACTIVE_CC} == "gcc" :? -Wno-discarded-qualifiers :}
+CPPFLAGS+= ${${ACTIVE_CC} == "clang" :? \
+ -Wno-sometimes-uninitialized \
+ -Wno-incompatible-pointer-types-discards-qualifiers :}
COPTS.dis_tables.c+= \
-Wno-missing-field-initializers \
diff -r f4d3b34bc496 -r 18c861412c52 sys/modules/dtrace/linux32_syscall/Makefile
--- a/sys/modules/dtrace/linux32_syscall/Makefile Fri Jun 29 04:02:10 2018 +0000
+++ b/sys/modules/dtrace/linux32_syscall/Makefile Fri Jun 29 11:33:46 2018 +0000
@@ -14,5 +14,6 @@
CPPFLAGS+= -Wno-unknown-pragmas
CPPFLAGS+= ${${ACTIVE_CC} == "gcc" :? -Wno-discarded-qualifiers :}
+CPPFLAGS+= ${${ACTIVE_CC} == "clang" :? -Wno-incompatible-pointer-types-discards-qualifiers :}
.include <bsd.kmodule.mk>
diff -r f4d3b34bc496 -r 18c861412c52 sys/modules/dtrace/linux_syscall/Makefile
--- a/sys/modules/dtrace/linux_syscall/Makefile Fri Jun 29 04:02:10 2018 +0000
+++ b/sys/modules/dtrace/linux_syscall/Makefile Fri Jun 29 11:33:46 2018 +0000
@@ -14,5 +14,6 @@
CPPFLAGS+= -Wno-unknown-pragmas
CPPFLAGS+= ${${ACTIVE_CC} == "gcc" :? -Wno-discarded-qualifiers :}
+CPPFLAGS+= ${${ACTIVE_CC} == "clang" :? -Wno-incompatible-pointer-types-discards-qualifiers :}
.include <bsd.kmodule.mk>
diff -r f4d3b34bc496 -r 18c861412c52 sys/modules/dtrace/netbsd32_syscall/Makefile
--- a/sys/modules/dtrace/netbsd32_syscall/Makefile Fri Jun 29 04:02:10 2018 +0000
+++ b/sys/modules/dtrace/netbsd32_syscall/Makefile Fri Jun 29 11:33:46 2018 +0000
@@ -14,5 +14,6 @@
CPPFLAGS+= -Wno-unknown-pragmas
CPPFLAGS+= ${${ACTIVE_CC} == "gcc" :? -Wno-discarded-qualifiers :}
+CPPFLAGS+= ${${ACTIVE_CC} == "clang" :? -Wno-incompatible-pointer-types-discards-qualifiers :}
.include <bsd.kmodule.mk>
diff -r f4d3b34bc496 -r 18c861412c52 sys/modules/dtrace/profile/Makefile
--- a/sys/modules/dtrace/profile/Makefile Fri Jun 29 04:02:10 2018 +0000
+++ b/sys/modules/dtrace/profile/Makefile Fri Jun 29 11:33:46 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2018/06/07 13:21:44 kamil Exp $
+# $NetBSD: Makefile,v 1.7 2018/06/29 11:33:47 kamil Exp $
.include "../../Makefile.inc"
@@ -14,5 +14,6 @@
CPPFLAGS+= -Wno-unknown-pragmas -Wno-cast-qual
CPPFLAGS+= ${${ACTIVE_CC} == "gcc" :? -Wno-discarded-qualifiers :}
+CPPFLAGS+= ${${ACTIVE_CC} == "clang" :? -Wno-incompatible-pointer-types-discards-qualifiers :}
.include <bsd.kmodule.mk>
diff -r f4d3b34bc496 -r 18c861412c52 sys/modules/dtrace/syscall/Makefile
--- a/sys/modules/dtrace/syscall/Makefile Fri Jun 29 04:02:10 2018 +0000
+++ b/sys/modules/dtrace/syscall/Makefile Fri Jun 29 11:33:46 2018 +0000
@@ -14,5 +14,6 @@
CPPFLAGS+= -Wno-unknown-pragmas
CPPFLAGS+= ${${ACTIVE_CC} == "gcc" :? -Wno-discarded-qualifiers :}
+CPPFLAGS+= ${${ACTIVE_CC} == "clang" :? -Wno-incompatible-pointer-types-discards-qualifiers :}
.include <bsd.kmodule.mk>
Home |
Main Index |
Thread Index |
Old Index