The following reply was made to PR bin/160275; it has been noted by GNATS. From: Paul Ambrose <ambrose...@gmail.com> To: bug-follo...@freebsd.org, ambrose...@gmail.com Cc: delp...@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); _______________________________________________ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"