From owner-freebsd-arch@FreeBSD.ORG Wed Apr 9 03:33:12 2014 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7A57D308 for ; Wed, 9 Apr 2014 03:33:12 +0000 (UTC) Received: from mail-pd0-f171.google.com (mail-pd0-f171.google.com [209.85.192.171]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F2B61067 for ; Wed, 9 Apr 2014 03:33:12 +0000 (UTC) Received: by mail-pd0-f171.google.com with SMTP id r10so1877086pdi.30 for ; Tue, 08 Apr 2014 20:33:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:content-type :content-transfer-encoding:subject:message-id:date:to:mime-version; bh=EX4XMNEVCXUXqFBS2E8KvbuxmG7DWV3y4qtlCDNceig=; b=UJJ1e5OvdrGPz4ROarDuAIJqQOzYNd1NGeY9qaXWzfJHxcXUK+7MLo/wGSq9GbJH/P BSBLl0Y0uiU/FfQY/zUydzT3zU6npnzkop2BI6VJOzxB528eDw10DdVhh2OBOkK7inoc H0q8yFyXgrGksVcpQ0elRNbUzo4tP8Rda5HBAnqyWy440lIO96ndknSHE0BM6X2Vzj8G Ye/1KOQzreEFYlZlq6YOjfV0lG+1g/k2hmrgICnwOoeR2T5T4LiT7l8mUrZI7vBu+aL0 8ZM/OZHfB2nzwtfJWBy8pLXPrYF51j2NkH1WL89c60bX0l1to4WZXB+aL1qZ0Lt4vHqa e4Ww== X-Gm-Message-State: ALoCoQkH9PRnumu5pOdN7Mxkl3PT1nYIOuuxAzA5+OUdz7t3oySgvZty47ll+q443+OCkaha3GsT X-Received: by 10.68.239.137 with SMTP id vs9mr8959667pbc.84.1397013918056; Tue, 08 Apr 2014 20:25:18 -0700 (PDT) Received: from [10.64.24.116] (dc1-prod.netflix.com. [69.53.236.251]) by mx.google.com with ESMTPSA id ci4sm7912931pbb.50.2014.04.08.20.25.17 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 08 Apr 2014 20:25:17 -0700 (PDT) Sender: Warner Losh From: Warner Losh Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Subject: Separating out building bootstrap and system compilers Message-Id: <09D78C17-A4F6-4A79-96D4-413B937265F4@bsdimp.com> Date: Tue, 8 Apr 2014 21:25:15 -0600 To: freebsd-arch Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) X-Mailer: Apple Mail (2.1874) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Apr 2014 03:33:12 -0000 I=92d love to be able to say make buildworld WITHOUT_GCC=3Dt WITHOUT_CLANG=3Dt and get a working system out of it, without compilers. Too bad I can=92t = right now. Luckily, I worked up these patches. Here=92s my proposed commit message. = Please comment on the patch (which can be found at = http://people.freebsd.org/~imp/patch-queue/bootstrap) Separate out enabling building clang and/or gcc for the system and building clang and/or gcc as the bootstrap compiler. Normally, the default compiler is used. WITH_CLANG_BOOTSTRAP and/or WITH_GCC_BOOTSTRAP will enable building these compilers as part bootstrap phase. WITH/WITHOUT_CLANG_IS_CC controls which compiler is used by default for the bootstrap phase, as well as which compiler is installed as cc. buildworld now successfully completes building the cross compiler with WITHOUT_CLANG=3Dt and WITHOUT_GCC=3Dt and produces a built system with neither of these included. MK_CROSS_COMPILER will now force MK_CLANG_BOOTSTRAP=3Dno and MK_GCC_BOOTSTRAP=3Dno. BOOTSTRAP_COMPILER was considered, but rejected, since pc98 needs both clang and gcc to bootstrap still. It should be revisisted in the future if this requirement goes away. Values should be gcc, clang or none. Chances are good that MK_BINUTILS is a good candidate for similar treatment. We likely need to fold Xxx causing things to magically not happen into this scheme as well, but that may be a larger, more = disruptive change. Comments? Warner