Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
re: CVS commit: src/usr.bin/kdump
> > On 2. Jun 2018, at 22:07, matthew green <mrg%netbsd.org@localhost> wrote:
> >
> > Module Name: src
> > Committed By: mrg
> > Date: Sat Jun 2 20:07:15 UTC 2018
> >
> > Modified Files:
> > src/usr.bin/kdump: mkioctls
> >
> > Log Message:
> > just include <sys/mutex.h> for mkioctls. this works fine for me
> > for several platforms and fixes the clang build.
> >
> >
> > To generate a diff of this commit:
> > cvs rdiff -u -r1.50 -r1.51 src/usr.bin/kdump/mkioctls
>
> This breaks the build:
>
> In file included from /build/devel/src/sys/net/if.h:99:0,
> from kdump-ioctl.c:23:
> /build/devel/src/sys/altq/if_altq.h:48:2: error: unknown type name 'kmutex_t'
> kmutex_t *ifq_lock;
> ^~~~~~~~
>
> The real problem seems the sys include search path:
>
> #include <...> search starts here:
> /build/devel/obj/dist.amd64/usr/X11R7/include/libdrm
> /build/devel/obj/dist.amd64/usr/X11R7/include/pixman-1
> /build/devel/obj/dist.amd64/usr/X11R7/include
> /build/devel/src/external/cddl/osnet/sys
> /build/devel/src/external/cddl/osnet/dist/uts/common
> /build/devel/src/usr.bin/ktrace
> /build/devel/src/sys
> /build/devel/obj/dist.amd64/usr/include/gcc-6
> /build/devel/obj/tools.amd64/lib/gcc/x86_64--netbsd/6.4.0/include-fixed
> /build/devel/obj/dist.amd64/usr/include
>
> Most <sys/XXX.h> includes come from "cddl/osnet/sys/sys" which looks wrong.
>
> Suppose the search better starts with "-I${NETBSDSRCDIR}/sys" ...
i remain unable to reproduce this on my own system. i guess
either your idea, or, -I${DESTDIR}/usr/include before the cddl
includes, and make them all last.
FWIW, this patch works for me (in that, it doesn't break).
please feel free to commit this or something similar that works
for you, as i'm hesitant to commit something else here without
confirming it helps the problem i don't see.
thanks.
.mrg.
Index: Makefile.ioctl-c
===================================================================
RCS file: /cvsroot/src/usr.bin/kdump/Makefile.ioctl-c,v
retrieving revision 1.35
diff -p -u -r1.35 Makefile.ioctl-c
--- Makefile.ioctl-c 28 May 2018 21:05:02 -0000 1.35
+++ Makefile.ioctl-c 3 Jun 2018 11:43:19 -0000
@@ -47,11 +47,6 @@ DPSRCS+= ${PROG}-ioctl.c
CPPFLAGS+= -I${DESTDIR}/usr/X11R7/include/libdrm
CPPFLAGS+= -I${DESTDIR}/usr/X11R7/include/pixman-1
CPPFLAGS+= -I${DESTDIR}/usr/X11R7/include
-.if ${MKDTRACE} != "no"
-CPPFLAGS+= -I${NETBSDSRCDIR}/external/cddl/osnet/sys
-CPPFLAGS+= -I${NETBSDSRCDIR}/external/cddl/osnet/dist/uts/common
-CWARNFLAGS+= -Wno-unknown-pragmas
-.endif
CPPFLAGS+= -D_DEV_IC_BT8XX_H_
CPPFLAGS+= -D_ALTQ_ALTQ_JOBS_H_ # redefinition of inline
# De-select one, dup ioctls
@@ -65,4 +60,13 @@ CPPFLAGS+= -D__RADEON_DRM_H__ # Dup ioct
CPPFLAGS+= -D__MACH64_DRM_H__ # Dup ioctls
CPPFLAGS+= -D__MGA_DRM_H__ # Dup ioctls
+# Make sure these are last.
+.if ${MKDTRACE} != "no"
+# We put /usr/include here explicitly to always prefer NetBSD headers.
+CPPFLAGS+= -I${DESTDIR}/usr/include
+CPPFLAGS+= -I${NETBSDSRCDIR}/external/cddl/osnet/sys
+CPPFLAGS+= -I${NETBSDSRCDIR}/external/cddl/osnet/dist/uts/common
+CWARNFLAGS+= -Wno-unknown-pragmas
+.endif
+
${DEPFILES}: .PRECIOUS
Home |
Main Index |
Thread Index |
Old Index