Re: compiler info in kernel identification string

看板FB_current作者時間12年前 (2013/04/27 12:33), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串25/27 (看更多)
On 2012-11-14 16:38, Ian Lepore wrote: > On Wed, 2012-11-14 at 10:25 +0100, Dimitry Andric wrote: .... >> That way, you are sure never to lose information. This also works for >> gcc from ports (which is the reason for the space after 'version' in the >> grep command): >> >> $ gcc47 -v 2>&1 | grep 'version ' >> gcc version 4.7.3 20120929 (prerelease) (FreeBSD Ports Collection) >> >> I realize this is a bit long, but it is better to have complete than >> stripped information. > > Rather than just taking whatever the compiler emits, the proposed patch > seems to be carefully crafted to avoid breaking existing 3rd party tools > which parse uname output based on the location of whitespace. I'm not > sure how important that is given that the uname manpage doesn't document > the output format as if it were somehow rigidly specified. I can see where you're coming from, but I also think it is very fragile to depend on parsing such information from uname. If you do so, you must be prepared to accept wonky input, otherwise, just don't do it. :) And as I remarked in another reply, now that I have thought about it a bit, I would much rather see this information moved to a sysctl or dmesg line, than in uname. With the happy side effect that no existing uname parsers would be confused! _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
文章代碼(AID): #1HUrJ_S0 (FB_current)
討論串 (同標題文章)
文章代碼(AID): #1HUrJ_S0 (FB_current)