From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 22:31:41 2012 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2C7AA106566B; Tue, 11 Sep 2012 22:31:41 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 9EBE18FC12; Tue, 11 Sep 2012 22:31:40 +0000 (UTC) Received: by obbun3 with SMTP id un3so2061903obb.13 for ; Tue, 11 Sep 2012 15:31:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=O7jcvSv+BmqZsbXtE7DBoveUrzFjH65sEs5i/CuKIfs=; b=O13WIcA/7ld0Y+J0qKg1niKBssZ8hR2X4N+CEcbAGbXBtjxgnVe01FLlp9o/Oa1QZ1 aDFryxqhkqkhDi/8i4h29W8d8Jr1Owh5ZT7Le9GzsK3VwswDs568cnQJZsSBhLLaz5CL wQP3KGFE7/5h5V6SIoZw4p9j1OAOOFFkOGOB4jQwnzFF3c6V/eTzJHZL6kJJGHW10B56 NXNhCP8uetEMiJnsPJn0X4h7HQFwAySTpRyxkpxL4MEao2+IJAgAASkaFIehWRvEO7bA MklBoZJWlVxDjjnJ1CHYOZg400ViuYunQm/ySQxJgSHX3aYBYyTWdKSG2vjre8utYUSk 3/Ng== MIME-Version: 1.0 Received: by 10.60.29.164 with SMTP id l4mr20687244oeh.4.1347402700116; Tue, 11 Sep 2012 15:31:40 -0700 (PDT) Received: by 10.76.142.201 with HTTP; Tue, 11 Sep 2012 15:31:39 -0700 (PDT) In-Reply-To: <20120911204418.GB15014@lonesome.com> References: <20120910211207.GC64920@lor.one-eyed-alien.net> <004BADDB-E79D-4497-89EE-641F0359E9BE@FreeBSD.org> <504EF3ED.7050502@FreeBSD.org> <20120911204418.GB15014@lonesome.com> Date: Tue, 11 Sep 2012 15:31:39 -0700 Message-ID: From: Garrett Cooper To: Mark Linimon Content-Type: text/plain; charset=ISO-8859-1 Cc: toolchain@freebsd.org, Dimitry Andric , current@freebsd.org Subject: Re: Clang as default compiler November 4th X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 22:31:41 -0000 On Tue, Sep 11, 2012 at 1:44 PM, Mark Linimon wrote: > On Tue, Sep 11, 2012 at 10:07:04AM +0100, David Chisnall wrote: >> There is some logic in the clang driver already for knowing when it is >> invoked as gcc. I'd be quite tempted to make gcc a symlink to clang >> and make clang default to gnu89 when invoked in that way. > > And how then does a port say "I don't compile with clang no matter how > it is invoked"? Here's one way: $ clang -dumpspecs clang: error: unsupported option '-dumpspecs' clang: error: no input files $ gcc -dumpspecs | grep -q gcc && echo "gotcha" gotcha $ Also, $ cat Makefile .if !empty(CC:M*clang*) || !empty(CXX:M*clang*) IGNORE= does not compile with clang .warning ${IGNORE} .endif all: $ make CXX=clang++ "Makefile", line 3: warning: does not compile with clang $ make CXX=g++ $ But I figured that's probably done elsewhere I bit more sanely. Thanks, -Garrett