From owner-freebsd-ports@FreeBSD.ORG Thu Jan 1 16:36:46 2015 Return-Path: Delivered-To: ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A1F5131B; Thu, 1 Jan 2015 16:36:46 +0000 (UTC) Received: from mail.netplex.net (mail.netplex.net [204.213.176.9]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.netplex.net", Issuer "RapidSSL CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 675AE6BD; Thu, 1 Jan 2015 16:36:45 +0000 (UTC) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.9/8.14.9/NETPLEX) with ESMTP id t01GacFA038950; Thu, 1 Jan 2015 11:36:38 -0500 X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.netplex.net) X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-4.4.3 (mail.netplex.net [204.213.176.9]); Thu, 01 Jan 2015 11:36:38 -0500 (EST) Date: Thu, 1 Jan 2015 11:36:38 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net Reply-To: Daniel Eischen To: Lev Serebryakov Subject: Re: CFLAGS only for clang in mixed-compiler project? In-Reply-To: <54A56F56.60403@FreeBSD.org> Message-ID: References: <54A56F56.60403@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: ports@FreeBSD.org 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:36:46 -0000 On Thu, 1 Jan 2015, Lev Serebryakov wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > > 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? Hmm, I found CFLAGS.clang (or rather CFLAGS.${COMPILER_TYPE}) in /usr/share/mk/, so you might try setting that instead of just CFLAGS. Just a guess... -- DE