Re: compiler info in kernel identification string

看板FB_current作者時間12年前 (2013/04/27 12:33), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串25/27 (看更多)
On 2012-11-15 21:43, Andriy Gapon wrote:> on 14/11/2012 01:43 Mateusz Guzik said the following: >> Hello, >> >> avg@ suggested to include compiler version in the kernel so that it's >> present in uname (and one can easly tell what was used to compile it). >> >> Here is my attempt: >> http://people.freebsd.org/~mjg/patches/newvers-compiler.diff > > When are you committing this? Please don't commit it yet, we're not done reviewing. :) For starters, this hardcodes the compiler names "gcc" and "clang", and this will include incorrect information into the kernel version string, if you use another setting for ${CC}. Then, if you fix the script use ${CC}, and set it to gcc versions from ports (for example), the parsing breaks down, as I expected: $ echo $CC /usr/local/bin/gcc47 $ compiler="gcc-"`$CC --version | head -n1 | awk '{ print $3 "-" $4}'` $ echo $compiler gcc-Ports-Collection) So please fix this first. Either handle all possible variants of version output, or just put the version string verbatim into the identification. I would opt for the latter. Last but not least, I am not sure this information belongs in uname at all. Maybe it would be better to put it somewhere else, in a sysctl, or show it in dmesg. _______________________________________________ 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_MW (FB_current)
討論串 (同標題文章)
文章代碼(AID): #1HUrJ_MW (FB_current)