From owner-freebsd-ports@FreeBSD.ORG Sat Jan 19 21:51:48 2013 Return-Path: Delivered-To: freebsd-ports@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 8C8E7B66 for ; Sat, 19 Jan 2013 21:51:48 +0000 (UTC) (envelope-from r.c.ladan@gmail.com) Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com [209.85.212.171]) by mx1.freebsd.org (Postfix) with ESMTP id 0B92D173 for ; Sat, 19 Jan 2013 21:51:47 +0000 (UTC) Received: by mail-wi0-f171.google.com with SMTP id hn14so6155655wib.10 for ; Sat, 19 Jan 2013 13:51:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; bh=fHlX0E6Jn4oWrwUSga0LdWbqqqjFoKG+5vKyqp+Uguw=; b=NlsuCY7a/LLnzaSkjX+eHBYPT1dHX9BWftnqELfC6Dh0T18kruWnxNwDbi/+//j9ve h6UmeYoWbpd6wkVe0qTCcd5ORIBPRA0l48NVX9hc2Ag4gcDlPwfYNPfTMzmiq3xE1+DY xkpHy+b8G6W3V17HmWERCJEGtjQ9Q3c6NbBrKhkcJuD/nL0JWWdYiI/pKQ0KBvd4OOsz QzL2sUYKwA6m5MNur7R8HXtTV88AMtDy7Mx9+UZcGBS+byOmac02k86hlvne62sy4ByK mKq1CuQ2hBZB/YWJj8yGXJqcK8ZrCJonvQ4/V7vEc/e6kVTpZZ3aa8lOtQ4lxrwgSZaW Turw== X-Received: by 10.194.119.5 with SMTP id kq5mr19876658wjb.48.1358632301195; Sat, 19 Jan 2013 13:51:41 -0800 (PST) Received: from ?IPv6:2001:980:d7ed:1:f963:52c:7ded:3021? ([2001:980:d7ed:1:f963:52c:7ded:3021]) by mx.google.com with ESMTPS id u6sm10775319wif.2.2013.01.19.13.51.39 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 19 Jan 2013 13:51:40 -0800 (PST) Message-ID: <50FB156A.5010003@gmail.com> Date: Sat, 19 Jan 2013 22:51:38 +0100 From: =?ISO-8859-1?Q?Ren=E9_Ladan?= User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: freebsd-ports@freebsd.org Subject: Re: CFT: building multimedia/vlc with clang on 9.1+ References: <20130119210903.GA76282@triton8.kn-bremen.de> In-Reply-To: <20130119210903.GA76282@triton8.kn-bremen.de> X-Enigmail-Version: 1.4.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Jan 2013 21:51:48 -0000 On 19-01-2013 22:09, Juergen Lock wrote: > Hi! > > As having to depend on gcc 4.6+ on i386 is kindof a waste on 9.1+ > where we have clang too, and clang might generate better code than > the old gcc 4.2.1 in base on amd64 anyway I thought what if we have > the vlc port default to using clang on 9.1+ when it's available? > So I propse the patch below for testing by anyone on 9.1 or later, > also on i386 where I can't test myself, please report any issues > or regressions you find. > I've been running vlc on 10-amd64 with clang for a while now without any (serious) problems. > Index: Makefile > =================================================================== > RCS file: /home/pcvs/ports/multimedia/vlc/Makefile,v > retrieving revision 1.312 > diff -u -p -r1.312 Makefile > --- Makefile 12 Jan 2013 20:25:57 -0000 1.312 > +++ Makefile 19 Jan 2013 20:45:39 -0000 > @@ -679,9 +679,16 @@ IGNORE= base clang version too old, set > CONFIGURE_ARGS+=--enable-altivec # VLC's config script doesn't know to do this > .endif > > +# prefer clang on 9.1+ > +.if (${OSVERSION} >= 901000) && exists(${DESTDIR}/usr/bin/clang) Not sure if this is the proper(TM) way to detect clang. > +CC= clang > +CXX= clang++ > +CPP= clang-cpp > +.else > .if ${ARCH} == "i386" > USE_GCC?= 4.6+ # sse/3dnow detection on i386 needs newer gcc See above, if on e.g. FreeBSD 12 the /usr/bin/clang file gets removed this makes the port always use GCC 4.6+ > .endif > +.endif > > # End OS specific hacks > René