Re: Kernel build error in hwpmc with system GNU cc

看板FB_current作者時間12年前 (2013/05/02 18:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/7 (看更多)
On Thu, May 2, 2013 at 8:43 AM, Andrey Chernov <ache@freebsd.org> wrote: > cc1: warnings being treated as errors > /usr/src/sys/modules/hwpmc/../../dev/hwpmc/hwpmc_core.c: In function 'iap_allocate_pmc': > /usr/src/sys/modules/hwpmc/../../dev/hwpmc/hwpmc_core.c:1935: warning: 'map' may be used uninitialized in this function > *** [hwpmc_core.o] Error code 1 > > -- > bitcoin:13fGiNutKNHcVSsgtGQ7bQ5kgUKgEQHn7N You can find a patch attached at the end of this mail that should fix the problem. More generally speaking, why are you building -CURRENT using GCC while the default compiler has been clang since November 2012? I understand we cannot completely get rid of GCC as long as Tier-2/Tier-3 arch haven't full support for clang and friends, OTOH, I see clang default on amd64 so I guess at some point we should declare GCC not officially supported anymore. Putting the additional burden of testing on the committer because two compilers are supported at the same time doesn't scale really well, at least according to me. Index: sys/dev/hwpmc/hwpmc_core.c =================================================================== --- sys/dev/hwpmc/hwpmc_core.c (revision 250174) +++ sys/dev/hwpmc/hwpmc_core.c (working copy) @@ -1945,7 +1945,7 @@ caps = a->pm_caps; if ((IAP_PMC_CAPS & caps) != caps) return (EPERM); - + map = 0; /* XXX: silent GCC warning */ arch = iap_is_event_architectural(pm->pm_event, &map); if (arch == EV_IS_ARCH_NOTSUPP) return (EOPNOTSUPP); -- Davide "There are no solved problems; there are only problems that are more or less solved" -- Henri Poincare _______________________________________________ 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): #1HWa2ZHI (FB_current)
討論串 (同標題文章)
文章代碼(AID): #1HWa2ZHI (FB_current)