From owner-freebsd-bugs@FreeBSD.ORG Tue Oct 11 12:20:09 2011 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C23F1065672 for ; Tue, 11 Oct 2011 12:20:09 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 31EF68FC0A for ; Tue, 11 Oct 2011 12:20:09 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p9BCK9Z1070463 for ; Tue, 11 Oct 2011 12:20:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p9BCK9qr070462; Tue, 11 Oct 2011 12:20:09 GMT (envelope-from gnats) Date: Tue, 11 Oct 2011 12:20:09 GMT Message-Id: <201110111220.p9BCK9qr070462@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Paul Ambrose Cc: Subject: Re: bin/160275: dtrace(1): dtrace -lv causes "unknown function" warnings X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Paul Ambrose List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Oct 2011 12:20:09 -0000 The following reply was made to PR bin/160275; it has been noted by GNATS. From: Paul Ambrose To: bug-followup@FreeBSD.org, ambrosehua@gmail.com Cc: delphij@FreeBSD.org Subject: Re: bin/160275: dtrace(1): dtrace -lv causes "unknown function" warnings Date: Tue, 11 Oct 2011 20:12:07 +0800 Among the previous update, some fbt probe function has NO CTF info, and I found the config (8) can not generate right Makefile for "in_proto.c" and "if_ethersubr.c" in sys/conf/files[,.ARCH], /usr/obj/usr/src/MYKERNEL/Makefile ... in_proto.ln: $S/netinet/in_proto.c ${NORMAL_LINT} in_proto.o: $S/netinet/in_proto.c ${NORMAL_C} -I$S/contrib/pf //without @${NORMAL_CTFCONVERT} in_rmx.ln: $S/netinet/in_rmx.c ${NORMAL_LINT} in_rmx.o: $S/netinet/in_rmx.c ${NORMAL_C} @${NORMAL_CTFCONVERT} ... which has a "compile-with" command, see here: ------------------------------------------------------------------ src/usr.sbin/config/mkmakefile.c Line 746 } compilewith = ftp->f_compilewith; if (compilewith == 0) { // no compile-with const char *ftype = NULL; switch (ftp->f_type) { case NORMAL: ftype = "NORMAL"; break; case PROFILING: if (!profiling) continue; ftype = "PROFILE"; break; default: fprintf(stderr, "config: don't know rules for %s\n", np); break; } //no compile-with get here, with CTFCONVERT post-process snprintf(cmd, sizeof(cmd), "${%s_%c%s}\n\t@${NORMAL_CTFCONVERT}", ftype, toupper(och), ftp->f_flags & NOWERROR ? "_NOWERROR" : ""); compilewith = cmd; } *cp = och; if (strlen(ftp->f_objprefix)) fprintf(f, "\t%s $S/%s\n\n", compilewith, np); else fprintf(f, "\t%s\n\n", compilewith); } } --------------------------------------------------- here is a patch for STABLE-8 diff --git a/usr.sbin/config/mkmakefile.c b/usr.sbin/config/mkmakefile.c index 55367be..59914c4 100644 --- a/usr.sbin/config/mkmakefile.c +++ b/usr.sbin/config/mkmakefile.c @@ -749,6 +749,14 @@ do_rules(FILE *f) ftp->f_flags & NOWERROR ? "_NOWERROR" : ""); compilewith = cmd; } + else if (!strncmp(compilewith, "${NORMAL_C", 10)) { + if (ftp->f_type == NORMAL) + snprintf(cmd, sizeof(cmd), + "%s\n.if defined(NORMAL_CTFCONVERT) && " + "!empty(NORMAL_CTFCONVERT)\n" + "\t${NORMAL_CTFCONVERT}\n.endif", compilewith); + compilewith = cmd; + } + *cp = och; fprintf(f, "\t%s\n\n", compilewith); } and this is a patch for STABLE-9 diff --git a/usr.sbin/config/mkmakefile.c b/usr.sbin/config/mkmakefile.c index 2372839..25a85de 100644 --- a/usr.sbin/config/mkmakefile.c +++ b/usr.sbin/config/mkmakefile.c @@ -767,6 +767,14 @@ do_rules(FILE *f) ftp->f_flags & NOWERROR ? "_NOWERROR" : ""); compilewith = cmd; } + //handle CTF issule with NORMAL_C and NORMAL_C_NOERROR + else if (!strncmp(compilewith, "${NORMAL_C", 10)) { + if (ftp->f_type == NORMAL) + snprintf(cmd, sizeof(cmd), + "%s\n\t@${NORMAL_CTFCONVERT}", + compilewith); + compilewith = cmd; + } *cp = och; if (strlen(ftp->f_objprefix)) fprintf(f, "\t%s $S/%s\n\n", compilewith, np);