From owner-freebsd-current@FreeBSD.ORG Thu May 2 10:06:35 2013 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 63CC2303; Thu, 2 May 2013 10:06:35 +0000 (UTC) (envelope-from davide.italiano@gmail.com) Received: from mail-vb0-x22a.google.com (mail-vb0-x22a.google.com [IPv6:2607:f8b0:400c:c02::22a]) by mx1.freebsd.org (Postfix) with ESMTP id 178731262; Thu, 2 May 2013 10:06:35 +0000 (UTC) Received: by mail-vb0-f42.google.com with SMTP id w16so309890vbf.29 for ; Thu, 02 May 2013 03:06:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=jkfUMK5M7DHqBZQ0j8jJIRAs9klyIFd4fDDlHC9Q7HU=; b=y0ink+INpOyxh2tL7Hs55ZwqNFd95343yndas1uwK/69Q5bTkcyMhZCbqcPEMlWMYD AZCnQV5vC1y0UALus/8m9uKyKH1wmzcRBVM4tdvnzDEl08N35Tns9hNm97gfgaLIhPM0 oqBdEV9ryjFfVPRMZDngxYrvPDl/ZYwQfSqxuW56rCFgboKGoYophtcp5eld7ZQp492X 8iXgAEwnLrode1dvEI+CvVupc81r/6D/9L5fEL7msgTHyPAGvj7PCzsYW+X3UT8FcXyT 3ntc8oY3wAuW9bQltqS1RCdEwsu6zN4EBzEptHO7ycXlm/QbbEXZxTe8jK30/i5p+7KQ MFpw== MIME-Version: 1.0 X-Received: by 10.221.9.70 with SMTP id ov6mr1899704vcb.72.1367489194563; Thu, 02 May 2013 03:06:34 -0700 (PDT) Sender: davide.italiano@gmail.com Received: by 10.220.203.199 with HTTP; Thu, 2 May 2013 03:06:34 -0700 (PDT) In-Reply-To: <51820AFD.1030607@freebsd.org> References: <51820AFD.1030607@freebsd.org> Date: Thu, 2 May 2013 12:06:34 +0200 X-Google-Sender-Auth: HpssBWfmAAQIqm-UwvrwlnAoRS8 Message-ID: Subject: Re: Kernel build error in hwpmc with system GNU cc From: Davide Italiano To: Andrey Chernov Content-Type: text/plain; charset=ISO-8859-1 Cc: current@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 May 2013 10:06:35 -0000 On Thu, May 2, 2013 at 8:43 AM, Andrey Chernov 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