From owner-freebsd-ports@FreeBSD.ORG Thu Jan 1 16:47:02 2015 Return-Path: Delivered-To: ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A8011635; Thu, 1 Jan 2015 16:47:02 +0000 (UTC) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7DD6B840; Thu, 1 Jan 2015 16:47:02 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1Y6ito-000GFm-Tj; Thu, 01 Jan 2015 16:47:01 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t01Gkxm4052521; Thu, 1 Jan 2015 09:46:59 -0700 (MST) (envelope-from ian@freebsd.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1+KUoBUmR4c6i8G6wNYNKOP Message-ID: <1420130819.85983.2.camel@freebsd.org> Subject: Re: CFLAGS only for clang in mixed-compiler project? From: Ian Lepore To: lev@FreeBSD.org Date: Thu, 01 Jan 2015 09:46:59 -0700 In-Reply-To: <54A56F56.60403@FreeBSD.org> References: <54A56F56.60403@FreeBSD.org> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.8 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Cc: ports@FreeBSD.org, FreeBSD Hackers X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jan 2015 16:47:02 -0000 On Thu, 2015-01-01 at 19:01 +0300, Lev Serebryakov wrote: > I'm trying to update arm-eabi (microcontroller) cross-gcc port to > latest version 4.9 and have one weird problem. > > Some part of gcc for arm (neon coprocessor machine description, to be > precise) requires more than 256 nested parenthesis in version 4.9 (4.8 > doesn't have this problem). Due to this parenthesis madness clang > needs "-fbracket-depth=1024" option. If I add this option to CFLAGS in > environment variable, I have other problem. Later in build process gcc > uses newly-built gcc (xgcc) to build library. And this gcc picks up > "-fbracket-depth=1024" from environment and fails due to unknown option! > > How could I provide options only for clang but not for gcc? Don't set it in the env, set it in a make variable. The devel/arm-none-eabi-gcc port (which builds a bare-metal arm cross compiler and may be exactly what you need) has this: .include # The following is required for clang to bootstrap gcc. .if ${COMPILER_TYPE} == clang MAKE_ARGS+= CXXFLAGS=-fbracket-depth=512 .endif -- Ian