From owner-freebsd-hackers@freebsd.org Mon Jun 20 02:37:32 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88016A7B4E0 for ; Mon, 20 Jun 2016 02:37:32 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x233.google.com (mail-it0-x233.google.com [IPv6:2607:f8b0:4001:c0b::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5A0C9139B for ; Mon, 20 Jun 2016 02:37:32 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x233.google.com with SMTP id a5so36068700ita.1 for ; Sun, 19 Jun 2016 19:37:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc; bh=KPV5sMmYbsep6WRupOxVuzX1ibIEkxPUBYbJnQrB6uk=; b=vNGHUX1ROcIuqNCRWsZ45B4ZGjA0Hf16weqNOIda19PERyQm70AKV+cJg3DCAPVs6F VNPGcxKH84nAGmERKuJ56nHJdKvLHfsdJUdWdHdnd/Ikq658yuFXDsZnRlrxOckBFJy6 P3JpHJnrga6r2kWge6506fdd6RgCSyZp4D3rP4gZGmnLDO2GqmbOzdfQ9xVSxJIHyX2Z LeRarYxEKyN4Swbmz6wC4WMf8F1t9HP6kFpear065Gmuw9dQQrC5Fp897f2AmlkCpjqQ 6rjr2CLJUZ6hRQFXHQ0pydUOqqYjEjLLR3zs2JP31uS1FyF2yI9CRYuS93g+9Ju9ZDmT GvjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc; bh=KPV5sMmYbsep6WRupOxVuzX1ibIEkxPUBYbJnQrB6uk=; b=OGtuK9p9DA3kOKT1LcOu7qfcG1wptVM7ZrqPtrPFF+8DM6XExu8dGasAjEzPUPFDk4 vdDKlhyAdRCJjJ+EdH11pl+UMdU1zNJ/qA+Ok8y/EAzoEVqYPd98uBJDekabmfPxNBSB xYAz3gkDhVuGrujgrrKVKxyb7DET5TGRlrTN8Dw7aX76LgZx3FaNMychdkRApXwqYF/7 VzM+MbNj3XQkeYxuZnQho9MJS8BY8VTLHNpOtr/m5/ck1dejEtb5QUcccAyn3ZfdO4QL AcsxM7deqRMiGydjorMhZpu5/6QDPaqAZ+uxaLxcT2wyj4aPafMOyahHNzQuVaoHzDxY 0fAQ== X-Gm-Message-State: ALyK8tLdWRLMEnANfAPTOaklqkkwaojbaG7lHK9j+1JTwY7934KiXWwrFpCk68HasvSAU2mxyEIoraG+u0/XMA== MIME-Version: 1.0 X-Received: by 10.36.46.80 with SMTP id i77mr14121923ita.60.1466390251506; Sun, 19 Jun 2016 19:37:31 -0700 (PDT) Sender: wlosh@bsdimp.com Received: by 10.79.75.3 with HTTP; Sun, 19 Jun 2016 19:37:31 -0700 (PDT) X-Originating-IP: [50.253.99.174] In-Reply-To: <8e9bb248-7c08-436e-6550-c054f449a483@herveybayaustralia.com.au> References: <2fa5c2cb-81eb-d44a-3011-db27035e7965@herveybayaustralia.com.au> <092CD08F-3896-451D-8A7E-8DCB056D0118@FreeBSD.org> <8e9bb248-7c08-436e-6550-c054f449a483@herveybayaustralia.com.au> Date: Sun, 19 Jun 2016 20:37:31 -0600 X-Google-Sender-Auth: zVj2mJ7i6uPev-VVJn-bdy5QXfQ Message-ID: Subject: Re: [solved]: Re: enabling cpu "features" in custom kernel From: Warner Losh To: Da Rock Cc: "freebsd-hackers@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jun 2016 02:37:32 -0000 Sadly, the obvious 'makeoptions CPUYPE=broadwell' in the kernel config doesn't work since it is set too late since bsd.cpu.mk is included from sys.mk before anything in the Makefile can change things. Warner On Sun, Jun 19, 2016 at 6:57 PM, Da Rock wrote: > On 17/06/2016 20:20, Dimitry Andric wrote: >> >> On 16 Jun 2016, at 14:35, Da Rock >> wrote: >>> >>> I'm just trying to get my head around kernel building and clang. >>> >>> If I want to enable certain features available on my cpu which are >>> available by clang, how do I enable them? As I understand it using ccflags >>> is a no no (ie /etc/make.conf), so how do I go about enabling them? I seem >>> to be missing something in my research here... >> >> You can set CPUTYPE in /etc/make.conf, for example: >> >> CPUTYPE?=broadwell >> >> then it will be automatically picked up in the correct places during >> buildworld, or during ports building. >> >> See also make.conf(5) and /usr/share/examples/etc/make.conf. >> >> -Dimitry >> > Thank you for that lead. It wasn't quite on it, but referring to > /usr/share/mk/bsd.cpu.mk provided the answers I sought. > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"