From nobody@FreeBSD.org  Sun Dec  2 12:01:09 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id EF068419
	for <freebsd-gnats-submit@FreeBSD.org>; Sun,  2 Dec 2012 12:01:09 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id D12268FC0C
	for <freebsd-gnats-submit@FreeBSD.org>; Sun,  2 Dec 2012 12:01:09 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id qB2C19X9099961
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 2 Dec 2012 12:01:09 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id qB2C19h7099953;
	Sun, 2 Dec 2012 12:01:09 GMT
	(envelope-from nobody)
Message-Id: <201212021201.qB2C19h7099953@red.freebsd.org>
Date: Sun, 2 Dec 2012 12:01:09 GMT
From: Garrett Cooper <yaneurabeya@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: bsd.own.mk: move MK_CLANG_EXTRAS line further down in bsd.own.mk to not install with WITHOUT_TOOLCHAIN set
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         174050
>Category:       conf
>Synopsis:       [bsd.own.mk] [patch] move MK_CLANG_EXTRAS line further down in bsd.own.mk to not install with WITHOUT_TOOLCHAIN set
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Dec 02 12:10:00 UTC 2012
>Closed-Date:    
>Last-Modified:  Sun Feb 03 22:31:39 UTC 2013
>Originator:     Garrett Cooper
>Release:        n/a
>Organization:
EMC Isilon
>Environment:
n/a
>Description:
The attached patch corrects the fact that if WITHOUT_TOOLCHAIN is set MK_CLANG_EXTRAS is still potentially set to yes.

The attached patch just consolidates the checks (probably an unmeasurable performance difference), and makes protects against future bugs if MK_CLANG_EXTRAS is used somewhere else in the tree other than clang directories:

$ find . -name Makefile\* -or -name \*.mk | xargs grep -l MK_CLANG_EXTRAS
./share/mk/bsd.own.mk
./lib/clang/libllvmx86disassembler/Makefile
./lib/clang/libllvmipo/Makefile
./lib/clang/Makefile
./lib/clang/libllvmsupport/Makefile
./lib/clang/libllvmipa/Makefile
./lib/clang/libllvmmc/Makefile
./lib/clang/libllvmscalaropts/Makefile
./lib/clang/libllvmmcjit/Makefile
./lib/clang/libllvmanalysis/Makefile
./lib/clang/libllvmtransformutils/Makefile
./usr.bin/clang/Makefile
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

Index: share/mk/bsd.own.mk
===================================================================
--- share/mk/bsd.own.mk	(revision 243747)
+++ share/mk/bsd.own.mk	(working copy)
@@ -540,10 +540,6 @@
 MK_CTF:=	no
 .endif
 
-.if ${MK_CLANG} == "no"
-MK_CLANG_EXTRAS:= no
-.endif
-
 .if ${MK_CRYPT} == "no"
 MK_OPENSSL:=	no
 MK_OPENSSH:=	no
@@ -587,6 +583,7 @@
 
 .if ${MK_CLANG} == "no"
 MK_CLANG_IS_CC:= no
+MK_CLANG_EXTRAS:= no
 .endif
 
 #


>Release-Note:
>Audit-Trail:
>Unformatted:
